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 <cstdio>

int main(void) {
	int x,y,s;
	int map[10][10],w=0,m=0,t=0;
	int i,j;

	for(i=0;i<10;i++) { for(j=0;j<10;j++) { map[j][i] = 0; } }
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF) {
		switch(s) {
			case 3:
				if(x-2>=0) { map[x-2][y]++; }
				if(x+2<10) { map[x+2][y]++; }
				if(y-2>=0) { map[x][y-2]++; }
				if(y+2<10) { map[x][y+2]++; }
			case 2:
				if(x-1>=0) {
					if(y-1>=0) { map[x-1][y-1]++; }
					if(y+1<10) { map[x-1][y+1]++; }
				}
				if(x+1<10) {
					if(y-1>=0) { map[x+1][y-1]++; }
					if(y+1<10) { map[x+1][y+1]++; }
				}
			case 1:
				if(x-1>=0) { map[x-1][y]++; }
				if(x+1<10) { map[x+1][y]++; }
				if(y-1>=0) { map[x][y-1]++; }
				if(y+1<10) { map[x][y+1]++; }
			default:
				map[x][y]++;
				break;
		}
	}
	for(i=0;i<10;i++) {
		for(j=0;j<10;j++) {
			if(map[j][i]==0) { w++; }
			if(map[j][i]==m) { t++; }
			else if(map[j][i]>m) { m=map[j][i];t=0; }
			//printf("%d ", map[j][i]);
		}
		//printf("\n");
	}
	printf("%d\n%d\n", w, m);
	return 0;
}

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

int main(){
	int x, y, s;
	int f[10][10];
	
	memset(f, 0, sizeof(f));
	
	while( scanf(" %d,%d,%d", &x, &y, &s) != EOF ){
		if(s==1){
			for(int i=y-1; i<=y+1; ++i){
				int a=0;
				if(i==y) a=1;	
				for(int j=x-a; j<=x+a; ++j) f[i][j]++;	
			}
		}
		else if(s==2){
			for(int i=y-1; i<=y+1; ++i){
				for(int j=x-1; j<=x+1; ++j) f[i][j]++;	
			}	
		}
		else if(s==3){
			for(int i=y-2; i<=y+2; ++i){
				int a=y-i;
				if(a<0) a=-a;
				a=a-2;
				if(a<0) a=-a;	
				for(int j=x-a; j<=x+a; ++j) f[i][j]++;	
			}
		}
	}
	
	int max=0, count=100;
	for(int i=0; i<10; ++i){
		for(int j=0; j<10; ++j){
			if(f[i][j]>0) count--;
			if(f[i][j]>max) max=f[i][j];
		}
	}
	
	printf("%d\n%d\n", count, max);
}

C++: #include <iostream>

using namespace std;

const int SMALL = 1;
const int MIDDLE = 2;
const int BIG = 3;
int paper[10][10] = {0};

void Dropping_Ink(int x, int y, int size)
{
		if(x-1 > -1)    paper[y][x-1]++;
		if(x+1 < 10)    paper[y][x+1]++;
		if(y-1 > -1)    paper[y-1][x]++;
		if(y+1 < 10)    paper[y+1][x]++;

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

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

int main()
{
	int x, y, size, white, color;
	char c[2];

	while(cin >> x >> c[0] >> y >> c[1] >> size)
	{
		if(cin.eof())    break;

		Dropping_Ink(x, y, size);

		white = 0;
		color = 0;	
	
		for(int i=0; i<10; i++)
		{
			for(int j=0; j<10; j++)
			{
				if(paper[i][j] == 0)    white++;
				if(paper[i][j] > color)    color = paper[i][j];
			}
		}	
	}

	cout << white << endl << color << endl;
	
	return 0;
}

C++: #include <iostream>

using std::cin;

struct Ink {
    int x;
    int y;
    int size;
};

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

void size1(const Ink& drop);
void size2(const Ink& drop);
void size3(const Ink& drop);

int main()
{
    Ink dropped;
    char ch;
    while (cin >> dropped.x >> ch >> dropped.y >> ch >> dropped.size) {

        if (dropped.size == 1) {
            size1(dropped);
        } else if (dropped.size == 2) {
            size2(dropped);
        } else if (dropped.size == 3) {
            size3(dropped);
        } else {
            std::cout << "ERROR!" << std::endl;
        }
    }

    int white = 0, dropped_max = 0;
    for (auto i = 0; i < PAPER_SIZE; i++) {
        for (auto j = 0; j < PAPER_SIZE; j++) {
            if (paper[i][j] == 0) {
                white++;
            } else if (paper[i][j] > dropped_max) {
                dropped_max = paper[i][j];
            }
        }
    }

    std::cout << white << std::endl << dropped_max << std::endl;

    return 0;
}

void dropInk(const int x, const int y);

void size1(const Ink& dropped)
{
    int x = dropped.x;
    int y = dropped.y;

    dropInk(x, y);
    dropInk(x + 1, y);
    dropInk(x - 1, y);
    dropInk(x, y + 1);
    dropInk(x, y - 1);
}

void size2(const Ink& dropped)
{
    int x = dropped.x;
    int y = dropped.y;

    size1(dropped);
    dropInk(x + 1, y + 1);
    dropInk(x + 1, y - 1);
    dropInk(x - 1, y + 1);
    dropInk(x - 1, y - 1);
}

void size3(const Ink& dropped)
{
    int x = dropped.x;
    int y = dropped.y;

    size2(dropped);
    dropInk(x, y + 2);
    dropInk(x, y - 2);
    dropInk(x + 2, y);
    dropInk(x - 2, y);
}

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

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int x, y, s;
    char c;
    vector<vector<int>> v(14, vector<int>(14, 0));
    while (cin >> x >> c >> y >> c >> s) {
        x += 2; y += 2;
        switch (s) {
            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]++;
                break;
        }
    }
    
    int mx = 0, cnt = 0;
    for (int i = 2; i < 12; i++) {
        for (int j = 2; j < 12; j++) {
            mx = max(mx, v[i][j]);
            if (v[i][j] == 0) cnt++;
        }
    }
    cout << cnt << "\n" << mx << endl;
    return 0;
}