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 };
	bool flag[10][10] = { false };
	int cnt = 100;
	int x, y, size;
	char s, d;
	int ma = 0;
	while (cin >> x >> s >> y >> d >> size){
		
		if (size == 1){
			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[xx][yy]++;
					if (!flag[xx][yy]){
						flag[xx][yy] = true;
						cnt--;
					}
					ma = max(ma, map[xx][yy]);
				}
			}
		}
		else if (size == 2){
			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[xx][yy]++;
					if (!flag[xx][yy]){
						flag[xx][yy] = true;
						cnt--;
					}
					ma = max(ma, map[xx][yy]);
				}
			}
		}
		else {
			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[xx][yy]++;
					if (!flag[xx][yy]){
						flag[xx][yy] = true;
						cnt--;
					}
					ma = max(ma, map[xx][yy]);
				}
			}
			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[xx][yy]++;
					if (!flag[xx][yy]){
						flag[xx][yy] = true;
						cnt--;
					}
					ma = max(ma, map[xx][yy]);
				}
			}
		}
	}
	cout << cnt << endl;
	cout << ma << endl;
}

C++: #include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};
int board[15][15];
int x,y,size;
int nx,ny;
int ans1,ans2;
int main()
{
  ans1 = 0;
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      board[j][i] = 0;
    }
  }
  while(scanf("%d,%d,%d",&x,&y,&size) !=EOF){
    if(size ==1){
      board[y][x] +=1;
      for(int i = 0;i < 4;i++){
	nx = x +dx[i];
	ny = y +dy[i];
	if(nx <0 ||nx >10||ny <0||ny >10)
	  continue;
	board[ny][nx] +=1;
      }
    }else if(size ==2){
      for(int i = -1;i <=1;i++){
	for(int j = -1;j <=1;j++){
	  nx = x +j;
	  ny = y +i;
	  if(nx <0 ||nx >=10||ny <0||ny >=10)
	    continue;
	  board[ny][nx] +=1;
	}
      }
    }else if(size ==3){
      for(int i = -2;i <=2;i++){
	for(int j = -2;j <=2;j++){
	  if(i == -2&&j ==0){
	    board[y+i][x] +=1;
	  }else if(i == -1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i == 0){
	    board[y+i][x+j] +=1;
	  }else if(i == 1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i ==2&&j ==0){
	    board[y+i][x] +=1;
	  }
	}
      }
    }
  }
  ans2 = 0; 
    for(int i = 0;i <10;i++){
      for(int j = 0;j < 10;j++){
	if(board[i][j] == 0){
	  ans1++;
	}
	if(board[i][j] > ans2){
	  ans2 = board[i][j];
	}
      }
    }
  cout <<ans1<<endl;
  cout <<ans2<<endl;
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <queue>
#include <set>
#include <algorithm>

using namespace std;

int paper[10][10];

bool inField(int argX, int argY) {
	if (argX < 0 || argX > 9 || argY < 0 || argY > 9) return false;
	return true;
}

int main() {
	string input = "";
	cin >> input;
	
	int dx[13] = { 0, 0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2 };
	int dy[13] = { 0, -1, 0, 1, 0, -1, 1, 1, -1, -2, 0, 2, 0 };
	
	for (int x = 0; x < 10; x++) {
		for (int y = 0; y < 10; y++) {
			paper[x][y] = 0;
		}
	}
	
	while (input.size() > 0) {
		
		int dropX = input[0] - '0';
		int dropY = input[2] - '0';
		int dropSize = input[4] - '0';
		int dropNum;
		
		if (dropSize == 1) dropNum = 5;
		else if (dropSize == 2) dropNum = 9;
		else dropNum = 13;
		
		for (int i = 0; i < dropNum; i++) {
			if (!inField(dropX + dx[i], dropY + dy[i])) continue;
			
			paper[dropX + dx[i]][dropY + dy[i]]++;
		}
		
		input = "";
		cin >> input;
	}
	
	int blankNum = 0;
	int maxDensity = 0;
	for (int x = 0; x < 10; x++) {
		for (int y = 0; y < 10; y++) {
			if (paper[x][y] == 0) {
				blankNum++;
			} else if (paper[x][y] > maxDensity) {
				maxDensity = paper[x][y];
			}
		}
	}
	
	cout << blankNum << endl;
	cout << maxDensity << endl;
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#define rep(i,n) for(int i=0;i < n;i++)

using namespace std;

int p[10][10];
int cnt = 0,Max = 0;
void ink(int x,int y){
  if(0<=x && x < 10|| 0<=y && y<10)p[x][y]++;
}

int main(){

    rep(i,10)rep(j,10){
      p[i][j] = 0;
    }

  while(1){

    int x,y,size;

    scanf("%d,%d,%d",&x,&y,&size);
    if(cin.eof())break;
    if(size == 1){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
    }else  if(size == 2){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
    }else  if(size == 3){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
      ink(x+2,y);
      ink(x-2,y);
      ink(x,y+2);
      ink(x,y-2);
    }
     cnt =Max = 0;
    rep(i,10)rep(j,10){
      if(p[i][j]==0)cnt++;
      Max = max(Max,p[i][j]);
    }
}
    cout << cnt <<"\n" << Max << endl;


  return 0;
}