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

bool isValidRange(int y, int x) {
    return 0 <= x && x < 10 && 0 <= y && y < 10;
}

void dropInk(int x, int y, int size, int d[10][10]) {
    switch (size) {
    case 1:
        for (int i = x - 1; i <= x + 1; i++) {
            if (isValidRange(y, i)) {
                d[y][i]++;
            }
        }
        for (int i = y - 1; i <= y + 1; i++) {
            if (isValidRange(i, x)) {
                d[i][x]++;
            }
        }
        d[y][x]--;
        break;
    case 2:
        for (int i = y - 1; i <= y + 1; i++) {
            for (int j = x - 1; j <= x + 1; j++) {
                if (isValidRange(i, j)) {
                    d[i][j]++;
                }
            }
        }
        break;
    case 3:
        for (int i = y - 1; i <= y + 1; i++) {
            for (int j = x - 1; j <= x + 1; j++) {
                if (isValidRange(i, j)) {
                    d[i][j]++;
                }
            }
        }
        if (isValidRange(y - 2, x)) d[y - 2][x]++;
        if (isValidRange(y, x - 2)) d[y][x - 2]++;
        if (isValidRange(y, x + 2)) d[y][x + 2]++;
        if (isValidRange(y + 2, x)) d[y + 2][x]++;
        break;
    }
}

int main() {
    int cells[10][10] = {};
    int x, y, size;
    while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
        dropInk(x, y, size, cells);
    }
    int zeroNum = 0, max = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (cells[i][j] == 0) {
                zeroNum++;
            }
            if (max < cells[i][j]) {
                max = cells[i][j];
            }
        }
    }
    cout << zeroNum << endl
         << max << endl;
}

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 < 13; 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) {
		if (x == 0 && y == 0 && size == 0) break;
		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 <iostream>
using namespace std;
int main()
{
	int cell[10][10] = {{0}}, x, y, size, i, j, max = 0, num = 0;
	char c;
	while (1)
	{
		cin >> x;
		if (cin.eof() || x == -1) break;
		cin >> c >> y >> c >> size;
		switch (size)
		{
			case 1:
				for (i = y-1; i <= y+1; i++)
				{
					for (j = ((i == y-1 || i == y+1) ? x : x-1); j <= ((i == y-1 || i == y+1) ? x : x+1); j++)
					{
						if ((0 <= i && i < 10) && (0 <= j && j < 10))
							cell[j][i]++;
					}
				}
				break;
			case 2:
				for (i = y-1; i <= y+1; i++)
				{
					for (j = x-1; j <= x+1; j++)
					{
						if ((0 <= i && i < 10) && (0 <= j && j < 10))
							cell[j][i]++;
					}
				}
				break;
			case 3:
				for (i = y-2; i <= y+2; i++)
				{
					for (j = ((i == y-2 || i == y+2) ? x : ((i == y-1 || i == y+1) ? x-1 : x-2)); j <= ((i == y-2 || i == y+2) ? x : ((i == y-1 || i == y+1) ? x+1 : x+2)); j++)
					{
						if ((0 <= i && i < 10) && (0 <= j && j < 10))
							cell[j][i]++;
					}
				}
				break;
		}
		for (i = 0; i < 10; i++)
		{
			for (j = 0; j < 10; j++)
			{
				cout << cell[j][i] << " ";
			}
			cout << endl;
		}
	}
	for (i = 0; i < 10; i++)
	{
		for (j = 0; j < 10; j++)
		{
			if (cell[j][i] >= max)
				max = cell[j][i];
			if (cell[j][i] == 0)
				num++;
		}
	}
	cout << num << endl << max << endl;
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>

using namespace std;
typedef long long ll;

int paper[10][10]={0};

void drop(int x,int y){
    
    if(0<=x && x<10 && 0<=y && y<10){
        paper[x][y]++;
    }
    
}

int main(){
    int x,y,s,ans_zero=0,ans_max=0;
    
    while(EOF!=scanf("%d,%d,%d",&x,&y,&s)){
        
        switch (s) {
            case 1: //small
                drop(x-1,y);
                drop(x,y-1);
                drop(x+1,y);
                drop(x,y+1);
                drop(x,y);
                break;
                
            case 3:
                drop(x+2,y);
                drop(x,y+2);
                drop(x-2,y);
                drop(x,y-2);
                
            case 2: //medium
                for(int i=x-1;i<=x+1;i++){
                    for(int j=y-1;j<=y+1;j++){
                        drop(i,j);
                    }
                }
                break;
        }
    }
    
    
    
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(paper[i][j]==0)
                ans_zero++;
            ans_max=max(ans_max,paper[i][j]);
        }
    }
    
    printf("%d\n%d\n",ans_zero,ans_max);
    
    return 0;
}