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>
using namespace std;

int main(void){

  int map[10][10] = {{0,0}};

  int x,y,s,white = 0,maxi = 0;
  char c1,c2;

  while(cin >> x >> c1 >> y >> c2 >> s){

    if(s == 1){
      map[x][y]++;
      (x+1 <= 9) ? map[x+1][y]++ : map[x+1][y]+=0;
      (y+1 <= 9) ? map[x][y+1]++ : map[x][y+1]+=0;
      (x-1 >= 0) ? map[x-1][y]++ : map[x-1][y]+=0;
      (y-1 >= 0) ? map[x][y-1]++ : map[x][y-1]+=0;
    }

    if(s == 2){
      map[x][y]++;
      (x+1 <= 9) ? map[x+1][y]++ : map[x+1][y]+=0;
      (y+1 <= 9) ? map[x][y+1]++ : map[x][y+1]+=0;
      (x-1 >= 0) ? map[x-1][y]++ : map[x-1][y]+=0;
      (y-1 >= 0) ? map[x][y-1]++ : map[x][y-1]+=0;
      (x+1 <= 9 && y+1 <= 9) ? map[x+1][y+1]++ : map[x+1][y+1]+=0;
      (x-1 >= 0 && y+1 <= 9) ? map[x-1][y+1]++ : map[x-1][y+1]+=0;
      (x+1 <= 9 && y-1 >= 0) ? map[x+1][y-1]++ : map[x+1][y-1]+=0;
      (x-1 >= 0 && y-1 >= 0) ? map[x-1][y-1]++ : map[x-1][y-1]+=0;

    }

    if(s == 3){
      map[x][y]++;
      (x+1 <= 9) ? map[x+1][y]++ : map[x+1][y]+=0;
      (y+1 <= 9) ? map[x][y+1]++ : map[x][y+1]+=0;
      (x-1 >= 0) ? map[x-1][y]++ : map[x-1][y]+=0;
      (y-1 >= 0) ? map[x][y-1]++ : map[x][y-1]+=0;
      (x+1 <= 9 && y+1 <= 9) ? map[x+1][y+1]++ : map[x+1][y+1]+=0;
      (x-1 >= 0 && y+1 <= 9) ? map[x-1][y+1]++ : map[x-1][y+1]+=0;
      (x+1 <= 9 && y-1 >= 0) ? map[x+1][y-1]++ : map[x+1][y-1]+=0;
      (x-1 >= 0 && y-1 >= 0) ? map[x-1][y-1]++ : map[x-1][y-1]+=0;
      (x+2 <= 9) ? map[x+2][y]++ : map[x+2][y]+=0;
      (y+2 <= 9) ? map[x][y+2]++ : map[x][y+2]+=0;
      (x-2 >= 0) ? map[x-2][y]++ : map[x-2][y]+=0;
      (y-2 >= 0) ? map[x][y-2]++ : map[x][y-2]+=0;
    }    
  }
  maxi = map[0][0];
  for(int i = 0;i < 10;i++){
    for(int j = 0;j < 10;j++){
      if(map[i][j] == 0){
        white++;
      }
      if(maxi < map[i][j]){
        maxi = map[i][j];
      }
    }
  }
  cout << white << endl << maxi << endl;
  return 0;
}

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

//int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0};

int main(){
	int x, y, s;
	int board[10][10] = {{0}};
	while( ~scanf("%d,%d,%d", &x, &y, &s) ){
		if( s == 3 ){
			for(int i=-2; i<3; i++){
				for(int j=-2; j<3; j++){
					if( abs(i)+abs(j) < 3 && 0 <= x+j && x+j < 10 && 0 <= y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}else if( s == 2 ){
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( 0 <= x+j && x+j < 10 && 0 <= y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}else{
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( abs(i)+abs(j) < 2 && 0 <= x+j && x+j < 10 && 0 <= y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}
	}
	int max_c = 0, white = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if( board[i][j] == 0 ) white++;
			max_c = max(max_c, board[i][j]);
		}
	}
	cout << white << endl;
	cout << max_c << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)

using namespace std;

int main(void){
	int a[14][14]={};
	int x,y,size;
	int s,m;
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		x+=2;
		y+=2;
		a[x][y]++;
		a[x-1][y]++;
		a[x+1][y]++;
		a[x][y-1]++;
		a[x][y+1]++;
		if (size>1){
			a[x-1][y-1]++;
			a[x+1][y-1]++;
			a[x-1][y+1]++;
			a[x+1][y+1]++;
			if (size>2){
				a[x-2][y]++;
				a[x+2][y]++;
				a[x][y-2]++;
				a[x][y+2]++;
			}
		}
	}

	s=0; m=0;
	FOR(i,2,11){
		FOR(j,2,11){
			if (a[i][j]==0)
				s++;
			if (a[i][j]>m)
				m=a[i][j];
		}
	}
	cout << s << endl << m << endl;



	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int x,y,size;
	int paper[10][10] = { 0 };

	while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
		switch (size){
			case 1 : 	paper[x][y] += 1;
							paper[x-1][y] += 1;
							paper[x+1][y] += 1;
							paper[x][y-1] += 1;
							paper[x][y+1] += 1;
							break;

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

			case 3 : 	paper[x][y] += 1;
							paper[x-1][y] += 1;
							paper[x+1][y] += 1;
							paper[x][y-1] += 1;
							paper[x][y+1] += 1;
							paper[x-1][y-1] += 1;
							paper[x-1][y+1] += 1;
							paper[x+1][y-1] += 1;
							paper[x+1][y+1] += 1;
							paper[x-2][y] += 1;
							paper[x+2][y] += 1;
							paper[x][y-2] += 1;
							paper[x][y+2] += 1;
							break;
		}
	}
	int zcount = 0;
	int density = 0;

	for(int i = 0;i < 10;i++){
		for(int j = 0;j < 10;j++){
			if(paper[i][j] == 0){
				zcount++;
			}
			if(density < paper[i][j]){
				density = paper[i][j];
			}
		}
	}

	cout << zcount << endl << density << endl;
}