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 <stdio.h>

int field[15][15];

int main(void)
{
	int x, y;
	int size;
	int sum = 0, max = 0;
	
	while (scanf("%d %d %d", &x, &y, &size) != EOF){
		
		if (size > 0){
			field[y + 2][x + 2]++;
			field[y + 3][x + 2]++;
			field[y + 2][x + 3]++;
			field[y + 2][x + 1]++;
			field[y + 2][x + 2]++;
		}
		if (size > 1){
			field[y + 1][x + 1]++;
			field[y + 3][x + 3]++;
			field[y + 1][x + 3]++;
			field[y + 3][x + 1]++;
		}
		if (size > 2){
			field[y][x + 2]++;
			field[y + 4][x + 2]++;
			field[y + 2][x]++;
			field[y + 2][x + 4]++;
		}
	}
	
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (field[i][j] == 0){
				sum++;
			}
			if (field[i][j] > max){
				max = field[i][j];
			}
		}
	}
	return (0);
}

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

//4方向ベクトル→↑←↓
const int px[4] ={1,0,-1,0};
const int py[4] ={0,-1,0,1};

int board[15][15];
int x,y,size;
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 >10 ||y >10){
      continue;
    }
    if(size ==1){
      board[y][x] +=1;
      for(int j = 0;j < 4;j++){
	int nx = x + px[j];
	int ny = y + py[j];
	if(nx <0 ||ny < 0||nx > 10||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++){
	 int nx = x +j;
	 int 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<cstdio>

using namespace std;

int main(){
 int pa[14][14];
 int i,j;
 int x,y,size;
 int da;
 int not;
 da=not=0;
 for(i=0;i<14;i++){
  for(j=0;j<14;j++)
   pa[i][j]=0;
 }

 while(scanf("%d,%d,%d",&x,&y,&size)!=-1){
  x=x+2;
  y=y+2;
  switch(size){
   case 1:
    pa[y][x]++;
    pa[y-1][x]++;
    pa[y+1][x]++;
    pa[y][x-1]++;
    pa[y][x+1]++;
    break;
   case 2:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++){
      pa[y+i][x+j]++;
		}
    }
    break;
   case 3:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++){
      pa[y+i][x+j]++;
		}
    }
    pa[y-2][x]++;
    pa[y+2][x]++;
    pa[y][x-2]++;
    pa[y][x+2]++;
    break;
   default:break;
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]==0){
    not++;
	}
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]>da){
    da=pa[i][j];
	}
  }
 }
 printf("%d\n%d\n",not,da);
 return 0;
}

C++: //累積和したほうが簡単。最後に配列を上から下に舐める。
//(配列を舐めるときに累積和の挙動をして、元のデータが復元される)
#include<stdio.h>
#include<iostream>
using namespace std;

int data[10][10];
char str[6];
int ink[3][5] = { {-1,0,1,0,-1},{-1,1,1,1,-1},{0,1,2,1,0} };
int abs(int x){return (x>0?x:-x);}

void drop( int y,int x,int size )
{
	size--;
	
	int i;
	for( i = 0;i < 5;i++ ){
		if( ink[size][i] == -1 || x+i-2 < 0 || x+i-2 > 9 )
			continue;
			
		data[max(0,y-ink[size][i])][x+i-2]++;
		if( y+ink[size][i]+1 > 9 )
			continue;
		
		data[y+ink[size][i]+1][x+i-2]--;
	}
}

int main()
{
	int x,y,size;
	int i,j;
	while( scanf("%s",str) != -1 )
	{
		if( str[0] == '\n' || str[0] == '\r' )
			continue;
		x = 	str[0]-'0';
		y = 	str[2]-'0';
		size = 	str[4]-'0';
		
		drop( y,x,size );
	}
	
	//iが横,jが縦
	for( i = 0;i < 10;i++ ){
		int rui = 0;
		for( j = 0;j < 10;j++ ){
			rui += data[j][i];
			data[j][i] = rui;
		}
	}
	
	int ans1 = 0,ans2 = 0;
	
	for( i = 0;i < 10;i++ ){
		for( j = 0;j < 10;j++ ){
			if( data[i][j] == 0 )
				ans1++;
			else
				ans2 = max(ans2, data[i][j]);
		}
	}
	printf("%d\n%d\n",ans1,ans2);
	return 0;
}