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>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(){
	int masu[10][10] = {0};
	int x, y, s, i, j, n = 0, cut = 0;
	int num[100] = {0};

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		masu[x][y] ++;
		if(s == 1){
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
		}
		else if(s == 2){
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
			masu[x+1][y-1] += 1, masu[x+1][y+1] += 1, masu[x-1][y-1] += 1, masu[x-1][y+1] += 1;
		}
		else{
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
			masu[x+1][y-1] += 1, masu[x+1][y+1] += 1, masu[x-1][y-1] += 1, masu[x-1][y+1] += 1;
			masu[x-2][y] += 1, masu[x+2][y] += 1, masu[x][y+2] += 1, masu[x][y-2] += 1;
		}
		
	}

	for(i = 0; i < 10; i ++){
		for(j = 0; j < 10; j ++){
			num[n] = masu[i][j];
			n ++;
		}
	}

	sort(num, num+100);

	for(i =0; i < 100; i ++){
		if(num[i] == 0) cut ++;
		else break;
	}

	cout << cut << endl << num[99] << endl;

	return 0;    
}

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

int main()
{
	int xy[10][10] = {'0'};
	int x,y,size;
	xy[0][0] = 0;
	
	while(scanf("%d,%d,%d", &x,&y,&size) != EOF){
		
		xy[y-1][x]++;
		xy[y][x-1]++;
		xy[y][x]++;
		xy[y][x+1]++;
		xy[y+1][x]++;
		
		if(size >= 2){
			xy[y-1][x-1]++;
			xy[y-1][x+1]++;
			xy[y+1][x-1]++;
			xy[y+1][x+1]++;
		}
		if(size == 3){
			xy[y-2][x]++;
			xy[y][x-2]++;
			xy[y][x+2]++;
			xy[y+2][x]++;
		}
	}
	
	int w=0,con = 0;
	
	for(int i=0; i < 10; i++){
		for(int j=0; j < 10; j++){
			if(xy[i][j] == 0)w++;
			if(con < xy[i][j])con = xy[i][j];
		}
	}
	
	printf("%d\n%d\n", w, con);
	
	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) != -1) {
		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 = 0, m = 0;
	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 <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
#define first first
#define second se
using namespace std;
typedef pair<int, int> P;
typedef vector<int> vi;


int dy[4] = {1, -1, 0, 0};
int dx[4] = {0, 0, 1, -1};

int h = 10, w = 10;

bool contain(int y, int x){
    return (0 <= y && y < h && 0 <= x && x < w);
}

signed main(){
    int x, y, s;
    char c;
    int d[11][11] = {0};
    while(cin >> x >> c >> y >> c >> s){
        // cout << x << ' ' << y << ' ' << s << endl;
        if(s == 1){
            d[y][x]++;
            rep(i, 0, 4){
                int ny = y + dy[i];
                int nx = x + dx[i];
                if(contain(ny, nx)){
                    d[ny][nx]++;
                }
            }
        }
        if(s >= 2){
            rep(i, 0, 3){
                rep(j, 0, 3){
                    int ny = y + i - 1;
                    int nx = x + j - 1;
                    if(contain(ny, nx)){
                        d[ny][nx]++;
                    }
                }
            }
        }
        if(s == 3){
            rep(i, 0, 4){
                int ny = y + 2 * dy[i];
                int nx = x + 2 * dx[i];
                if(contain(ny, nx)){
                    d[ny][nx]++;
                }
            }
        }
    }
    int ans = 0, MAX = 0;
    rep(i, 0, 10){
        rep(j, 0, 10){
            // o(d[i][j]);
            if(d[i][j] == 0) ans ++;
            MAX = max(MAX, d[i][j]);
        }
    }
    cout << ans << endl;
    cout << MAX << endl;
}