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 <string>
using namespace std;
int dp[20][20];
int main(){
	for(int i=0;i<20;i++)
		for(int j=0;j<20;j++)
			dp[i][j]=-1;
	for(int i=5;i<15;i++)
		for(int j=5;j<15;j++)
			dp[i][j]=0;
	int x,y,s;
	int maxo,zero;
	char z;
	while(cin>>x>>z>>y>>z>>s){
		if(s==1){
			dp[x+5][y+5]++;
			if(dp[x-1+5][y+5]!=-1)
				dp[x-1+5][y+5]++;
			if(dp[x+1+5][y+5]!=-1)
				dp[x+1+5][y+5]++;
			if(dp[x+5][y-1+5]!=-1)
				dp[x+5][y-1+5]++;
			if(dp[x+5][y+1+5]!=-1)
				dp[x+5][y+1+5]++;
		}
		if(s==2){
			for(int i=x-1+5;i<=x+1+5;i++){
				for(int j=y-1+5;j<=y+1+5;j++){
					if(dp[i][j]!=-1)
						dp[i][j]++;
				}
			}
		}
		if(s==3){
			for(int i=x-1+5;i<=x+1+5;i++){
				for(int j=y-1+5;j<=y+1+5;j++){
					if(dp[i][j]!=-1)
						dp[i][j]++;
				}
			}
			if(dp[x-2+5][y+5]!=-1)
				dp[x-2+5][y+5]++;
			if(dp[x+2+5][y+5]!=-1)
				dp[x+2+5][y+5]++;
			if(dp[x+5][y-2+5]!=-1)
				dp[x+5][y-2+5]++;
			if(dp[x+5][y+2+5]!=-1)
				dp[x+5][y+2+5]++;
		}
		maxo=1,zero=0;
		for(int i=0;i<20;i++){
			for(int j=0;j<20;j++){
				if(dp[i][j]>maxo)
					maxo=dp[i][j];
				if(dp[i][j]==0)
					zero++;
			}
		}
	}
	cout<<zero<<endl;
	cout<<maxo<<endl;
	return 0;
}

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