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 <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <climits>
#include <utility>

#define PRINT(STR) cout << STR << endl;
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define SPACE " "

typedef long long ll;

using namespace std;

int nextInt() { int n = -1; cin >> n; return n; }
double nextDouble() { double d = -1; cin >> d; return d; }
ll nextll() { ll n = -1; cin >> n; return n; }
string nextString() { string str; cin >> str; return str; }

int INF = 1LL << 25;
double EPS = 1e-9;

// BEGIN //////////////////////////////////////////////////////////////
int board[14][14];
int main() {
	int x, y, s;
	while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
		x += 2;
		y += 2;
		switch (s) {
			case 1: {
				board[x][y]++; board[x+1][y]++; board[x][y+1]++;
				board[x-1][y]++; board[x][y-1]++;
				break;
			}
			case 2: {
				board[x][y]++; board[x][y-1]++; board[x+1][y-1]++;
				board[x+1][y]++; board[x+1][y+1]++; board[x][y+1]++;
				board[x-1][y+1]++; board[x-1][y]++; board[x-1][y-1]++;
				break;
			}
			case 3: {
				board[x][y]++; board[x][y-1]++; board[x+1][y-1]++;
				board[x+1][y]++; board[x+1][y+1]++; board[x][y+1]++;
				board[x-1][y+1]++; board[x-1][y]++; board[x-1][y-1]++;
				board[x][y-2]++; board[x+2][y]++; board[x][y+2]++;
				board[x-2][y]++;
				break;
			}
		}
	}
	int s_max = -1;
	int empty_num = 0;
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (board[i][j] > s_max) {
				s_max = board[i][j];
			}
			if (board[i][j] == 0) {
				empty_num++;
			}
		}
	}
	cout << empty_num << endl << s_max << endl;
}
// END   //////////////////////////////////////////////////////////////

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

void solve()
{
	int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0};
	int dy[] = {0, -1, 0, 1, 1, -1, 1, -1, 0, -2, 0, 2};
	int field[10][10] = {0};
	int x, y, size;
	while(scanf("%d,%d,%d", &x, &y, &size))
	{
		++field[x][y];
		int n = 4 * size;
		for(int i = 0; i < n; ++i)
		{
			if((0 <= x + dx[i] && x + dx[i] < 10) && (0 <= y + dy[i] && y + dy[i] < 10))
			{
				++field[x + dx[i]][y + dy[i]];
			}
		}
	}
	int count = 0;
	int max = 0;
	for(int i = 0; i < 10; ++i)
	{
		for(int j = 0; j < 10; ++j)
		{
			if(field[i][j] >= 1)
			{
				++count;
			}
			if(field[i][j] > max)
			{
				max = field[i][j];
			}
		}
	}
	cout << 100 - count << endl;
	cout << max << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int field[10][10] = {0};

void dfs1(int x, int y) {
  field[y][x] += 1;
  for(int dx = -1 ; dx <= 1 ; dx++) {
    int nx = x + dx;
    if(0 <= nx && nx < 10 && nx != x) field[y][nx] += 1;
  }
  for(int dy = -1 ; dy <= 1 ; dy++) {
    int ny = y + dy;
    if(0 <= ny && ny < 10 && ny != y) field[ny][x] += 1;
  }
}

void dfs2(int x, int y) {
  field[y][x] += 1;
  if(y+1 < 10) field[y+1][x] += 1;
  if(y-1 >= 0) field[y-1][x] += 1;
  if(x+1 < 10) field[y][x+1] += 1;
  if(x-1 >= 0) field[y][x-1] += 1;
  for(int dx = -1 ; dx <= 1 ; dx++) {
    for(int dy = -1 ; dy <= 1 ; dy++) {
      int nx = x + dx, ny = y + dy;
      if(0 <= nx && nx < 10 && 0 <= ny && ny < 10 && nx != x && ny != y) field[ny][nx] += 1;
    }
  }
}

void dfs3(int x, int y) {
  field[y][x] += 1;
  if(y+2 < 10) field[y+2][x] += 1;
  if(y-2 >= 0) field[y-2][x] += 1;
  if(x+2 < 10) field[y][x+2] += 1;
  if(x-2 >= 0) field[y][x-2] += 1;
  if(y+1 < 10) field[y+1][x] += 1;
  if(y-1 >= 0) field[y-1][x] += 1;
  if(x+1 < 10) field[y][x+1] += 1;
  if(x-1 >= 0) field[y][x-1] += 1;
  for(int dx = -1 ; dx <= 1 ; dx++) {
    for(int dy = -1 ; dy <= 1 ; dy++) {
      int nx = x + dx, ny = y + dy;
      if(0 <= nx && nx < 10 && 0 <= ny && ny < 10 && nx != x && ny != y) field[ny][nx] += 1;
    }
  }
}

int main(void) {
  int x, y, size;
  char c1, c2;
  int max=0;
  int white=0;
  while(cin >> x >> c1  >> y >> c2 >> size) {
    if(size == 1) dfs1(x, y);
    if(size == 2) dfs2(x, y);
    if(size == 3) dfs3(x, y);
  }
  /*for(int i = 0 ; i < 10 ; i++) {
    for(int j = 0 ; j < 10 ; j++) {
      cout << field[i][j] << ' ';
    }
    cout << endl;
    }*/
  for(int i = 0 ; i < 10 ; i++) {
    for(int j = 0 ; j < 10 ; j++) {
      if(field[i][j] > max) max = field[i][j];
      if(field[i][j] == 0) white++;
    }
  }
  cout << white << endl;
  cout << max << endl;
  return 0;
}

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

int main() {
  int ink1[5][2] = {{0,0},{1,0},{0,1},{-1,0},{0,-1}};
  int ink2[9][2] = {{0,0},{1,0},{0,1},{-1,0},{0,-1},
		    {1,1},{-1,1},{-1,-1},{1,-1}};
  int ink3[13][2] =  {{0,0},{1,0},{0,1},{-1,0},{0,-1},
		      {1,1},{-1,1},{-1,-1},{1,-1},
		      {2,0},{0,2},{-2,0},{0,-2}};

  static int ink_num[3] = {5, 9, 13};
  
  int map[P_SIZE][P_SIZE];
  for(int i = 0; i < P_SIZE; i++) {
    for(int j = 0; j < P_SIZE; j++) {
      map[i][j] = 0;
    }
  }

  int x, y, size;
  while(scanf("%d,%d,%d", &x, &y, &size) != EOF) {
    for(int i = 0; i < ink_num[size-1]; i++) {
      int nx, ny;
      switch(size) {
      case 1:
	nx = x + ink1[i][0];
	ny = y + ink1[i][1];
	break;
      case 2:
	nx = x + ink2[i][0];
	ny = y + ink2[i][1];
	break;
      case 3:
	nx = x + ink3[i][0];
	ny = y + ink3[i][1];
	break;
      }
      if(nx < 0 || nx >= P_SIZE || ny < 0 || ny >= P_SIZE) continue;

      map[ny][nx] += 1;
    }
  }

    int inkMax = 0;
    int space = 0;
    for(int i = 0; i < P_SIZE; i++) {
      for(int j = 0; j < P_SIZE; j++) {
	if(map[i][j] == 0) space++;
	if(map[i][j] > inkMax) inkMax = map[i][j];
      }
    }
    cout << space << endl;
    cout << inkMax << endl;
  return 0;
}