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 x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q))
	{
		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 (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 <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapii map<int, int>
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()
#define minit(a, i) memset(a, i, sizeof(a));

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

typedef long long ll;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }

int area[10][10];

int main() {
	minit(area, 0);
	
	int x, y, s;
	while (~scanf("%d,%d,%d", &x, &y, &s)) {
		area[x][y]++;
		switch (s) {
			case 1:
				if (x-1 >= 0) area[x-1][y]++;
				if (x+1 < 10) area[x+1][y]++;
				if (y-1 >= 0) area[x][y-1]++;
				if (y+1 < 10) area[x][y+1]++;
				break;
			case 2:
				if (x-1 >= 0) {
					area[x-1][y]++;
					if (y-1 >= 0) area[x-1][y-1]++;
					if (y+1 >= 0) area[x-1][y+1]++;
				}
				if (x+1 < 10) {
					area[x+1][y]++;
					if (y-1 >= 0) area[x+1][y-1]++;
					if (y+1 < 10) area[x+1][y+1]++;
				}
				if (y-1 >= 0) area[x][y-1]++;
				if (y+1 < 10) area[x][y+1]++;
				break;
			case 3:
				if (x-1 >= 0) {
					area[x-1][y]++;
					if (y-1 >= 0) area[x-1][y-1]++;
					if (y+1 >= 0) area[x-1][y+1]++;
				}
				if (x+1 < 10) {
					area[x+1][y]++;
					if (y-1 >= 0) area[x+1][y-1]++;
					if (y+1 < 10) area[x+1][y+1]++;
				}
				if (y-1 >= 0) area[x][y-1]++;
				if (y+1 < 10) area[x][y+1]++;
				if (x-2 >= 0) area[x-2][y]++;
				if (x+2 < 10) area[x+2][y]++;
				if (y-2 >= 0) area[x][y-2]++;
				if (y+2 < 10) area[x][y+2]++;
				break;
			default:
				break;
		}
	}
	
	int n0, m;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			m = max(m, area[i][j]);
			if (area[i][j]==0) n0++;
		}
	}
	
	cout << n0 << endl << m << endl;
	
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)

using namespace std;

int main(void){
	int a[14][14]={};
	int x,y,size;
	int s,m;
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		x+=2;
		y+=2;
		a[x][y]++;
		a[x-1][y]++;
		a[x+1][y]++;
		a[x][y-1]++;
		a[x][y+1]++;
		if (size>1){
			a[x-1][y-1]++;
			a[x+1][y-1]++;
			a[x-1][y+1]++;
			a[x+1][y+1]++;
			if (size>2){
				a[x-2][y]++;
				a[x+2][y]++;
				a[x][y-2]++;
				a[x][y+2]++;
			}
		}
	}

	s=0; m=0;
	FOR(i,2,11){
		FOR(j,2,11){
			if (a[i][j]==0)
				s++;
			if (a[i][j]>m)
				m=a[i][j];
		}
	}
	cout << s << endl << m << endl;



	return 0;
}

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

using namespace std;

int paper[14][14] = {0};

void drop(int n, int m, int l)
{
    paper[n + 2][m + 2]++;
    if (l == 3)
    {
        paper[n + 2][m]++;
        paper[n + 2][m + 4]++;
        paper[n][m + 2]++;
        paper[n + 4][m + 2]++;
    }
    if (l == 2)
    {
        paper[n + 3][m + 1]++;
        paper[n + 3][m + 3]++;
        paper[n + 1][m + 1]++;
        paper[n + 1][m + 3]++;
    }
    paper[n + 2][m + 1]++;
    paper[n + 2][m + 3]++;
    paper[n + 1][m + 2]++;
    paper[n + 3][m + 2]++;
    return;
}

int n, m, l;

int main()
{
    while (scanf("%d,%d,%d\n", &n, &m, &l) != EOF)
    {
        scanf("%d,%d,%d\n", &n, &m, &l);
        drop(n, m, l);
        /* for (int i = 2; i < 12; i++)
        {
            for (int j = 2; j < 12; j++)
            {
                printf(" %d", paper[i][j]);
            }
            printf("\n");
        } */
        n--;
    }

    int zero = 0, max = 0;
    for (int i = 2; i < 12; i++)
    {
        for (int j = 2; j < 12; j++)
        {
            if (paper[i][j] == 0)
            {
                zero++;
            }
            else if (paper[i][j] > max)
            {
                max = paper[i][j];
            }
        }
    }
    printf("%d\n%d\n", zero, max );
    return 0;
}