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 <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int xy[10][10];

void set(int x, int y)
{
    if(x>=0 && y>=0 && x<=9 && y<=9)
        xy[x][y]++;
}

int main(void)
{
    int size, x, y, white, deep;
    while(~scanf("%d,%d,%d", &x, &y, &size))
    {
        if(size >= 1)
        {
            set(x,y);
            set(x,y-1);
            set(x,y+1);
            set(x-1,y);
            set(x+1,y);
        }
        if(size >= 2)
        {
            set(x+1,y+1);
            set(x+1,y-1);
            set(x-1,y+1);
            set(x-1,y-1);
        }
        if(size == 3)
        {
            set(x+2,y);
            set(x-2,y);
            set(x,y+2);
            set(x,y-2);
        }
    }
    
    white = 0;
    deep = 0;
    rep(i,10)
    {
        rep(j,10)
        {
            if(xy[i][j] == 0)
                white++;
            if(deep < xy[i][j])
                deep = xy[i][j];
        }
    }
    
    cout << white << endl << deep << 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()) 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++)
		{
			if (cell[j][i] >= max)
				max = cell[j][i];
			if (cell[j][i] == 0)
				num++;
		}
	}
	cout << num << endl << max << endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <complex>
using namespace std;
int main() {
	int paper[14][14] = { 0 };
	int fl, x, y;
	char split;
	while (cin >> x >>split>> y >>split>> fl) {
		if (fl == 2) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
		}
		if (fl == 1) {
			paper[x + 2][y + 2] += 1;
			paper[x + 1][y + 2] += 1;
			paper[x + 2][y + 1] += 1;
			paper[x + 3][y + 1] += 1;
			paper[x + 1][y + 3] += 1;
		}
		if (fl == 3) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
				paper[x][y + 2] += 1;
				paper[x + 4][y + 2] += 1;
				paper[x + 2][y + 4] += 1;
				paper[x + 2][y] += 1;
		}
		int count = 0;
		int ans = 0;
		for (int i = 2;i < 12;i++) {
			for (int j = 2;j < 12;j++) {
				if (paper[i][j] == 0) count += 1;
				ans = max(ans, paper[i][j]);
			}
		}
		cout << count<<endl;
		cout << ans << endl;
	}
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

void drop1(int s[][14] , int x , int y){
	s[x][y]++;
	s[x-1][y]++;
	s[x][y-1]++;
	s[x+1][y]++;
	s[x][y+1]++;
}

void drop2(int s[][14] , int x , int y){
	drop1(s , x , y);
	s[x-1][y-1]++;
	s[x+1][y-1]++;
	s[x-1][y+1]++;
	s[x+1][y+1]++;
}

void drop3(int s[][14] , int x , int y){
	drop2(s , x , y);
	s[x-2][y]++;
	s[x][y-2]++;
	s[x+2][y]++;
	s[x][y+2]++;
}


int main(){
	int square[14][14]={0};
	int x , y , s , mx=0 ,cnt=0;
	char c;
	while(cin >> x >> c >> y >> c >> s){
		switch(s){
			case 1:
			drop1(square , x+2 , y+2);
			break;
			case 2:
			drop2(square , x+2 , y+2);
			break;
			case 3:
			drop3(square , x+2 , y+2);
		}
	}
		for(int i=2;i<12;++i){
			for(int j=2;j<12;++j){
				if(square[i][j]==0) cnt++;
				mx=max(mx , square[i][j]);
			}
		}
		cout << cnt << endl << mx << endl;	
	return 0; 
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;k<6;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==1){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<10)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<10)paper[x][y+1]++;
			if(x>=0 && x<10 && y>=0 && y<10)paper[x][y]++;
		}
		if(n==2){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<10)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<10)paper[x][y+1]++;
			if(x-1>=0 && y-1>=0)paper[x-1][y-1]++;
			if(x-1>=0 && y+1<10)paper[x-1][y+1]++;
			if(x+1<10 && y-1>=0)paper[x+1][y-1]++;
			if(x+1<10 && y+1<10)paper[x+1][y+1]++;
			if(x>=0 && x<10 && y>=0 && y<10)paper[x][y]++;
		}
		if(n==3){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<10)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<10)paper[x][y+1]++;
			if(x-1>=0 && y-1>=0)paper[x-1][y-1]++;
			if(x-1>=0 && y+1<10)paper[x-1][y+1]++;
			if(x+1<10 && y-1>=0)paper[x+1][y-1]++;
			if(x+1<10 && y+1<10)paper[x+1][y+1]++;
			
			if(x-2>=0)paper[x-2][y]++;
			if(x+2<10)paper[x+2][y]++;
			if(y+2<10)paper[x][y+2]++;
			if(y-2>=0)paper[x][y-2]++;
			if(x>=0 && x<10 && y>=0 && y<10)paper[x][y]++;
		}
	}
	
	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;
}