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>
#define MAX_N 10
#define MAX_M 10
using namespace std;

int field[MAX_N][MAX_M] = {0};
int x, y, size, nx, ny;

void Big()
{
	int mx[13] = {-1, -1, -1, 0, 0, 0, 1, 1, 1, -2, 0, 0, 2}, my[13] = {-1, 0, 1, -1, 0, 1, -1, 0, 1, 0, -2, 2, 0};
	for (int i = 0; i < 9; i++) {
		nx = x + mx[i]; ny = y + my[i];
		if (0 <= nx && nx < MAX_N && 0 <= ny && ny < MAX_M) field[nx][ny]++; 
	}
}

void Midole()
{
	int mx[9] = {-1, -1, -1, 0, 0, 0, 1, 1, 1}, my[9] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	for (int i = 0; i < 9; i++) {
		nx = x + mx[i]; ny = y + my[i];
		if (0 <= nx && nx < MAX_N && 0 <= ny && ny < MAX_M) field[nx][ny]++; 
	}
}

void Mini()
{
	int mx[5] = {-1, 0, 0, 0, 1}, my[5] = {0, -1, 0, 1, 0};
	for (int i = 0; i < 5; i++) {
		nx = x + mx[i]; ny = y + my[i];
		if (0 <= nx && nx < MAX_N && 0 <= ny && ny < MAX_M) field[nx][ny]++; 
	}
}

int main(void)
{
	int ans = 0, color = 0;
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		switch (size) {
			case 1: Mini(); break;
			case 2: Midole(); break;
			case 3: Big(); break;
		}
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (field[i][j] == 0) ans++;
			else if (color < field[i][j]) color = field[i][j];
		}
	}
	cout << ans << endl << color << endl;

	return 0;
}

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

int main()
{
	int xy[10][10] = {0};
	int x,y,size;
	
	while(scanf("%d,%d,%d", &x,&y,&size) != EOF){
		if(size >= 1){
		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 <array>
#include <algorithm>
#include <cstdint>

int main()
{
	std::uint16_t const bias = 2;
	typedef std::array<std::uint16_t, 10 + 2 * bias> Row;
	typedef std::array<Row, 10 + 2 * bias> Paper;
	Paper paper;

	for (Row& row : paper) {
		row.fill(0);
	}

	std::uint16_t x, y, size;
	char comma;
	while (std::cin >> x >> comma >> y >> comma >> size) {
		enum { Small = 1, Medium, Large };
		x += bias;
		y += bias;

		++paper[x][y];
		++paper[x + 1][y];
		++paper[x - 1][y];
		++paper[x][y + 1];
		++paper[x][y - 1];

		if (size != Small) {
			++paper[x + 1][y + 1];
			++paper[x + 1][y - 1];
			++paper[x - 1][y + 1];
			++paper[x - 1][y - 1];

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

	std::uint16_t num_empty = 0;
	std::uint16_t max_density = 0;
	for (std::uint16_t i = bias; i < 10 + bias; ++i) {
		Row const& row = paper[i];
		num_empty += std::count(row.begin() + 2, row.end() - 2, 0);
		max_density = std::max(
				max_density,
				*std::max_element(row.begin() + 2, row.end() - 2));
	}

	std::cout << num_empty << '\n' << max_density << std::endl;

	return 0;
}

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

#pragma warning(disable : 4996)

int x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q), x--, y--)
	{
		if (q == 1)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (abs(i) + abs(j) <= 1)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}

		if (q == 2)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
					{
						ok[y + i][x + j]++;
					}
				}
			}
		}

		if (q == 3)
		{
			for (int i = -2; i <= 2; i++)
			{
				for (int j = -2; j <= 2; j++)
				{
					if (abs(i) + abs(j) <= 2)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}
	}

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

			if (ok[i][j] > r2)
			{
				r2 = ok[i][j];
			}
		}
	}

	printf("%d\n", r1);
	printf("%d\n", r2);

	return 0;
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#pragma warning(disable:4996)
using namespace std;

struct ToUpper {
	char operator()(char c) { return toupper(c); }
};

int num[20][20];

int main() {
	memset(num, 0, sizeof(num));
	string st;
	while (getline(cin, st)) {
		int x = st[0] - '0';
		int y = st[2] - '0';
		x += 5;
		y += 5;
		int size = st[4] - '0';

		for (int i = 0; i < 20; ++i) {
			for (int j = 0; j < 20; ++j) {
				if (size == 0) {
					int lim = 1;
					int sa = abs(i - y) + abs(j - x);
					if (sa < size)num[i][j]++;
				}
				else if (size == 3) {
					int lim = 2;
					int sa = abs(i - y) + abs(j - x);
					if (sa < size)num[i][j]++;
				}
				else {
					if (abs(i - y) <= 1 && abs(j - x) <= 1)num[i][j]++;
				}
				
			}
		}
	}
	int a = 0;
	int b = 0;
	for (int i = 5; i < 15; ++i) {
		for (int j = 5; j < 15; ++j) {
			if (!num[i][j])a++;
			b = max(b, num[i][j]);
		}
	}
	cout << a <<endl<< b << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#define MAX 30
using namespace std;


int main()
{
	int p[MAX][MAX];
	for (int i = 0; i < MAX; i++){
		for (int j = 0; j < MAX; j++){
			p[i][j] = 0;
		}
	}
	int x, y, size;
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		x += 10;
		y += 10;
		p[x][y]++;
		p[x - 1][y]++;
		p[x + 1][y]++;
		p[x][y - 1]++;
		p[x][y + 1]++;
		if (size == 1){
			continue;
		}
		p[x - 1][y - 1]++;
		p[x - 1][y + 1]++;
		p[x + 1][y - 1]++;
		p[x + 1][y + 1]++;
		if (size == 2){
			continue;
		}
		p[x - 2][y]++;
		p[x + 2][y]++;
		p[x][y - 2]++;
		p[x][y + 2]++;
	}
	int clean = 0, ink = 0;
	for (int i = 10; i < 20; i++){
		for (int j = 10; j < 20; j++){
			if (p[i][j] == 0){
				clean++;
			}
			ink = max(ink, p[i][j]);
		}
	}
	cout << clean << endl;
	cout << ink << endl;

	return 0;
}