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 <cstdio>

int m[10][10] = { 0 };

bool inRange(int va) {
    return (0 <= va) && (va < 10);
}

void put(int x, int y, int s) {
    switch (s) {
    case 1:
        m[x][y]++;
        if (inRange(x - 1)) {
            m[x - 1][y]++;
        }
        if (inRange(x + 1)) {
            m[x + 1][y]++;
        }
        if (inRange(y - 1)) {
            m[x][y - 1]++;
        }
        if (inRange(y + 1)) {
            m[x][y + 1]++;
        }
        break;
    case 2:
        for (int i = x - 1; i <= x + 1; ++i) {
            for (int j = y - 1; j <= y + 1; ++j) {
                if (inRange(i) && inRange(j)) {
                    m[i][j]++;
                }
            }
        }
        break;
    case 3:
        put(x, y, 2);
        if (inRange(x - 2)) {
            m[x - 2][y]++;
        }
        if (inRange(x + 2)) {
            m[x + 2][y]++;
        }
        if (inRange(y - 2)) {
            m[x][y - 2]++;
        }
        if (inRange(y + 2)) {
            m[x][y + 2]++;
        }
        break;
    }
}

int main() {
    int inx[100] = { 0 };
    int iny[100] = { 0 };
    int ins[100] = { 0 };
    int c;

    for (c = 0; scanf("%d,%d,%d", &inx[c], &iny[c], &ins[c]) != EOF; ++c) {}

    for (int i = 0; i < c; ++i) {
        put(inx[i], iny[i], ins[i]);
    }

    int mx = 0;
    int counts = 0;
    for (int i = 0; i < 10; ++i) {
        for (int j = 0; j < 10; ++j) {
            int p = m[i][j];
            if (mx < p) {
                mx = p;
            }

            if (p == 0) {
                counts++;
            }
        }
    }

    printf("%d\n%d\n", counts, mx);

    return 0;
}

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

void Small_Ink( int a[14][14], int x, int y );
void Middle_Ink( int a[14][14], int x, int y );
void Large_Ink( int a[14][14], int x, int y );

int main()
{
    int x, y, size;
    char p;

    //本来は10*10だが、大きい配列を確保して、はみ出したところを無視すればよい
    int paper[14][14] = {};         //0で初期化

    while( cin >> x >> p >> y >> p >> size )
    {
        if( size == 1 )
            Small_Ink( paper, x + 2, y + 2 );
        else if( size == 2 )
            Middle_Ink( paper, x + 2, y + 2 );
        else
            Large_Ink( paper, x + 2, y + 2 );
    }

    int cnt = 0, max = 0;
    for( int i = 2; i < 12; i++ )
    {
        for( int j = 2; j < 12; j++ )
        {
            if( max < paper[i][j] )
                max = paper[i][j];
            if( paper[i][j] == 0 )
                cnt++;
        }
    }

    cout << cnt << endl << max << endl;

    return 0;
}

void Small_Ink( int a[14][14], int x, int y )
{
    a[x][y]++;
    a[x-1][y]++;
    a[x+1][y]++;
    a[x][y-1]++;
    a[x][y+1]++;
}

void Middle_Ink( int a[14][14], int x, int y )
{
    Small_Ink( a, x, y );
    a[x-1][y-1]++;
    a[x-1][y+1]++;
    a[x+1][y-1]++;
    a[x+1][y+1]++;
}

void Large_Ink( int a[14][14], int x, int y )
{
    Middle_Ink( a, x, y );
    a[x-2][y]++;
    a[x+2][y]++;
    a[x][y-2]++;
    a[x][y+2]++;
}

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

#define SIZE 10

using namespace std;

int map[SIZE][SIZE];

void drop(int x, int y) {
	if (x < 0 || y < 0 || x >= SIZE || y >= SIZE) return;

	map[x][y]++;
}

int main() {
	int x, y, s, count = 0, most = 0;

	while (scanf("%d,%d,%d", &x, &y, &s)) {
		x--;
		y--;
		drop(x, y);
		drop(x, y + 1);
		drop(x + 1, y);
		drop(x, y - 1);
		drop(x - 1, y);

		if (s > 1) {
			drop(x + 1, y + 1);
			drop(x + 1, y - 1);
			drop(x - 1, y - 1);
			drop(x - 1, y + 1);

			if (s > 2) {
				drop(x, y + 2);
				drop(x, y - 2);
				drop(x + 2, y);
				drop(x - 2, y);
			}
		}
	}

	for (int i = 0; i < SIZE; i++) {
		for (int j = 0; j < SIZE; j++) {
			if (map[i][j] > most) {
				most = map[i][j];
			}

			if (map[i][j] == 0) {
				count++;
			}
		}
	}

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