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", count, max)
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

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

int main()
{
	int field[10][10];
	memset(field, 0, sizeof(field));

	int x, y, s;

	while(cin >> x >> y >> s)
	{
		int dx[] = {(s == 1 ? (0, 0, 1, -1) : s == 2 ? (0, 0, 1, -1, 1, 1, -1, -1) : (0, 0, 1, -1, 1, 1, -1, -1, 0, 0, 2, -2))};
		int dy[] = {(s == 1 ? (1, -1, 0, 0) : s == 2 ? (0, 0, 1, -1, 1, -1, 1, -1) : (0, 0, 1, -1, 1, -1, 1, -1, 2, -2, 0, 2))};

		rep(i, s*4)
			if(range(x + dx[i], y + dy[i]))
				field[x + dx[i]][y + dy[i]]++;
	}

	int res = 0;
	int blank = 0;

	rep(i, 10) rep(j, 10)
	{
		if(!field[i][j])
			blank++;
		else
			chmax(res, field[i][j]);
	}

	cout << blank << endl << res << endl;
}

C++: #include <iostream>
using namespace std;
 
int field[10][10] = {0};
 
void small(int x,int y){
    int vx[4] = {-1,0,1,0};
    int vy[4] = {0,-1,0,1};
    if(x>=0 && x<10 && y>=0 && y<10)
        field[x][y]++;
    for(int i=0;i<4;i++){
        if(x+vx[i]>=0 && x+vx[i] <10 && y+vy[i]>=0 && y+vy[i]<10)
            field[x+vx[i]][y+vy[i]]++;
    }  
}
void mid(int x,int y){
    int vx[3] = {-1,0,1};
    int vy[3] = {-1,0,1};
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
        if(x+vx[i]>=0 && x+vx[i] <10 && y+vy[j]>=0 && y+vy[j]<10)
            field[x+vx[i]][y+vy[j]]++;
        }
    }
}
void large(int x,int y){
    int vx[4] = {-2,0,2,0};
    int vy[4] = {0,-2,0,2};
    mid(x,y);
    for(int i=0;i<4;i++){
        if(x+vx[i]>=0 && x+vx[i] <10 && y+vy[i]>=0 && y+vy[i]<10)
            field[x+vx[i]][y+vy[i]]++;
    }
}
 
void search()
{
    int m = 0;
    int zerocount = 0;
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(field[i][j]==0)
                zerocount++;
            m = max(m,field[i][j]);
        }
    }
    cout << zerocount << endl;
    cout << m << endl;
}
int main()
{
    int x,y,size;
    char dot;
    while(cin >> x >> dot >> y >> dot >> size){
        if(size == 1)
            small(x,y);
        else if(size == 2)
            mid(x,y);
        else if(size == 3)
            large(x,y);
    }
    search();
    return 0;
}

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

#define SAFE_DELETE( x ) { if ( x ){ delete x; x = NULL; } }

struct tCell{
	tCell(){
		x = y = size = 0;
		prev = next = NULL;
	}
	int x, y, size;
	tCell *prev, *next;
};

class MyArray{
public:
	MyArray() : size( 0 ), head( NULL ), tail( NULL ){
		head = new tCell;
		tail = new tCell;
		head->next = tail;
		tail->prev = head;
	}
	~MyArray(){
		for( int i = size; i > 0; --i ){
			tCell* cell = tail->prev;
			cell->prev->next = cell->next;
			cell->next->prev = cell->prev;
			SAFE_DELETE( cell );
		}
		SAFE_DELETE( tail );
		SAFE_DELETE( head );
	}

	void pushBack( int x, int y, int size ){
		++this->size;
		tCell* cell = new tCell;
		cell->x = x;
		cell->y = y;
		cell->size = size;
		cell->prev = tail->prev;
		cell->next = tail;
		cell->prev->next = cell;
		cell->next->prev = cell;
	}
	int getSize(){ return size; }

	tCell operator[]( int d ){
		tCell* cell = head->next;
		if ( d >= size ){ cell = NULL; return *cell; }
		for ( int i = 0; i < d; ++i ){
			cell = cell->next;
		}
		return *cell;
	}

private:
	int size;
	tCell *head, *tail;
};

const unsigned SX = 14;
const unsigned SY = 14;

void putInk( int x, int y, int* board, int* sample ){
	for ( int j = -2; j < 3; ++j ){
		for ( int i = -2; i < 3; ++i ){
			board[ ( y+j ) * SY + ( x+i ) ] += sample[ ( j+2 ) * 5 + ( i+2 ) ];
		}
	}
}

int main(){
	int x, y, size;
	char c;
	MyArray ma;
	int board[ SY * SX ];
	for ( int j = 0; j < SY; ++j ){
		for ( int i = 0; i < SX; ++i ){
			board[ j*SX + i ] = 0;
		}
	}

	int small[ 5 * 5 ];
	int medium[ 5 * 5 ];
	int large[ 5 * 5 ];
	for ( int j = 0; j < 5; ++j ){
		for ( int i = 0; i < 5; ++i ){
			small[ j*5 + i ] = medium[ j*5 + i ] = large[ j*5 + i ] = 0;
			if ( ( i >= 1 && i <=3 ) && ( j >= 1 && j <= 3 ) ) {
				small[ j*5 + i ] = medium[ j*5 + i ] = large[ j*5 + i ] = 1;
			}
			if ( ( i == 1 || i == 3 ) && ( j == 1 || j == 3 ) ) {
				small[ j*5 + i ] = 0;
			}
			if ( i == 2 || j == 2 ) {
				large[ j*5 + i ] = 1;
			}
		}
	}

	while ( cin >> x >> c >> y >> c >> size ){
		ma.pushBack( x+2, y+2, size );
	}

	for ( int i = 0; i < ma.getSize(); ++i ){
		x = ma[ i ].x;
		y = ma[ i ].y;
		size = ma[ i ].size;
		int* sample;
		switch ( size ){
			case 1 : sample = small; break;
			case 2 : sample = medium; break;
			case 3 : sample = large; break;
		}
		putInk( x, y, board, sample );
	}

	int blank = 0, depth = 0;
	for ( int j = 2; j < SY-2; ++j ){
		for ( int i = 2; i < SX-2; ++i ){
			if ( !board[ j * SY + i ] ) ++blank;
			else if ( depth < board[ j * SY + i ] ) depth = board[ j * SY + i ];
		}
	}

	cout << blank << endl << depth << endl;

	return 0;
}