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()
{
	int paper[10][10] = {0};
	int x,y,s;
	char dummy;
	
	while ( cin >> x >> dummy >> y >> dummy >> s ) {
		switch (s) {
		case 1:
			paper[x][y]++;
			if (x>0) paper[x-1][y]++;
			if (x<9) paper[x+1][y]++;
			if (y>0) paper[x][y-1]++;
			if (y<9) paper[x][y+1]++;
			break;
		case 2:
			paper[x][y]++;
			if (x>0) {
				paper[x-1][y]++;
				if (y>0) paper[x-1][y-1]++;
				if (y<9) paper[x-1][y+1]++;
			}
			if (x<9) {
				paper[x+1][y]++;
				if (y>0) paper[x+1][y-1]++;
				if (y<9) paper[x+1][y+1]++;
			}
			if (y>0) paper[x][y-1]++;
			if (y<9) paper[x][y+1]++;
			break;
		case 3:
			if (x>1) paper[x-2][y]++;
			if (x<8) paper[x+2][y]++;
			if (y>1) paper[x][y-2]++;
			if (y<8) paper[x][y+2]++;
			paper[x][y]++;
			if (x>0) {
				paper[x-1][y]++;
				if (y>0) paper[x-1][y-1]++;
				if (y<9) paper[x-1][y+1]++;
			}
			if (x<9) {
				paper[x+1][y]++;
				if (y>0) paper[x+1][y-1]++;
				if (y<9) paper[x+1][y+1]++;
			}
			if (y>0) paper[x][y-1]++;
			if (y<9) paper[x][y+1]++;
			break;
		}
	}
	
	int zerocnt = 0;
	int maxdens = 0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (paper[i][j]==0) zerocnt++;
			if (maxdens < paper[i][j]) maxdens = paper[i][j];
		}
	}
	
	cout << zerocnt << endl << maxdens << endl;
	
	return 0;
}

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[i][j] = 0;
    }
  }
  while(scanf("%d,%d,%d",&x,&y,&size) !=EOF){
    if(x <0||y < 0||x >9 ||y >9){
      continue;
    }
    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 >9||ny <0||ny >9)
	  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];
      }
    }
  }
  for(int i = 0;i < 10;i++){
    for(int j = 0;j < 10;j++){
      cout <<board[i][j];
    }
    cout <<endl;
  }
  
  cout <<ans1<<endl;
  cout <<ans2<<endl;
  return 0;
}

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

int main() {
	int x,y,s;
	int p[14][14]={0};
	while(scanf("%d,%d,%d",&x,&y,&s)>0){
		x+=2;y+=2;
		p[x][y]+=1;
		p[x+1][y]+=1;p[x][y-1]+=1;
		p[x][y+1]+=1;p[x-1][y]+=1;
		if(s==1) continue;
		p[x+1][y+1]+=1;p[x+1][y-1]+=1;
		p[x-1][y+1]+=1;p[x-1][y+1]+=1;
		if(s==2) continue;
		p[x+2][y]+=1;p[x-2][y]+=1;
		p[x][y+2]+=1;p[x][y-2]+=1;
	}
	int cnt=0,max=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(p[j][i]==0) cnt++;
			if(max<p[j][i]) max=p[j][i];
		}
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
#include <vector>
#include <complex>
#include <cstdio>
using namespace std;

#define loop(i,a,b) for(int i=(a); i<int(b); i++)
#define rep(i,b) loop(i,0,b)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef complex<double> vec;

double cross(const vec& a, const vec& b) {
    return imag(conj(a)*b);
}

int dx1[] = {1,0,0,-1}; // tateyoko
int dy1[] = {0,1,-1,0};
int dx2[] = {1,1,-1,-1}; // naname
int dy2[] = {-1,1,-1,1};
inline bool in(int x, int y){
    return 0<=x  && 0<=y && x<10 && y<10;
}
int main(){
    vvi g(10,vi(10));
    int x,y,s;
    while(scanf("%d,%d,%d", &x,&y,&s)!=EOF){
        if(s==3){
            g[y][x]++;
            rep(d,4){
                for(int t=1; t<=2; t++){
                    int px=x+dx1[d]*t;
                    int py=y+dy1[d]*t;
                    if(in(px,py)) g[py][px]++;
                }
                int px=x+dx2[d];
                int py=y+dy2[d];
                if(in(px,py)) g[py][px]++;
            }
        }else if(s==2){
            rep(d,4){
                for(int t=1; t<=1; t++){
                    int px=x+dx1[d]*t;
                    int py=y+dy1[d]*t;
                    if(in(px,py)) g[py][px]++;
                }
                int px=x+dx2[d];
                int py=y+dy2[d];
                if(in(px,py)) g[py][px]++;
            }
        }else if(s==1){
            rep(d,4){
                for(int t=1; t<=1; t++){
                    int px=x+dx1[d]*t;
                    int py=y+dy1[d]*t;
                    if(in(px,py)) g[py][px]++;
                }
            }
        }
    }
    int z=0;
    int ans=-1;
    rep(i,10)rep(j,10){
        if(g[i][j]==0)z++;
        ans=max(ans,g[i][j]);
    }
    cout << z << "\n" << ans << endl;
}