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>
#include <iostream>
#include <algorithm>
using namespace std;

inline bool check(int x, int y)
{
	if (x >= 0 && x <= 9 && 0 <= y && y <= 9) return true;
	else false;
}

int main()
{
	int mass[12][12] = { {0} };
	int x, y, s, non = 0, maxim = -1;

	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		switch (s)
		{
		case 1:
			mass[x][y]++;
			if (check(x, y - 1)) mass[x][y - 1]++;
			if (check(x, y + 1)) mass[x][y + 1]++;
			if (check(x - 1, y)) mass[x - 1][y]++;
			if (check(x + 1, y)) mass[x + 1][y]++;
			break;
		case 2:
			mass[x][y]++;
			if (check(x - 1, y - 1)) mass[x - 1][y - 1]++;
			if (check(x, y - 1)) mass[x][y - 1]++;
			if (check(x + 1, y - 1)) mass[x + 1][y - 1]++;
			if (check(x - 1, y)) mass[x - 1][y]++;
			if (check(x + 1, y)) mass[x + 1][y]++;
			if (check(x - 1, y + 1)) mass[x - 1][y + 1]++;
			if (check(x, y + 1)) mass[x][y + 1]++;
			if (check(x + 1, y + 1)) mass[x + 1][y + 1]++;
			break;
		case 3:
			mass[x][y]++;
			if (check(x - 1, y - 1)) mass[x - 1][y - 1]++;
			if (check(x, y - 1)) mass[x][y - 1]++;
			if (check(x + 1, y - 1)) mass[x + 1][y - 1]++;
			if (check(x - 1, y)) mass[x - 1][y]++;
			if (check(x + 1, y)) mass[x + 1][y]++;
			if (check(x - 1, y + 1)) mass[x - 1][y + 1]++;
			if (check(x, y + 1)) mass[x][y + 1]++;
			if (check(x + 1, y + 1)) mass[x + 1][y + 1]++;
			if (check(x, y - 2)) mass[x][y - 2]++;
			if (check(x - 2, y)) mass[x - 2][y]++;
			if (check(x + 2, y)) mass[x + 2][y]++;
			if (check(x, y + 2)) mass[x][y + 2]++;
			break;
		}
	}
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (mass[i][j] == 0) non++;
			maxim = max(maxim, mass[i][j]);
		}
	}
	cout << non << endl << maxim << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;
 
int main(){
    int x,y,sz,f[13][13],cnt = 0,max = 0; 
    for(int i = 0 ; i < 13 ; i++){
	for(int j = 0 ; j < 13 ; j++){
	    f[i][j] = 0;
	}
    }
    while(cin >> x >> y >> sz){
	x += 2; y += 2;
	switch(sz){
	case 3:
	    f[x][y-2]++; f[x][y+2]++;
	    f[x-2][y]++; f[x+2][y]++;
	case 2:
	    f[x-1][y-1]++; f[x+1][y+1]++;
	    f[x-1][y+1]++; f[x+1][y-1]++;
	case 1:
	    f[x][y]++; f[x-1][y]++; f[x][y-1]++; 
	    f[x+1][y]++; f[x][y+1]++;
	    break;
	}
    }
 
    for(int i = 2 ; i < 12 ; i++){
	for(int j = 2 ; j < 12 ; j++){
	    if(max < f[i][j]) max = f[i][j];
	    if(f[i][j] == 0) cnt++;
	}
    }
    cout << cnt << "\n" << max << endl; 
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
#define int long long
signed main(){
	int x,y,t;
	vector<vector<int>> v(14, vector<int>(14,0));
	while( scanf("%lld,%lld,%lld", &x, &y, &t) != EOF ){
		x+=2;
		y+=2;
		switch (t) {
			case 3:
				v[x][y-2]++;
				v[x][y+2]++;
				v[x-2][y]++;
				v[x+2][y]++;
			case 2:
				v[x-1][y-1]++;
				v[x-1][y+1]++;
				v[x+1][y-1]++;
				v[x+1][y+1]++;
			case 1:
				v[x+1][y]++;
				v[x-1][y]++;
				v[x][y-1]++;
				v[x][y+1]++;
				v[x][y]++;
				break;
		}
	}
	int z=0;
	int mx=-1;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(v[i][j]==0) z++;
			mx = max(mx, v[i][j]);
		}
	}
	cout << z << endl;
	cout << mx << endl;
	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int dp[20][20];
int main(){
	for(int i=0;i<20;i++)
		for(int j=0;j<20;j++)
			dp[i][j]=-1;
	for(int i=5;i<15;i++)
		for(int j=5;j<15;j++)
			dp[i][j]=0;
	int x,y,s;
	char z;
	while(cin>>x>>z>>y>>z>>s){
		if(s==1){
			dp[x+5][y+5]++;
			if(dp[x-1+5][y+5]!=-1)
				dp[x-1+5][y+5]++;
			if(dp[x+1+5][y+5]!=-1)
				dp[x+1+5][y+5]++;
			if(dp[x+5][y-1+5]!=-1)
				dp[x+5][y-1+5]++;
			if(dp[x+5][y+1+5]!=-1)
				dp[x+5][y+1+5]++;
		}
		if(s==2){
			for(int i=x-1+5;i<=x+1+5;i++){
				for(int j=y-1+5;j<=y+1+5;j++){
					if(dp[i][j]!=-1)
						dp[i][j]++;
				}
			}
		}
		if(s==3){
			for(int i=x-1+5;i<=x+1+5;i++){
				for(int j=y-1+5;j<=y+1+5;j++){
					if(dp[i][j]!=-1)
						dp[i][j]++;
				}
			}
			if(dp[x-2+5][y+5]!=-1)
				dp[x-2+5][y+5]++;
			if(dp[x+2+5][y+5]!=-1)
				dp[x+2+5][y+5]++;
			if(dp[x+5][y-2+5]!=-1)
				dp[x+5][y-2+5]++;
			if(dp[x+5][y+2+5]!=-1)
				dp[x+5][y+2+5]++;
		}
		int max=1,zero=0;
		for(int i=0;i<20;i++){
			for(int j=0;j<20;j++){
				if(dp[i][j]>max)
					max=dp[i][j];
				if(dp[i][j]==0)
					zero++;
			}
		}
		cout<<zero<<endl;
		cout<<max<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int dx[12] = { 1, 0, -1, 0, 1, -1, 1, -1, 2, 0, -2, 0 };
	int dy[12] = { 0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2 };
	int map[10][10] = { 0 };
	int cnt = 100;
	int x, y, size;
	char s, d;
	int ma = 0;
	int c = 0;

	while (cin >> x >> s >> y >> d >> size){
		
		if (size == 1){
			map[y][x]++;
			for (int i = 0; i < 4; i++){
				
				int xx = dx[i] + x;
				int yy = dy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if (size == 2){
			map[y][x]++;
			for (int i = 0; i < 8; i++){
				int xx = dx[i] + x;
				int yy = dy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if(size==3) {
			map[y][x]++;
			for (int i = 0; i < 12; i++){
				int xx = dx[i] + x;
				int yy = dy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}
		/*for (int i = 0; i < 10; i++){
			for (int i2 = 0; i2 < 10; i2++){
				cout << map[i][i2] << " ";
			}cout << endl;
		}*/
	}

	for (int i = 0; i < 10; i++){
		for (int i2 = 0; i2 < 10; i2++){
			if (map[i][i2] != 0){
				cnt--;
			}
			ma = max(ma, map[i][i2]);
		}
	}
	
	cout << cnt << endl;
	cout << ma << endl;
}