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>
main(){int p[14][14],x,y,a,m=0;std::string s;for(x=0;x<14;x++)for(y=0;y<14;y++)p[x][y]=0;while(std::cin>>s){x=s.at(0)-45;y=s.at(2)-45;a=s.at(4)-48;p[x][y]++,p[x-1][y]++,p[x+1][y]++,p[x][y-1]++,p[x][y+1]++;if(a>1)p[x-1][y-1]++,p[x+1][y-1]++,p[x-1][y+1]++,p[x+1][y+1]++;if(a>2)p[x-2][y]++,p[x][y-2]++,p[x+2][y]++,p[x][y+2]++;}for(x=3,a=0;x<13;x++)for(y=3;y<13;y++)p[x][y]==0?a++:0,p[x][y]>m?m=p[x][y]:0;std::cout<<a<<"\n"<<m<<"\n";}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>

using namespace std;

int main(){
	int a[20][20];
	for(int i = 0;i < 20;i++){
		for(int j = 0;j < 20;j++){
			a[i][j] = 1000;
		}
	}
	for(int i = 5;i < 15;i++){
		for(int j = 5;j < 15;j++){
			a[i][j] = 0;
		}
	}
	int x, y, size;
	char b, c;
	int count = 0, hold = 0;
	while(cin >> x >> b >> y >> c >> size){
		int X = x+5, Y = y+5;
		if(size == 1){
			a[Y][X]++;
			a[Y+1][X]++;
			a[Y][X+1]++;
			a[Y-1][X]++;
			a[Y][X-1]++;
		}
		else if(size == 2){
			a[Y][X]++;
			a[Y+1][X]++;
			a[Y][X+1]++;
			a[Y-1][X]++;
			a[Y][X-1]++;
			a[Y+1][X+1]++;
			a[Y-1][X+1]++;
			a[Y-1][X-1]++;
			a[Y+1][X-1]++;
		}
		else if(size == 3){
			a[Y][X]++;
			a[Y+1][X]++;
			a[Y][X+1]++;
			a[Y-1][X]++;
			a[Y][X-1]++;
			a[Y+1][X+1]++;
			a[Y-1][X+1]++;
			a[Y-1][X-1]++;
			a[Y+1][X-1]++;
			a[Y-2][X]++;
			a[Y][X-2]++;
			a[Y+2][X]++;
			a[Y][X+2]++;
		}
		/*for(int i = 5;i < 15;i++){
			for(int j = 5;j < 15;j++){
				cout << a[i][j];
			}
			cout << endl;
		}
		cout << endl;*/

		count = 0, hold = 0;
		for(int i = 5;i < 15;i++){
			for(int j = 5;j < 15;j++){
				if(a[i][j] == 0) count++;
				else if(hold < a[i][j]) hold = a[i][j];
			}
		}

	}
	cout << count << endl;
	cout << hold << endl;
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find(all(v), i) != (v).end())
#define ERASE(v,i) (v).erase(remove(all(v), i), (v).end())
#define INDEX(v,i) (find(all(v), i) - (v).begin())
#define rep(i,n) for(int i = 0; i < (int)n; ++i)
#define debug(x) cerr << #x << " = " << (x) << endl;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

const int INF = 100000000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

int main() {
	vector<P> small;
	vector<P> midium;
	vector<P> big;
	{
		small.pb(mp(0, -1));
		small.pb(mp(0, 1));
		small.pb(mp(1, 0));
		small.pb(mp(-1, 0));
	}
	{
		midium.pb(mp(-1, -1));
		midium.pb(mp(0, -1));
		midium.pb(mp(1, -1));
		midium.pb(mp(-1, 0));
		midium.pb(mp(1, 0));
		midium.pb(mp(-1, 1));
		midium.pb(mp(0, 1));
		midium.pb(mp(1, 1));
	}
	{
		big.pb(mp(-2, 0));
		big.pb(mp(-1, -1));
		big.pb(mp(-1, 0));
		big.pb(mp(-1, 1));
		big.pb(mp(0, -2));
		big.pb(mp(0, -1));
		big.pb(mp(0, 1));
		big.pb(mp(0, 2));
		big.pb(mp(1, -1));
		big.pb(mp(1, 0));
		big.pb(mp(1, 1));
		big.pb(mp(2, 0));
	}
	int field[10][10];
	memset(field, 0, sizeof field);
	for(int x, y, size; ~scanf(" %d,%d,%d", &x, &y, &size);) {
		vector<P> drop;
		if(size == 1) drop = small;
		else if(size == 2) drop = midium;
		else drop = big;
		for(int i = 0, n = drop.size(); i < n; i++) {
			int nx = x + drop[i].first;
			int ny = y + drop[i].second;
			if(0 <= nx && nx < 10 && 0 <= ny && ny < 10) {
				field[nx][ny]++;
			}
		}
	}
#if 0
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			printf("%d", field[i][j]);
		}
		puts("");
	}
#endif
	int white = 0;
	int most = 0;
	rep(l, 10) {
		white += count(field[l], field[l] + 10, 0);
		most = max(most, *max_element(field[l], field[l] + 10));
	}
	printf("%d\n%d\n", white, most);
	return 0;
}

C++: #include <stdio.h>

#pragma warning(disable : 4996)

int x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q), x--, y--)
	{
		if (q == 1)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (-1 <= i + j && i + j <= 1)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}

		if (q == 2)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
					{
						ok[y + i][x + j]++;
					}
				}
			}
		}

		if (q == 3)
		{
			for (int i = -2; i <= 2; i++)
			{
				for (int j = -2; j <= 2; j++)
				{
					if (-2 <= i + j && i + j <= 2)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}
	}

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (ok[i][j] == 0)
			{
				r1++;
			}

			if (ok[i][j] > r2)
			{
				r2 = ok[i][j];
			}
		}
	}

	printf("%d\n", r1);
	printf("%d\n", r2);

	return 0;
}

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

int f[10][10];
void solve(){

}
int dx[] = {1,0,-1,0,1,1,-1,-1,2,0,-2,0};
int dy[] = {0,1,0,-1,1,-1,1,-1,0,2,0,-2};
int cnt, d;
void ink(int x, int y, int s){
  for(int i = 0; i < 4*s; i++){
    int nx = dx[i] + x;
    int ny = dy[i] + y;
    if(nx < 0 || nx >= 10 || ny < 0 || ny >= 10)continue;  
    f[ny][nx]++;
    if(f[ny][nx] == 1)cnt++;
    d = max(d, f[ny][nx]);
  }
}
int main(){
  int x,y,size;
  cnt = d = 0;
  char c;
  memset(f, 0, sizeof(f));
  while(cin >> x >> c >> y >> c >> size){
    ink(x,y,size);
  }
  cout << 100 - cnt << endl << d << endl;
  return 0;
}