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>
#include <cstring>
#include <cstdlib>

char *inputStr(char *str, int len) {
	char *rtn;
	if ((rtn = fgets(str, len, stdin)) == NULL) { return NULL; }
	if (str[(len = (strnlen(str, len) - 1))] == '\n') {
		str[len] = '\0';
	} else {
		fflush(stdin);
	}
	return rtn;
}

int inputXYS(int &x, int &y, int &siz) {
	char str[8], *ptok;
	if (inputStr(str, sizeof(str) / sizeof(str[0])) == NULL) { return 1; }
	if ((ptok = strtok(str, ",")) != NULL) {
		x = atoi(ptok);
		if ((ptok = strtok(NULL, ",")) != NULL) {
			y = atoi(ptok);
			if ((ptok = strtok(NULL, ",")) != NULL) {
				siz = atoi(ptok);
			} else {
				return 1;
			}
		} else {
			return 1;
		}
	} else {
		return 1;
	}
	return 0;
}

int main() {
	int bitmap[10][10], max = 0;
	int white = 10 * 10;
	int cx, cy, size, mx, my, i;
	static const int inkX[] = {0,1,0,-1,0,1,-1,-1,1,2,0,-2,0};
	static const int inkY[] = {0,0,1,0,-1,1,1,-1,-1,0,2,0,-2};
	static const int inkN[] = {5, 9, 13};
	for (cx = 0; cx < 10; ++cx) {
		for (cy = 0; cy < 10; ++cy) {
			bitmap[cy][cx] = 0;
		}
	}
	while (inputXYS(cx, cy, size) == 0) {
		for (i = 0; i < inkN[size - 1]; ++i) {
			mx = cx + inkX[i];
			my = cy + inkY[i];
			if (mx < 0 || mx >= 10 || my < 0 || my >= 10) { continue; }
			if (bitmap[my][mx] == 0) {
				--white;
			}
			++bitmap[my][mx];
			if (bitmap[my][mx] > max) {
				max = bitmap[my][mx];
			}
		}
	}
	printf("%d\n%d\n", white, max);
	return 0;
}

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

int main(){
    int grid[14][14];
    int s[4][2]={{0,-1},{0,1},{-1,0},{1,0}};
    int m[4][2]={{-1,-1},{-1,1},{1,-1},{1,1}};
    int l[4][2]={{0,-2},{0,2},{-2,0},{2,0}};
    int x, y, size;
    int i, j;
    int max=0;
    int blank=0;
    char comma;
    for(i=0;i<14;i++){
        for(j=0;j<14;j++){
            grid[i][j] = 0;
        }
    }
    while(cin >> x >> comma >> y >> comma >> size){
        x += 2;
        y += 2;
        grid[x][y] += 1;
        for(i=0;i<4;i++){
            grid[x+s[i][0]][y+s[i][1]] += 1;
        }
        if(size > 1){
            for(i=0;i<4;i++){
                grid[x+m[i][0]][y+m[i][1]] += 1;
            }
            if(size > 2){
                for(i=0;i<4;i++){
                    grid[x+l[i][0]][y+l[i][1]] += 1;
                }
            }
        }
        for(i=2;i<12;i++){
            for(j=2;j<12;j++){
                if(grid[i][j] > max){
                    max = grid[i][j];
                }else if(grid[i][j] == 0){
                    blank += 1;
                }
            }
        }
        cout << blank << endl;
        blank = 0;
        cout << max << endl;
    }
    return 0;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>
#include <cmath>
#include <climits>

using namespace std;

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

typedef vector<int> vi;

int main()
{
	int field[10][10];
	rep(i, 10)
		fill(field[i], field[i]+10, 0);

	int deepest = 0;
	int ans = 100;
	int x, y, s;
	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		reep(i, -2, 3) reep(j, -2, 3){
			int py = i+y, px = j+x;
			if(py<0 || px<0 || 10<=py || 10<=px)
				continue;
			if(abs(i)+abs(j) >= 3)
				continue;
			if(s!=3 && (abs(i)==2 || abs(j)==2))
				continue;
			if(s==1 && abs(i)+abs(j)>=2)
				continue;

			ans -= !field[py][px];
			deepest = max(deepest, ++field[py][px]);
		}
	}
	printf("%d\n%d\n", ans, deepest);

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

#define DEBUG 0

using namespace std;

struct INKI{
	int x;
	int y;
	int size;
};

int main(){
	int map[10][10];

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

	INKI tmp;
	while( scanf("%d,%d,%d", &tmp.x, &tmp.y, &tmp.size) ){
		if(tmp.size == 3){
			for(int i = -2; i <= 2; i++){
				if(tmp.y + i >= 0 && tmp.y + i < 10){
					map[tmp.y + i][tmp.x]++;
				}
				if(tmp.x + i >= 0 && tmp.x + i < 10){
					map[tmp.y][tmp.x + i]++;
				}
			}
			map[tmp.y][tmp.x]--;
			for(int i = -1; i <= 1; i += 2){
				if(tmp.y + i >= 0 && tmp.y + i < 10){
					for(int j = -1; j <= 1; j += 2){
						if(tmp.x + j >= 0 && tmp.x + j < 10){
							map[tmp.y + i][tmp.x + j]++;
						}
					}
				}
			}
		}
		else if(tmp.size == 2){
			for(int i = tmp.y - 1; i <= tmp.y + 1; i++){
				if(i >= 0 && i < 10){
					for(int j = tmp.x - 1; j <= tmp.x + 1; j++){
						if(j >= 0 && j < 10){
							map[i][j]++;
						}
					}
				}
			}
		}
		else if(tmp.size == 1){
			for(int i = -1; i <= 1; i++){
				if(tmp.y + i >= 0 && tmp.y + i < 10){
					map[tmp.y + i][tmp.x]++;
				}
				if(tmp.x + i >= 0 && tmp.x + i < 10){
					map[tmp.y][tmp.x + i]++;
				}
			}
			map[tmp.y][tmp.x]--;
		}
	}

	int noColor = 0;
	int koi = 0;

	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(map[i][j] == 0){
				noColor++;
			}
			if(koi < map[i][j]){
				koi = map[i][j];
			}
		}
	}

	cout << noColor << endl;
	cout << koi << endl;

	return 0;
}