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>
#include<algorithm>
using namespace std;
int main()
{
	int bigx[4] = { 0, 2, 0, -2 };
	int bigy[4] = { 2, 0, -2, 0 };
	int smx[4] = {0,1,0,-1};
	int smy[4] = {1,0,-1,0};
	int midx[9] = { -1, -1, 0, 1, 1,  1,  0, -1 };
	int midy[9] = {  0,  1, 1, 1, 0, -1, -1, -1 };
	int map[10][10] = { 0 };
	int cnt = 100;
	int x, y, size;
	char s, d;
	int ma = 0;
	int c = 0;

	while (cin >> x >> s >> y >> d >> size){
		
		if (size == 1){
			map[y][x]++;
			for (int i = 0; i < 4; i++){
				
				int xx = smx[i] + x;
				int yy = smy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if (size == 2){
			map[y][x]++;
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if(size==3) {
			map[y][x]++;
			for (int i = 0; i < 4; i++){
				int xx = bigx[i] + x;
				int yy = bigy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}
		/*for (int i = 0; i < 10; i++){
			for (int i2 = 0; i2 < 10; i2++){
				cout << map[i][i2] << " ";
			}cout << endl;
		}*/
	}
	for (int i = 0; i < 10; i++){
		for (int i2 = 0; i2 < 10; i2++){
			if (map[i][i2] != 0){
				cnt--;
			}
			ma = max(ma, map[i][i2]);
		}
	}
	
	cout << cnt << endl;
	cout << ma << endl;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

#define M 14

int main() {
	int A[M][M] = {};

	for (int x, y, size; scanf("%d,%d,%d", &x, &y, &size) != EOF;) {
		x += 2; y += 2;
		A[x + 1][y]++;
		A[x][y + 1]++;
		A[x - 1][y]++;
		A[x][y - 1]++;
		if (size == 1)continue;
		A[x + 1][y + 1]++;
		A[x + 1][y - 1]++;
		A[x - 1][y + 1]++;
		A[x - 1][y - 1]++;
		if (size == 2)continue;
		A[x + 2][y]++;
		A[x][y + 2]++;
		A[x - 2][y]++;
		A[x][y - 2]++;
	}

	int cnt = 100, MAX = 0;

	for (int x = 0; x < 10; x++) {
		for (int y = 0; y < 10; y++) {
			if (A[x + 2][y + 2]) {
				cnt--;
				MAX = max(MAX, A[x + 2][y + 2]);
			}
		}
	}
	cout << cnt << endl;
	cout << MAX << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>

using namespace std;

int main(){
	int p[10][10]={0};
	int x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		if(s==1){
			p[x][y]+=1;
			if(x-1>=0&&x-1<=9)
			p[x-1][y]+=1;
			if(x+1>=0&&x+1<=9)
			p[x+1][y]+=1;
			if(y-1>=0&&y-1<=9)
			p[x][y-1]+=1;
			if(y+1>=0&&y+1<=9)
			p[x][y+1]+=1;
		}
		else{
			for(int i=x-1;i<=x+1;i++){
				for(int j=y-1;j<=y+1;j++){
					if(i>=0&&i<=9){
						if(j>=0&&j<=9){
							p[i][j]+=1;
						}
					}
				}
			}
			if(s==3){
				if(x-2>=0&&x-2<=9)
				p[x-2][y]+=1;
				if(x+2>=0&&x+2<=9)
				p[x+2][y]+=1;
				if(y-2>=0&&y-2<=9)
				p[x][y-2]+=1;
				if(y+2>=0&&y+2<=9)
				p[x][y+2]+=1;
			}
		}
	}
	int noink=0,dense=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			p[i][j]==0 ? noink++:0;
			dense<p[i][j] ? dense=p[i][j]:0;
		}
	}
	printf("%d\n%d\n",noink,dense);
}

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

int map[10][10]={};
int sx[] = { 0,-1,1,0 } , sy[] = { -1,0,0,1 } ;
int mx[] = { -1,0,1 }, my[] = { -1,0,1 } ;
int lx[] = { 0,-1,0,1,-2,-1,1,2,-1,0,1,0 } ;
int ly[] = { -2,-1,-1,-1,0,0,0,0,1,1,1,2 } ;

int main(){
	
	int x,y,size ;
	char temp;
	int empty=0,max=0;
	
	while(1){
		cin >> x ;
		if( cin.eof() ) break;
		cin >> temp >> y ;
		cin >> temp >> size ;
		
		map[x][y]++;
		
		if( size==1 ){
			for( int i=0 ; i<4 ; i++ ){
				if( x+sx[i]>=0 && x+sx[i]<=9 && y+sy[i]>=0 && y+sy[i]<=9 )
					map[x+sx[i]][y+sy[i]]++;
			}
		}
		else if( size==2 ){
			for( int i=0 ; i<9 ; i++ ){
				if( x+mx[i%3]>=0 && x+mx[i%3]<=9 && y+my[i/3]>=0 && y+my[i/3]<=9 )
					map[x+mx[i%3]][y+my[i/3]]++;
			}
		}
		else if( size==3 ){
			for( int i=0 ; i<12 ; i++ ){
				if( x+lx[i]>=0 && x+lx[i]<=9 && y+ly[i]>=0 && y+ly[i]<=9 )
					map[x+sx[i]][y+sy[i]]++;
			}
		}
	}
	
	for( int i=0 ; i<10 ; i++ ){
		for( int j=0 ; j<10 ; j++ ){
			if( map[i][j]==0 ) empty++;
			if( map[i][j]>max ) max=map[i][j] ;
		}
	}
	
	cout << empty << endl ;
	cout << max << endl ;
	
return 0;
}

C++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)
#define MP make_pair
typedef long long LL;
#define EPS (1e-6)
double zero(double d){
  return d < EPS ? 0.0 : d;
}

typedef pair<int,int> P;

int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(7);
  int INF = 1000000;

  int xm = 2;
  int ym = 2;

  int paper[10+xm+xm][10+ym+ym];
  memset(paper,0,sizeof(paper));

  int x,y,size;
  char buf;
  while(cin>>x>>buf>>y>>buf>>size){
    x += xm;
    y += ym;

    paper[x][y]++;

    switch(size){
    case 3:
      paper[x-2][y]++;
      paper[x+2][y]++;
      paper[x][y-2]++;
      paper[x][y+2]++;

    case 2:
      paper[x-1][y-1]++;
      paper[x+1][y+1]++;
      paper[x+1][y-1]++;
      paper[x-1][y+1]++;      

    case 1:
      paper[x-1][y]++;
      paper[x+1][y]++;
      paper[x][y-1]++;
      paper[x][y+1]++;
      break;
    }
  }


  int m=0;
  int white=0;
  for(int i=xm; i<10+xm; i++){
    for(int j=ym; j<10+ym; j++){
      m = max( paper[i][j], m);
      if(paper[i][j]==0)
	white++;
    }
  }

  cout << white << endl << m << endl;

  return 0;
}