Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d\n", count, max)
}

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

int paper[10][10];

bool onPaper(int x,int y){
	return 0<=x&&x<10&&0<=y&&y<10;
}
void small(int x,int y){
	for(int i=-1;i<=1;i++)
		for(int j=-1;j<=1;j++)
			if(onPaper(x+i,y+j) && abs(i)+abs(j) <= 1)
				paper[x+i][y+j]++;
}
void medium(int x,int y){
	for(int i=-1;i<=1;i++)
		for(int j=-1;j<=1;j++)
			if(onPaper(x+i,y+j) && abs(i)<=1 && abs(j)<=1)
				paper[x+i][y+j]++;
}
void large(int x,int y){
	for(int i=-2;i<=2;i++)
		for(int j=-2;j<=2;j++)
			if(onPaper(x+i,y+j) && abs(i)+abs(j) <= 2)
				paper[x+i][y+j]++;
}
int main(){
	int x,y,size;
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		if(size==1)small(x,y);
		else if(size==2)medium(x,y);
		else large(x,y);
	}
	int n=0,depth=0;
	for(x=0;x<10;x++){
		for(y=0;y<10;y++){
			if(paper[x][y]==0)n++;
			depth = max(depth,paper[x][y]);
		}
	}
	cout<<n<<endl;
	cout<<depth<<endl;
	return 0;
}

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

using namespace std;

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

int main() {
	const pair<int, int> small[] = {
		        {0, -1},
		{-1, 0},{0, 0},{1, 0},
		        {0, 1}
	};
	const pair<int, int> medium[] = {
		{-1, -1}, {0, -1}, {1, -1},
		{-1,  0}, {0, 0},  {1,  0},
		{-1,  1}, {0, 1},  {1,  1}
	};
	const pair<int, int> large[] = {
            	   {0, -2},
		{ -1, -1 },{ 0, -1 },{ 1, -1 },
		{ -2, 0 }, { -1,  0 },{ 0, 0 },{ 1,  0 },{ 2, 0 },
		{ -1,  1 },{ 0, 1 },{ 1,  1 },
				   { 0, 2 },
	};

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

	while (true) {
		int x, y, size;
		
		cin >> x;
		cin.ignore();
		cin >> y;
		cin.ignore();
		cin >> size;
		if (cin.eof()) {
			break;
		}

		const pair<int, int>* it_begin;
		const pair<int, int>* it_end;
		switch (size)
		{
		case 1:
			it_begin = begin(small);
			it_end = end(small);
			break;
		case 2:
			it_begin = begin(medium);
			it_end = end(medium);
			break;
		case 3:
			it_begin = begin(large);
			it_end = end(large);
			break;
		default:
			break;
		}
		for (auto it = it_begin; it != it_end; ++it) {
			int x2 = x + it->first, y2 = y + it->second;
			if (inPaper(x2, y2)) {
				++paper[x2][y2];
			}
		}
	}
	int zero_count = 0;
	for (auto& a : paper) {
		for (auto& b : a) {
			if (b == 0) {
				++zero_count;
			}
		}
	}
	cout << zero_count << endl;

	int maximum = 0;
	for (auto& a : paper) {
		for (auto& b : a) {
			if (b > maximum) {
				maximum = b;
			}
		}
	}
	cout << maximum << endl;
	return 0;
}

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

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

vector<vector<int>> vv;

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

void big(int x, int y) {
    ink(x-2,y);
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x+2,y);
    ink(x-1,y-1);
    ink(x,y-1);
    ink(x+1,y-1);
    ink(x-1,y+1);
    ink(x,y+1);
    ink(x+1,y+1);
    ink(x,y-2);
    ink(x,y+2);
}

void mid(int x, int y) {
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x-1,y-1);
    ink(x,y-1);
    ink(x+1,y-1);
    ink(x-1,y+1);
    ink(x,y+1);
    ink(x+1,y+1);
}

void small(int x, int y) {
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x,y-1);
    ink(x,y+1);
}

int countBlank() {
    int cnt = 0;
    REP(i,10) REP(j,10) if (vv[i][j] == 0) cnt++;
    return cnt;
}

int getThickest() {
    int t = 0;
    REP(i,10) REP(j,10) if (vv[i][j] > t) t = vv[i][j];
    return t;
}

int main() {
    REP(i,10) {
        vector<int> v(10,0);
        vv.push_back(v);
    }
    
    int x, y, s;
    string t;
    while(cin >> t) {
        x = t[0] - '0';
        y = t[2] - '0';
        s = t[4] - '0';
        switch (s) {
            case 1:
                small(x,y);
                break;
            case 2:
                mid(x,y);
                break;
            case 3:
                big(x,y);
                break;
                
            default:
                break;
        }
    }
    
    cout << countBlank() << endl << getThickest() << endl;
    
    return 0;
}

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

int main(){
	int x1[4] = {-1,0,0,1}, y1[4] = {0,1,-1,0};
	int x2[4] = {-1,-1,1,1}, y2[4] = {-1,1,-1,1};
	int x3[4] = {-2,0,0,2}, y3[4] = {0,-2,2,0};
	int p[10][10], x, y, s, nx, ny, maxl = 0, count = 0;
	for(int i = 0;i < 10;i++)
		for(int j = 0;j < 10;j++)p[i][j] = 0;
	char c;
	while(cin >> x >> c >> y >> c >> s){
		p[y][x]++;
		for(int i = 0;i < 4;i++){
			nx = x + x1[i];ny = y + y1[i];
			if(nx>=0&&nx<10&&ny>=0&&ny<10)p[ny][nx]++;
		}
		if(s > 1){
			for(int i = 0;i < 4;i++){
				nx = x + x2[i];ny = y + y2[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)p[ny][nx]++;
			}
			if(s == 3){
				for(int i = 0;i < 4;i++){
					nx = x + x3[i];ny = y + y3[i];
					if(nx>=0&&nx<10&&ny>=0&&ny<10)p[ny][nx]++;
				}
			}
		}
	}
	for(int i = 0;i < 10;i++){
		for(int j = 0;j < 10;j++){
			maxl = max(maxl, p[i][j]);
			if(!p[i][j])count++;
		}
	}
	cout << count << endl << maxl << endl;
	return 0; 
}