Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d", count, max)
}

C++: #include <stdio.h>
#define H 14

int main(void){
	int b[H][H];
	int x, y, s;
	int w=0, h=0;
	for(int i=0; i<H; ++i){
		for(int j=0; j<H; ++j){
			b[i][j] = 0;
		}
	}

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		x += 2;
		y += 2;
		switch(s){
		case 3:
			b[x][y-2]++;
			b[x-2][y]++;
			b[x+2][y]++;
			b[x][y+2]++;
		case 2:
			b[x-1][y-1]++;
			b[x+1][y-1]++;
			b[x-1][y+1]++;
			b[x+1][y+1]++;
		case 1:
			b[x][y-1]++;
			b[x-1][y]++;
			b[x][y]++;
			b[x+1][y]++;
			b[x][y+1]++;
			break;
		}
	}

	for(int i=2; i< H-2; ++i){
		for(int j=2; j<H-2; ++j){
			if(b[i][j] == 0){
				w++;
			}else if(h < b[i][j]){
				h = b[i][j];
			}
		}
	}
	printf("%d\n%d\n", w, h);

	return 0;
}

C++: #include <cstdio>

using namespace std;

int main(){
	int i,j;
	int p[14][14],x,y,s;
	for(i=2;i<12;i++)for(j=2;j<12;j++)p[i][j]=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=-1){
		y+=2;x+=2;
		p[y][x]++;
		p[y+1][x]++;
		p[y-1][x]++;
		p[y][x+1]++;
		p[y][x-1]++;
		if(s>=2){
			p[y+1][x+1]++;
			p[y+1][x-1]++;
			p[y-1][x-1]++;
			p[y-1][x+1]++;
			
		}
		if(s>=3){
			p[y+2][x]++;
			p[y-2][x]++;
			p[y][x+2]++;
			p[y][x-2]++;
		}
	}
	int mx=0,no=0;
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(!p[i][j])no++;
			if(p[i][j]>mx)mx=p[i][j];
		}
	}
	printf("%d\n%d\n",no,mx);
	return 0;
}

C++: #include <stdio.h>
#define MAX(a,b) ((a>b)? a:b)

int data[10][10];

int drop(int x, int y){
  if(0 <= x && x < 10 && 0 <= y && y < 10) data[x][y]++;
}

int main(){
  int i,j;
  for(i=0;i<10;i++) for(j=0;j<10;j++) data[i][j] = 0;

  int x,y,r;
  while(scanf("%d,%d,%d", &x,&y,&r)!=EOF){
    switch(r){
    case 3:
      drop(x-2,y);drop(x+2,y);drop(x,y-2);drop(x,y+2);
    case 2:
      drop(x-1,y-1);drop(x+1,y-1);
      drop(x-1,y+1);drop(x+1,y+1);
    case 1:
      drop(x,y);drop(x-1,y);drop(x+1,y);drop(x,y-1);drop(x,y+1);
    }
  }

  int max=0;
  int num=0;
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(data[i][j] == 0) num++;
      else max = MAX(max, data[i][j]);
    }
  }

  printf("%d\n%d\n", num, max);
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int a[10][10]={},x,y,size,dumy,max=0,ans=0;
	int mx[12]={0,-1,1,0,-1,1,-1,1,0,-2,2,0},my[12]={-1,0,0,1,-1,-1,1,1,-2,0,0,2};
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		dumy=4*size;
		//cout<<size<<endl;
		for(int i=0;i<dumy;i++){
			if(x+mx[i]>=0&&y+my[i]>=0)
			a[x+mx[i]][y+my[i]]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0){
				ans++;
			}else{
				if(max<=a[i][j])
				max=a[i][j];
			}
		}
	}
	cout<<ans<<endl<<max<<endl;
return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

map< int,map<int,int> > mp;
// int mp[10][10];

int main(){
  int x,y,s;
  REP(i,10)REP(j,10)mp[i][j]=0;
  while(~scanf("%d,%d,%d",&x,&y,&s)){
    if(x<0)break;
    if(s==1){
      // small
      mp[x][y]++;
      mp[x-1][y]++;
      mp[x+1][y]++;
      mp[x][y-1]++;
      mp[x][y+1]++;
    }else if(s==2){
      // mid
      FOR(i,x-1,x+2){
        FOR(j,y-1,y+2){
          mp[i][j]++;
        }
      }
    }else{
      // big
      FOR(i,x-1,x+2){
        FOR(j,y-1,y+2){
          mp[i][j]++;
        }
      }
      mp[x-2][y]++;
      mp[x+2][y]++;
      mp[x][y-2]++;
      mp[x][y+2]++;
    }
  }
  int cnt = 0;
  int mx = 0;
  REP(i,10)REP(j,10){
    if(mp[i][j]==0)++cnt;
    else mx=max(mx,mp[i][j]);
  }
  cout<<cnt<<endl;
  cout<<mx<<endl;
  return 0;
}

C++: 
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

#define CHECK_AND_FILL(x,y,v) do {if(0<=x&&x<10&&0<=y&&y<10) v[x][y]++; }while(0);

int main() {
    vector<vector<int> > v(10, vector<int>(10, 0));

    int x, y, size;
    char c1, c2;
    while(cin >> x >> c1 >> y >> c2 >> size) {
        if(size == 1) {
            for(int dx = -1; dx <= 1; ++dx) 
                for(int dy = -1; dy <= 1; ++dy) 
                    if(abs(dx)+abs(dy) <= 1) CHECK_AND_FILL(x+dx, y+dy, v);
        }
        else if(size == 2) {
            for(int dx = -1; dx <= 1; ++dx) 
                for(int dy = -1; dy <= 1; ++dy) 
                    CHECK_AND_FILL(x+dx, y+dy, v);
        }
        else if(size == 3) {
            for(int dx = -2; dx <= 2; ++dx) 
                for(int dy = -2; dy <= 2; ++dy) 
                    if(abs(dx)+abs(dy) <= 2) CHECK_AND_FILL(x+dx, y+dy, v);
        }
    }

    int thick = 0;
    int white = 0;
    for(int i = 0; i < 10; ++i)
        for(int j = 0; j < 10; ++j) {
            thick = max(thick, v[i][j]);
            if(v[i][j] == 0) ++white;
        }

    cout << white << endl;
    cout << thick << endl;
    return 0;
}