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 <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<vector<int> > paper(10, vector<int>(10, 0));
    int ret1 = 100;
    int ret2 = 0;

    int dy[] = {1, -1, 0, 0, 1, -1, 1, -1, 2, -2, 0, 0};
    int dx[] = {0, 0, 1, -1, 1, 1, -1, -1, 0, 0, 2, -2};

    for(;;){
        int x0, y0, size;
        char c;
        if(!(cin >> x0 >> c >> y0 >> c >> size))
            break;
        for(int i=0; i<4*size; ++i){
            int y = y0 + dy[i];
            int x = x0 + dx[i];
            if(y < 0 || y > 9 || x < 0 || x > 9)
                continue;
            if(paper[y][x] == 0)
                -- ret1;
            ++ paper[y][x];
            ret2 = max(ret2, paper[y][x]);
        }
    }

    cout << ret1 << endl << ret2 << endl;
}

C++: #include<iostream>
#include<iomanip>
#include<memory>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>

using namespace std;

int main()
{
  int dx[13] = {0, 1, 0, -1, 0, 1, -1, -1, 1, 2, 0, -2, 0};
  int dy[13] = {0, 0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2};
  int loop[4] = {0, 5, 9, 13};

  int map[10][10];
  int x, y, size;
  char c;
  int cnt = 0, d = 0;
  
  for ( int i = 0; i < 10; ++i )
    for ( int j = 0; j < 10; ++j )
      map[i][j] = 0;

  while( cin >> x >> c >> y >> c >> size )
    {
      for ( int i = 0; i < loop[size]; ++i )
        if ( x+dx[i] >= 0 && x+dx[i] < 10 && y+dy[i] >= 0 && y+dy[i] < 10 )
          map[x+dx[i]][y+dy[i]] += 1;
    }

  for ( int i = 0; i < 10; ++i )
    for ( int j = 0; j < 10; ++j )
      {
        if ( map[i][j] == 0 )
          ++cnt;
        d = max( d, map[i][j] );
      }

  cout << cnt << endl;
  cout << d << endl;
  
  return 0;
}

C++: #include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
#define FOR(i, s, e) for(int i = s; i < e; ++i)
#define GRID_SIZE 10
struct Grid
{
	Grid() : maxDeep(0){
		FOR(i, 0, GRID_SIZE){
			FOR(j, 0, GRID_SIZE)
				d[i][j] = 0;
		}
		emptyCount = GRID_SIZE*GRID_SIZE;
	}
	void addInk(int i, int j){
		if (i < 0 || GRID_SIZE <= i || j < 0 || GRID_SIZE <= j)
			return;
		if (d[i][j] == 0) --emptyCount;
		++d[i][j];
		if (d[i][j] > maxDeep) maxDeep = d[i][j];
	}
	void dropS(int i, int j){
		addInk(i, j);
		addInk(i - 1, j);
		addInk(i + 1, j);
		addInk(i, j - 1);
		addInk(i, j + 1);
	}
	void dropM(int i, int j){
		dropS(i, j);
		addInk(i - 1, j - 1);
		addInk(i - 1, j + 1);
		addInk(i + 1, j - 1);
		addInk(i + 1, j + 1);
	}
	void dropL(int i, int j){
		dropM(i, j);
		addInk(i, j - 2);
		addInk(i, j + 2);
		addInk(i - 2, j);
		addInk(i + 2, j);
	}
	void drop(int i, int j, int s){
		if (s == 1) dropS(i, j);
		else if (s == 2) dropM(i, j);
		else if (s == 3) dropL(i, j);
	}
	int emptyCount;
	int maxDeep;
	int d[GRID_SIZE][GRID_SIZE];
};
void getValue(string& line, int& i, int& j, int& s){
	string::size_type p1 = line.find(',');
	string::size_type p2 = line.find(',', p1 + 1);
	i = atoi(line.substr(0, p1).c_str());
	j = atoi(line.substr(p1 + 1, p2 - p1 - 1).c_str());
	s = atoi(line.substr(p2 + 1).c_str());
}
int main()
{
	Grid grid;
	string line;
	int i, j, s;
	while (cin >> line){
		getValue(line, i, j, s);
		grid.drop(i, j, s);
	}
	cout << grid.emptyCount << "\n" << grid.maxDeep << "\n";
	return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
	int a[30][30]={{0}};
	char str;
	int cnt=0,m;
	int ans=0;
	int x,y,z;
	while(scanf("%d%c%d%c%d",&x,&str,&y,&str,&z)!=EOF){
	    x+=10,y+=10;
        if(z==1){
            a[x][y]++;
            a[x+1][y]++;
            a[x-1][y]++;
            a[x][y+1]++;
            a[x][y-1]++;

        }
        else if(z==2){
            a[x][y]++;
            a[x+1][y+1]++;
            a[x+1][y-1]++;
            a[x+1][y]++;
            a[x-1][y+1]++;
            a[x-1][y-1]++;
            a[x-1][y]++;
            a[x][y+1]++;
            a[x][y-1]++;


        }
        else if(z==3){
            a[x+1][y]++;
            a[x+2][y]++;
            a[x][y+1]++;
            a[x][y+2]++;
            a[x-1][y]++;
            a[x-2][y]++;
            a[x][y-1]++;
            a[x][y-2]++;
            a[x+1][y+1]++;
            a[x-1][y-1]++;
            a[x+1][y-1]++;
            a[x-1][y+1]++;
            a[x][y]++;




        }


	}
	for(int i=10;i<20;i++){
            for(int j=10;j<20;j++){
                if(a[i][j]==0)cnt++;
                ans=max(ans,a[i][j]);
            }
        }
        cout<<cnt<<endl<<ans<<endl;



	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main() {
	int paper[10][10];
	int x, y, size;
	int blank = 0, depth = 0;
	int dx[] = { 1, -1,  0,  0,  1, -1,  1, -1,  2, -2,  0,  0};
	int dy[] = { 0,  0,  1, -1,  1, -1, -1,  1,  0,  0,  2, -2};

	memset(paper, 0, sizeof(paper));
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		int i;
		switch (size) {
			case 3:
				for (i = 8; i < 12; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
			case 2:
				for (i = 4; i < 8; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
			case 1:
				for (i = 0; i < 4; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
				break;
		}
	}
	for (int i = 0; i < 10; i++)
		for (int j = 0; j < 10; j++)
			if (paper[i][j] == 0)
				blank++;
			else
				depth = max(depth, paper[i][j]);
	cout << blank << endl;
	cout << depth << endl;
	return 0;
}