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 <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };
const int dx2[] = { -1, -1, 1, 1 }; const int dy2[] = { -1, 1, 1, -1 };
int main() {
	string s;
	int cell[10][10]={0};
	while (getline(cin, s)){
		if (s.empty())break;
		int x, y, size;
		x = s[0]-'0';
		y = s[2] - '0';
		size = s[4] - '0';
		switch (size)
		{
		case 3:
			REP(i, 4){
				if (0 <= x + dx[i] * 2 && x + dx[i] * 2 <= 9 && 0 <= y + dy[i] * 2 && y + dy[i] * 2 <= 9)
					cell[x + dx[i] * 2][y + dy[i] * 2]++;
			}
		case 2:
			REP(i, 4){
				if (0 <= x + dx2[i]  && x + dx2[i]  <= 9 && 0 <= y + dy2[i]  && y + dy2[i]  <= 9)
					cell[x + dx2[i] ][y + dy2[i]]++;
			}
		case 1:
			REP(i, 4){
				if (0 <= x + dx[i] && x + dx[i] <= 9 && 0 <= y + dy[i] && y + dy[i] <= 9)
					cell[x + dx[i]][y + dy[i]]++;
			}
			break;
		}
	}
	int maxb=0;
	int count=0;
	REP(i,10){
		REP(j,10){
			if(cell[i][j]==0)
			count++;
			maxb=max(maxb,cell[i][j]);
		}
	}
	cout<<count<<endl<<maxb<<endl;
}

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

using namespace std;

int main()
{
	int hani[14][14] = { 0 }, x, y, size;
	int white = 0, max_num = 0;
	char tmp;

	while ( cin >> x >> tmp >> y >> tmp >> size )
	{
		x = x + 2;
		y = y + 2;
		if ( size == 1 )
		{
			hani[x][y] = hani[x][y] + 1;
			hani[x-1][y] = hani[x-1][y] + 1;
			hani[x+1][y] = hani[x+1][y] + 1;
			hani[x][y-1] = hani[x][y-1] + 1;
			hani[x][y+1] = hani[x][y+1] + 1;
		}
		else if ( size == 2 )
		{
			hani[x][y] = hani[x][y] + 1;
			hani[x-1][y] = hani[x-1][y] + 1;
			hani[x+1][y] = hani[x+1][y] + 1;
			hani[x][y-1] = hani[x][y-1] + 1;
			hani[x][y+1] = hani[x][y+1] + 1;
			
			hani[x-1][y-1] = hani[x-1][y-1] + 1;
			hani[x+1][y-1] = hani[x+1][y-1] + 1;
			hani[x-1][y+1] = hani[x-1][y+1] + 1;
			hani[x+1][y+1] = hani[x+1][y+1] + 1;
		}
		else if ( size == 3 )
		{
			hani[x][y] = hani[x][y] + 1;
			hani[x-1][y] = hani[x-1][y] + 1;
			hani[x+1][y] = hani[x+1][y] + 1;
			hani[x][y-1] = hani[x][y-1] + 1;
			hani[x][y+1] = hani[x][y+1] + 1;
			
			hani[x-1][y-1] = hani[x-1][y-1] + 1;
			hani[x+1][y-1] = hani[x+1][y-1] + 1;
			hani[x-1][y+1] = hani[x-1][y+1] + 1;
			hani[x+1][y+1] = hani[x+1][y+1] + 1;

			hani[x-2][y] = hani[x-2][y] + 1;
			hani[x][y-2] = hani[x][y-2] + 1;
			hani[x+2][y] = hani[x+2][y] + 1;
			hani[x][y+2] = hani[x][y+2] + 1;
		}
	}

	for ( int i = 2 ; i < 12 ; i = i + 1 )
	{
		for ( int j = 2 ; j < 12 ; j = j + 1 )
		{
			if ( hani[i][j] == 0 )
			{
				white = white + 1;
			}
			max_num = max( max_num, hani[i][j] );
		}
	}

	cout << white << endl;
	cout << max_num << endl;

	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;k<5;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==1){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==2){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==3){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			
			if(y-2>=0)paper[y-2][x]++;
			if(y+2<10)paper[y+2][x]++;
			if(x+2<10)paper[y][x+2]++;
			if(x-2>=0)paper[y][x-2]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			printf("%d ",paper[i][j]);
		}
		puts("");
	}
	printf("%d\n%d\n",c,max);
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){
	int val;
	while(cin >> val)
		cerr << val << endl;

	return 0;
}