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 <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;
}