Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

C++: #include<iostream>
int main()
{
????????int density[10][10] = {};
????????int x, y, size;
????????char comma;
????????while (std::cin >> x >> comma >> y >> comma >> size) {
????????????????switch (size) {
????????????????case 3:
????????????????????????if (x - 2 >= 0) ++density[x - 2][y];
????????????????????????if (y - 2 >= 0) ++density[x][y - 2];
????????????????????????if (x + 2 < 10) ++density[x + 2][y];
????????????????????????if (y + 2 < 10) ++density[x][y + 2];
????????????????????????// fall through
????????????????case 2:
????????????????????????if (x - 1 >= 0 && y - 1 >= 0) ++density[x - 1][y - 1];
????????????????????????if (x - 1 >= 0 && y + 1 < 10) ++density[x - 1][y + 1];
????????????????????????if (x + 1 < 10 && y - 1 >= 0) ++density[x + 1][y - 1];
????????????????????????if (x + 1 < 10 && y + 1 < 10) ++density[x + 1][y + 1];
????????????????????????// fall through
????????????????case 1:
????????????????????????if (x - 1 >= 0) ++density[x - 1][y];
????????????????????????if (y - 1 >= 0) ++density[x][y - 1];
????????????????????????if (x + 1 < 10) ++density[x + 1][y];
????????????????????????if (y + 1 < 10) ++density[x][y + 1];
????????????????}
????????????????++density[x][y];
????????}
??
????????int cnt = 0, max = 0;
????????for (int i = 0; i < 10; ++i) {
????????????????for (int j = 0; j < 10; ++j) {
????????????????????????if (density[i][j] == 0) ++cnt;
????????????????????????if (max < density[i][j]) max = density[i][j];
????????????????}
????????}
????????std::cout << cnt << std::endl << max << std::endl;
}

C++: #include<iostream>

using namespace std;


main(){
  
  int map[10][10];
  int x,y,size;
  //initialize
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      map[i][j]=0;
    }
  }
  int white=0,Max=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    
    if(size==1){
      map[x][y-1]++;    
      map[x-1][y]++;map[x][y]++;map[x+1][y]++;
                    map[x][y+1]++;
      
    }
    if(size==2){
      map[x-1][y-1]++;map[x][y-1]++;map[x+1][y-1]++;
      map[x-1][y]++;  map[x][y]++;  map[x+1][y]++;
      map[x-1][y+1]++;map[x][y+1]++;map[x+1][y+1]++;
      
    }
    if(size==3){                      map[x][y-2]++;
                      map[x-1][y-1]++;map[x][y-1]++;map[x+1][y-1]++;
      map[x-2][y]++;  map[x-1][y]++;  map[x][y]++;  map[x+1][y]++; map[x+2][y]++;
                      map[x-1][y+1]++;map[x][y+1]++;map[x+1][y+1]++;
                                      map[x][y+2]++;
    }
    
    
  }

    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	if(map[i][j]==0)white++;
	if(map[i][j]>Max)Max=map[i][j];
      }
      
    }
  cout << white<<" "<< Max << endl;

  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int pap[11][11],dx[]={0,1,0,-1,1,-1,1,-1,2,0,-2,0},dy[]={1,0,-1,0,1,-1,-1,1,0,2,0,-2};
int main(){
int x,y,si,l,ma,cou;
fill(pap[0],pap[0]+11*11,0);
while(scanf("%d,%d,%d",&x,&y,&si)!=EOF){
    if(si==1)l=4;
    if(si==2)l=8;
    if(si==3)l=12;
    pap[x][y]+=1;
    for(int i=0;i<l;i++){
        pap[x+dx[i]][y+dy[i]]+=1;
    }
    /*for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        cout<<pap[i][j];
    }
    cout<<endl;
    }*/
}
for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        cout<<pap[i][j];
        ma=max(ma,pap[i][j]);
        if(pap[i][j]==0){
            cou++;
        }
    }
    cout<<endl;
}
cout<<cou+2<<endl<<ma<<endl;
return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main(){
	int x1[] = {0, -1, 0, 1, 0};
	int y1[] = {-1, 0, 0, 0, 1};
	int x2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	int y2[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1};
	int x3[] = {0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0};
	int y3[] = {-2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2};
	int l[] = {5, 9, 13};
	int *xs[] = {x1, x2, x3};
	int *ys[] = {y1, y2, y3};
	char c;
	int m[100][100];
	rep(i, 100) rep(j, 100) m[i][j] = 0;
	for (int x, y, s; cin >> x >> c >> y >> c >> s; ) {
		rep(i, l[s - 1]) {
			m[y + ys[s - 1][i] + 20][x + xs[s - 1][i] + 20]++;
		}
	}
	int minc = 0, cnt = 0;
	rep(i, 10) rep(j, 10) {
		minc = max(minc, m[i + 20][j + 20]);
		if (m[i + 20][j + 20] == 0) cnt++;
	}
	cout << cnt << endl << minc << endl;
	
	return 0;
}

C++: #include<iostream>
using namespace std;

int main(void){

	int map[10][10],ink,x,y,max=0,count=0;
	int dx[] = {0,0,-1,1,-1,-1,1,1,0,0,-2,2};
	int dy[] = {-1,1,0,0,-1,1,-1,1,-2,2,0,0};


	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			map[i][j]=0;
		}
	}
	
	
	while(scanf("%d,%d,%d",&x,&y,&ink)){
		map[y][x]++;
		for(int i=0;i<ink*4;i++){
			int mx=x+dx[i];
			int my=y+dy[i];
			if(mx>=0 && mx<10 && my>=0 && my<=10){
				map[my][mx]++;
			}
		}
	}
	
	
	for(int y=0;y<10;y++){
		for(int x=0;x<10;x++){
			if(map[y][x]==0){
				count++;
			}
			if(map[y][x]>max){
				max=map[y][x];
			}
		}
	}
	printf("%d\n%d",count,max);
}