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<vector>
#include<string>
using namespace std;
int parse(string a) {
	int s = 0;
	for (int b = 0; b < a.length(); b++) {
		s *= 10;
		s += a[b] - 48;
	}
	return s;
}
vector<int>split(string a) {
	vector<int>s;
	string b = "";
	for (int c = 0; c < a.length(); c++) {
		if (a[c] == ',') { s.push_back(parse(b)); b = ""; }
		else b += a[c];
	}
	s.push_back(parse(b));
	return s;
}
int main() {
	vector<vector<int>>masu(10,vector<int>(10));
	int xp[4]{ 1,-1,1,-1 };
	int yp[4]{ 1,1,-1,-1 };
	int xq[12]{ -2,-1,-1,-1,0,0,0,0,1,1,1,2 };
	int yq[12]{ 0,-1,0,1,-2,-1,1,2,-1,0,1,0 };
	string a;
	while (cin >> a) {
		vector<int>b;
		b = split(a);
		if (b[2] == 1){
			for (int l = 0; l < 4; l++) {
				if (b[0] + xp[l] < 10 && b[0] + xp[l]>0 && b[1] + yp[l] < 10 && b[1] + yp[l] < 10)masu[b[0] + xp[l]][b[1] + yp[l]]++;
		}
		}
		else if (b[2] == 2) {
			for (int l = b[0] - 1; l < b[0] + 2; l++) {
				for (int r = b[1] - 1; r < b[1] + 2; r++) {
					if (l < 10 && l>-1 && r < 10 && r>-1) masu[l][r]++;
				}
			}
		}
		else {
			for (int l = 0; l < 12; l++) {
				if (b[0] + xq[l] < 10 && b[0] + xq[l]>0 && b[1] + yq[l] < 10 && b[1] + yq[l] < 10)masu[b[0] + xq[l]][b[1] + yq[l]]++;
			}
		}
	}
	int zero, n;
	zero = n = 0;
	for (auto j : masu) {
		for (int i : j) {
			if (i==0) zero++;
			else if (i > n)n = i;
		}
	}
	cout << zero << endl << n << endl;
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	while(scanf("%d",&x)!=EOF){
		scanf("%d,%d",&y,&n);
		if(n==1){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==2){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==3){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			
			if(y-2>=0)paper[y-2][x]++;
			if(y+2<10)paper[y+2][x]++;
			if(x+2<10)paper[y][x+2]++;
			if(x-2>=0)paper[y][x-2]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		for(i=0;i<10;i++){
			for(j=0;j<10;j++){
				printf("%d ",paper[i][j]);
			}
			puts("");
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			printf("%d ",paper[i][j]);
		}
		puts("");
	}
	
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(paper[i][j]==0)c++;
			if(paper[i][j]>=max)max=paper[i][j];
		}
	}
	printf("%d\n%d\n",c,max);
	return 0;
}

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

int main(){
    int grid[14][14];
    int s[4][2]={{0,-1},{0,1},{-1,0},{1,0}};
    int m[4][2]={{-1,-1},{-1,1},{1,-1},{1,1}};
    int l[4][2]={{0,-2},{0,2},{-2,0},{2,0}};
    int x, y, size;
    int i, j;
    int max=0;
    int blank=0;
    char comma;
    for(i=0;i<14;i++){
        for(j=0;j<14;j++){
            grid[i][j] = 0;
        }
    }
    while(cin >> x >> comma >> y >> comma >> size){
        x += 2;
        y += 2;
        grid[x][y] += 1;
        for(i=0;i<4;i++){
            grid[x+s[i][0]][y+s[i][1]] += 1;
        }
        if(size > 1){
            for(i=0;i<4;i++){
                grid[x+m[i][0]][y+m[i][1]] += 1;
            }
            if(size > 2){
                for(i=0;i<4;i++){
                    grid[x+l[i][0]][y+l[i][1]] += 1;
                }
            }
        }
    }
    for(i=2;i<12;i++){
        for(j=2;j<12;j++){
            if(grid[i][j] > max){
                max = grid[i][j];
            }else if(grid[i][j] = 0){
                blank += 1;
            }
        }
    }
    cout << blank << endl;
    cout << max << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

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

void Dropping_Ink(int x, int y, int size)
{
		paper[x][y]++;
		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 == LARGE)
		{
			if(x-2 > -1)    paper[y][x-2]++;
			if(x+2 < 10)    paper[y][x+2]++;
			if(y-2 > -1)    paper[y-2][x]++;
			if(y+2 < 10)    paper[y+2][x]++;
		}
}

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

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

		cout << x << ',' << y << endl;

		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;
}