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 <iostream>
using namespace std;

void big(int,int);
void medium(int,int);
void small(int,int);

int paper[10][10];

int main() {
	int x, y, num;
	char comma1, comma2;
	
	while (cin >> x >> comma1 >> y >> comma2 >> num) {
		switch (num) {
			case 1:
				small(x, y);
				break;
			case 2:
				medium(x, y);
				break;
			case 3:
				big(x, y);
				break;
			default:
				break;
		}
	}

	int count = 0, deep = 0;
	for (int i = 0; i < 10;i++) {
		for (int j = 0;j < 10;j++) {
			if (paper[i][j] == 0) count++;
			if (paper[i][j] > deep) deep = paper[i][j];
		}
	}

	cout << count << endl;
	cout << deep << endl;

	return 0;
}

void big(int x, int y) {
	medium(x, y);
	if (y + 2 < 10) paper[x][y + 2]++;
	if (y - 2 >= 0) paper[x][y - 2]++;
	if (x + 2 < 10) paper[x + 2][y]++;
	if (x - 2 >= 0) paper[x - 2][y]++;
	
	return;
}

void medium(int x, int y) {
	small(x, y);
	if (x + 1 < 10 && y + 1 < 10) paper[x + 1][y + 1]++;
	if (x - 1 >= 0 && y + 1 < 10) paper[x - 1][y + 1]++;
	if (x + 1 < 10 && y - 1 >= 0) paper[x + 1][y - 1]++;
	if (x - 1 >= 0 && y - 1 >= 0) paper[x - 1][y - 1]++;

	return;
}

void small(int x, int y) {
	paper[x][y]++;
	if (y + 1 < 10) paper[x][y + 1]++;
	if (y - 1 >= 0) paper[x][y - 1]++;
	if (x + 1 < 10) paper[x + 1][y]++;
	if (x - 1 >= 0) paper[x - 1][y]++;

	return;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int x,y,size;
  int paper[15][15]={};
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){

    x+=2;
    y+=2;

    paper[y][x]++;
    paper[y+1][x]++;
    paper[y-1][x]++;
    paper[y][x-1]++;
    paper[y][x+1]++;

    if(size>1){

      paper[y-1][x-1]++;
      paper[y-1][x+1]++;
      paper[y+1][x-1]++;
      paper[y+1][x+1]++;

      if(size==3){

	paper[y][x-2]++;
	paper[y][x+2]++;
	paper[y-2][x]++;
	paper[y+2][x]++;

      }
    }
  }
  int white=0;
  int m=0;
  int i,j;

  for(i=2;i<12;i++)
    for(j=2;j<12;j++){
    if(paper[i][j]==0)white++;
    m=max(m,paper[i][j]);
  }
  cout<<white<<endl;
  cout<<m<<endl;
}

C++: #include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define fi first
#define se second
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int INF=1000000;
int main(){
	int dp[11][11]={};
	int x,y,ss;
	string s;
	while(cin>>x>>s>>y>>s>>ss){
		dp[x][y]++;
		if(ss==1){
			if(y-1>=0) dp[x][y-1]++;
			if(y+1<=9) dp[x][y+1]++;
			if(x-1>=0) dp[x-1][y]++;
			if(x+1<=9) dp[x+1][y]++;
		}
		if(ss==2){
			if(y-1>=0) dp[x][y-1]++;
			if(y+1<=9) dp[x][y+1]++;
			if(x-1>=0) dp[x-1][y]++;
			if(x+1<=9) dp[x+1][y]++;
			if(x-1>=0&&y-1>=0) dp[x-1][y-1]++;
			if(x+1<=9&&y-1>=0) dp[x+1][y-1]++;
			if(x-1>=0&&y+1<=9) dp[x-1][y+1]++;
			if(x+1<=9&&y+1<=9) dp[x+1][y+1]++;
		}
		if(ss==3){
			if(y-1>=0) dp[x][y-1]++;
			if(y+1<=9) dp[x][y+1]++;
			if(x-1>=0) dp[x-1][y]++;
			if(x+1<=9) dp[x+1][y]++;
			if(x-1>=0&&y-1>=0) dp[x-1][y-1]++;
			if(x+1<=9&&y-1>=0) dp[x+1][y-1]++;
			if(x-1>=0&&y+1<=9) dp[x-1][y+1]++;
			if(x+1<=9&&y+1<=9) dp[x+1][y+1]++;
			if(x+2<=9) dp[x+2][y]++;
			if(x-2>=0) dp[x-2][y]++;
			if(y+2<=9) dp[x][y+2]++;
			if(y-2>=0) dp[x][y-2]++;
		}
	}
	int ans=0,max=0;
	for(int a=0;a<10;a++){
		for(int b=0;b<10;b++){
			if(dp[a][b]==0) ans++;
			if(dp[a][b]>=max) max=dp[a][b];
		}
	}
	cout<<ans<<endl;
	cout<<max<<endl;
}

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

typedef pair<int, int> p;
p ink1[4] = { p(0, 1), p(0, -1), p(1, 0), p(-1, 0) };
p ink2[4] = { p(1, 1), p(-1, -1), p(1, -1), p(-1, 1) };
p ink3[4] = { p(0, 2), p(0, -2), p(2, 0), p(-2, 0) };

int table[10][10];

int main()
{
	int x, y, size;
	while (scanf("%d,%d,%d", &x, &y, &size) != -1)
	{
		table[x][y]++;
		for (int i = 0; i < 4; i++)
		{
			int X = x + ink1[i].first;
			int Y = y + ink1[i].second;
			if (0 <= X && X <= 9 && 0 <= Y && Y <= 9) table[X][Y]++;
		}

		if (size == 1) continue;
		for (int i = 0; i < 4; i++)
		{
			int X = x + ink2[i].first;
			int Y = y + ink2[i].second;
			if (0 <= X && X <= 9 && 0 <= Y && Y <= 9) table[X][Y]++;
		}

		if (size == 2) continue;
		for (int i = 0; i < 4; i++)
		{
			int X = x + ink3[i].first;
			int Y = y + ink3[i].second;
			if (0 <= X && X <= 9 && 0 <= Y && Y <= 9) table[X][Y]++;
		}
	}

	int n = 0;
	int Max = 0;
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (table[i][j] == 0) n++;
			Max = max(Max, table[i][j]);
		}
	}
	printf("%d\n%d\n", n, Max);

	return 0;
}