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>
using namespace std;

int main() {
	int paper[10][10] = {0};
	int paint[][2] = { {0,-1}, {-1,0},{0,0},{1,0},{0,1},{-1,-1},{1,-1},{-1,1},{1,1},{0,-2},{-2,0},{2,0},{0,2}};
	int size[]={ 0,5,9,13 };
	int x, y, z;
	char dommy;
	int time;
	while (cin >> x >> dommy >> y >> dommy >> z) {
		for (int i = 0; i < size[z]; ++i) {
			if (x + paint[i][0] >= 0 && x + paint[i][0] < 10 && y + paint[i][1] >= 0 && y + paint[i][1] < 10) {
				++paper[x + paint[i][0]][y + paint[i][1]];
			}
		}
	}
	int answer=0, max=0;
	for (int i = 0; i < 10; ++i) {
		for (int i2 = 0; i2 < 10; ++i2) {
			if (paper[i][i2] == 0)++answer;
			else if (max < paper[i][i2]) {
				max = paper[i][i2];
			}
		}
	}
	cout << answer << endl << max << endl;
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
using namespace std;
int main() {
	int i,j,k,l,m,n,o,x,y,z;
	int max = 0;
	int count = 0;
	vector< vector<int> > s;
	s.resize(10);
	for (i = 0; i < 14; i++) {
		s[i].resize(14);
	}
	for (j = 0; j < 14; j++) {
		for (k = 0; k < 14; k++) {
			s[j][k] = 0;
		}
	}
	while (scanf("%d,%d,%d", &x, &y, &z)!=EOF) {
		if (z == 1) {
			s[x + 2][y + 2] += 1;
			s[x + 1][y + 2] += 1;
			s[x + 3][y + 2] += 1;
			s[x + 2][y + 1] += 1;
			s[x + 2][y + 3] += 1;
		}
		else if (z == 2) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
				}
			}
		}
		else if (z == 3) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
					s[x][y + 2] += 1;
					s[x + 4][y + 2] += 1;
					s[x + 2][y] += 1;
					s[x + 2][y + 4] += 1;
				}
			}
		}
	}
	for (n = 2; n < 12; n++) {
		for (o = 2; o < 12; o++) {
			if (max < s[n][o]) {
				max = s[n][o];
			}
			if (s[n][o] == 0) {
				count += 1;
			}
		}
	}
	cout << count << endl;
	cout << max << endl;
	return 0;
}

C++: #include<cstdio>
int p[10][10];
void drop(int x,int y){
    if(0<=x && x<10 && 0<=y && y<10) p[x][y]++;
}
int main(){
    int x,y,s;
    int a=0,b=0;
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            p[i][j]=0;
        }
    }
    while(~scanf("%d,%d,%d",&x,&y,&s)){
        if(s==1){
            drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
        }else if(s==2){
            drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
            drop(x+1,y+1);
            drop(x+1,y-1);
            drop(x-1,y+1);
            drop(x-1,y-1);
        }else if(s==3){
            drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
            drop(x+1,y+1);
            drop(x+1,y-1);
            drop(x-1,y+1);
            drop(x-1,y-1);
            drop(x+2,y);
            drop(x-2,y);
            drop(x,y+2);
            drop(x,y-2);
        }
    }
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(p[i][j]==0) a++;
            else if(b<p[i][j]) b=p[i][j];
        }
    }
    printf("%d\n%d\n",a,b);
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	int paper[15][15] = {};
	// (0, 0) -> (2, 2)
	// (9, 9) -> (11, 11) ??¨??????

	int x, y, size;
	char c1, c2;
	while(cin >> x >> c1 >> y >> c2 >> size){
		x += 2;
		y += 2;

		if(size >= 1){
			paper[x][y] ++;
			paper[x + 1][y] ++;
			paper[x - 1][y] ++;
			paper[x][y + 1] ++;
			paper[x][y - 1] ++;
		}

		if(size >= 2){
			paper[x + 1][y + 1] ++;
			paper[x + 1][y - 1] ++;
			paper[x - 1][y + 1] ++;
			paper[x - 1][y - 1] ++;
		}

		if(size >= 3){
			paper[x + 2][y] ++;
			paper[x - 2][y] ++;
			paper[x][y + 2] ++;
			paper[x][y - 2] ++;
		}
	}

	int ans1 = 0;
	int ans2 = 0;
	for(int i = 2; i < 10 + 2; ++i){
		for(int j = 2; j < 10 + 2; ++j){
			if(paper[i][j] == 0){
				ans1++;
			}

			ans2 = max(ans2, paper[i][j]);
		}
	}

	cout << ans1 << endl;
	cout << ans2 << endl;

	return 0;
}