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++: // AOJ Volume0-0026
// Dropping Ink

#include<bits/stdc++.h>
using namespace std;

int maps[10][10]={};

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

int main()
{
  int x,y,s;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    if(s==1){
      // サイズ：小
      for(int i=0;i<4;i++){
	int nx,ny;
	switch(i){
	case 0:
	  nx=x+dx[2];
	  ny=y+dy[2];
	  break;
	case 1:
	  nx=x+dx[5];
	  ny=y+dy[5];
	  break;
	case 2:
	  nx=x+dx[6];
	  ny=y+dy[6];
	  break;
	case 3:
	  nx=x+dx[9];
	  ny=y+dy[9];
	}
	if(nx>=0 && ny>=0 && nx<10 && ny<10){
	  maps[ny][nx]++;
	}
      }
    }else if(s==2){
      // サイズ：中
      for(int i=1;i<11;i++){
	if(i!=4 && i!=7){
	  int nx=x+dx[i];
	  int ny=y+dy[i];
	  if(nx>=0 && ny>=0 && nx<10 && ny<10){
	    maps[ny][nx]++;
	  }
	}
      }
    }else{
      // サイズ：大
      for(int i=0;i<12;i++){
	int nx=x+dx[i];
	int ny=y+dy[i];
	if(nx>=0 && ny>=0 && nx<10 && ny<10){
	  maps[ny][nx]++;
	}
      }
    }
  }
    
  int m=0;
  int cnt=0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      m=max(m,maps[i][j]);
      if(maps[i][j]==0) cnt++;
    }
  }
  
  cout << cnt << endl;
  cout << m << endl;

  return 0;
}

C++: #include <iostream>

using namespace std;

const int SMALL = 1;
const int MIDDLE = 2;
const int LARGE = 3;
int paper[10][10] = {0};

void Dropping_Ink(int x, int y, int size)
{
		paper[y][x]++;
		if(x-1 > -1)    paper[y][x-1]++;
		if(x+1 < 10)    paper[y][x+1]++;
		if(y-1 > -1)    paper[y-1][x]++;
		if(y+1 < 10)    paper[y+1][x]++;

		if(size >= MIDDLE)
		{
			if(x-1 > -1)
			{
				if(y-1 > -1)    paper[y-1][x-1]++;
				if(y+1 < 10)    paper[y+1][x-1]++;
			}
			if(x+1 < 10)
			{
				if(y-1 > -1)    paper[y-1][x+1]++;
				if(y+1 < 10)    paper[y+1][x+1]++;
			}
		}

		if(size == LARGE)
		{
			if(x-2 > -1)    paper[y][x-2]++;
			if(x+2 < 10)    paper[y][x+2]++;
			if(y-2 > -1)    paper[y-2][x]++;
			if(y+2 < 10)    paper[y+2][x]++;
		}
}

int main()
{
	int x, y, size, white, color;
	char c[2];

	while(cin >> x >> c[0] >> y >> c[1] >> size)
	{
		if(cin.eof())    break;

		Dropping_Ink(x, y, size);	
	}

	white = 0;
	color = 0;	
	
	for(int i=0; i<10; i++)
	{
		for(int j=0; j<10; j++)
		{
			if(paper[i][j] == 0)    white++;
			if(paper[i][j] > color)    color = paper[i][j];
		}
	}

	cout << white << endl << color << endl;
	
	return 0;
}

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

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


#define X real()
#define Y imag()
typedef complex<double> P;

int main(){
	const int N = 10;
	int masu[N][N]={0};
	int a,b,c;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		string hit[4][5]={
			{"","","","",""},
			{
				"00000",
				"00100",
				"01110",
				"00100",
				"00000",
			},
			{
				"00000",
				"01110",
				"01110",
				"01110",
				"00000",
			},
			{
				"00100",
				"01110",
				"11111",
				"01110",
				"00100",
			},
		};
		
		a-=2;
		b-=2;
		
		rep(i,5){
			rep(j,5){
				int x = a+i;
				int y = b+j;
				if(x<0 || y<0 || x>=N || y>=N)continue;
				masu[y][x] += hit[c][i][j]-'0';
			}
		}
		
	}
	int z = 0;
	int p = 0;
	
	rep(i,N)rep(j,N){
		if(masu[i][j]==0)z++;
		p=max(p,masu[i][j]);
	}
	
	printf("%d\n%d\n",z,p);
	
}

C++: #include<iostream>
#include<stdio.h>

int paper[10][10];
int vecx[] = { 0, 1, 0, -1 }, vecy[] = { -1, 0, 1, 0 };

int main()
{
	int x, y, size;
	
	while( scanf( "%d,%d,%d", &x, &y, &size ) != EOF ){
		switch( size ){
			case 1:
				paper[x][y]++;
				for( int i = 0; i < 4; i++ ){
					int nx = x + vecx[i], ny = y + vecy[i];
					
					if( nx >= 0 && nx < 10 && y >= 0 && y < 10 ){
						paper[nx][ny]++;
					}
				}
				break;
			case 2:
			        for( int i = -1; i <= 1; i++ ){
					for( int j = -1; j <= 1; j++ ){
						if( x + i >= 0 && x + i < 10 && y + j >= 0 && y + j < 10 ){
							paper[x+i][y+j]++;
						}
					}
				}
				
				break;
			case 3:
				for( int i = -1; i <= 1; i++ ){
					for( int j = -1; j <= 1; j++ ){
						if( x + i >= 0 && x + i < 10 && y + j >= 0 && y + j < 10 ){
							paper[x+i][y+j]++;
						}
					}
				}
				
				for( int i = 0; i < 4; i++ ){
					int nx = x + vecx[i] * 2, ny = y + vecy[i] * 2;
					
					if( nx >= 0 && nx < 10 && y >= 0 && y < 10 ){
						paper[nx][ny]++;
					}
				}
				break;
		}
	}
	
	int a = 0, b = 0;
	
	for( int i = 0; i < 10; i++ ){
		for( int j = 0; j < 10; j++ ){
			if( !paper[i][j] ){
				a++;
			}
			else{
			 	b = std::max( b, paper[i][j] );
			}
		}
	}
	
	std::cout << a << std::endl;
	std::cout << b << std::endl;

 	return 0;
}

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

void ink(int,int,int);
void change(int,int,int);

char paper[10][10]={0};

int main(void){
	int white=0,max_ink=0;

	for(int x,y,size;scanf("%d,%d,%d",&x,&y,&size)!=EOF;)
		ink(x,y,size);

	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++)
			if(!paper[i][j])
				white++;
			else
				max_ink=std::max(max_ink,int(paper[i][j]));

	printf("%d\n%d\n",white,max_ink);
	return 0;
}

void ink(int x,int y,int size){
	switch(size){
		case 1:
			ink(x,y,2);
			for(int i=-1;i<=1;i+=2)
				for(int j=-1;j<=1;j+=2)
					change(x+i,y+j,-1);
			break;
		case 2:
			for(int i=-1;i<=1;i++)
				for(int j=-1;j<=1;j++)
					change(x+i,y+j,1);
			break;
		case 3:
			ink(x,y,2);
			change(x-2,y,1);
			change(x+2,y,1);
			change(x,y-2,1);
			change(x,y+2,1);
			break;
	}
}

void change(int x,int y,int inc){
	if(x>=0&&x<10&&y>=0&&y<10)
		paper[x][y]+=inc;
}