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 <cstdio>
#include <cstring>
#include <iostream>
using namespace std;

int main(){
	int x, y, s;
	int f[10][10];
	
	memset(f, 0, sizeof(f));
	
	while( scanf(" %d,%d,%d", &x, &y, &s) != EOF ){
		if(s==1){
			for(int i=y-1; i<=y+1; ++i){
				int a=0;
				if(i==y) a=1;	
				for(int j=x-a; j<=x+a; ++j){
					if(i>=0 && i<10 && j>=0 && j<10) f[i][j]++;
				}	
			}
		}
		else if(s==2){
			for(int i=y-1; i<=y+1; ++i){
				for(int j=x-1; j<=x+1; ++j){
					if(i>=0 && i<10 && j>=0 && j<10) f[i][j]++;
				}
			}	
		}
		else if(s==3){
			for(int i=y-2; i<=y+2; ++i){
				int a=y-i;
				if(a<0) a=-a;
				a=a-2;
				if(a<0) a=-a;	
				for(int j=x-a; j<=x+a; ++j){
					if(i>=0 && i<10 && j>=0 && j<10) f[i][j]++;
				}	
			}
		}
	}
	
	int max=0, count=100;
	for(int i=0; i<10; ++i){
		for(int j=0; j<10; ++j){
			//printf("%d", f[i][j]);
			if(f[i][j]>0) count--;
			if(f[i][j]>max) max=f[i][j];
		}
		//printf("\n");
	}
	
	printf("%d\n%d\n", count, max);
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

void disp_paper (vector <vector <int> > paper )
{
	int i,j;

	cout << endl;
	cout << "n:";
	for (i = 0; i < 10; ++i){
		cout << i << ' ';
	} // end for
	cout << endl;

	for (i = 2; i < 12; ++i){
		cout << (i-2) << ' ';
		for (j = 2; j < 12; ++j){
			cout << paper[i][j] << ' ';
		} // end for
		cout << endl;
	} // end for
	cout << endl;
}

int main()
{
//	cut here before submit 
//	freopen("testcase.di", "r", stdin);
	const int small[][3] = { 
					{ 0, 1 ,0 },
					{ 1, 1, 1 },
					{ 0, 1, 0 } 
				};
	const int medium[][3] = {
					{ 1, 1, 1 },
					{ 1, 1, 1 },
					{ 1, 1, 1 }
				};
	const int large[][5] = {
					{ 0, 0, 1, 0, 0 },
					{ 0, 1, 1, 1, 0 },
					{ 1, 1, 1, 1, 1 },
					{ 0, 1, 1, 1, 0 },
					{ 0, 0, 1, 0, 0 }
				};
										
	string str = "";
	vector <vector <int> > paper (14, vector <int> (14, 0 ) );
	vector <int> px, py, size;

	while (getline (cin, str ) ){
		int x, y, s;
		while (str.find(',') != string::npos ){
			str = str.replace(str.find(','), 1, " ");
		} // end while
		stringstream ss(str);
		ss >> x >> y >> s;
		px.push_back(x); py.push_back(y); size.push_back(s);		
	} // end for
	
	int n = px.size();
	int i,j,k;

//	for (i = 0; i < n; ++i){
//		cout << px[i] << ' ' << py[i] << ' ' << size[i] << endl;
//	} // end for

	for (k = 0; k < n; ++k){
		if (size[k] == 1){
			for (i = -1; i <= 1; ++i){
				for (j = -1; j <= 1; ++j){
					paper[ py[k] + 2 + i][ px[k] + 2 + j] += small[i+1][j+1];
				} // end for
			} // end for
		}else if (size[k] == 2){
			for (i = -1; i <= 1; ++i){
				for (j = -1; j <= 1; ++j){
					paper[ py[k] + 2 + i][ px[k] + 2 + j] += medium[i+1][j+1];
				} // end for
			} // end for
		}else if (size[k] == 3){
			for (i = -2; i <= 2; ++i){
				for (j = -2; j <= 2; ++j){
					paper[ py[k] + 2 + i][ px[k] + 2 + j] += large[i+2][j+2];
				} // end for
			} // end for
		} // end if
//		disp_paper (paper );
	} // end for

	int res = 0;
	int maxd = 0;
	for (i = 2; i < 12; ++i){
//		cout << (i-2) << ' ';
		for (j = 2; j < 12; ++j){
			if (paper[i][j] == 0){
				++res;
			}else{
				maxd = max (maxd, paper[i][j]);
			} // end if
//			cout << paper[i][j] << ' ';
		} // end for
//		cout << endl;
	} // end for

	cout << res << endl;
	cout << maxd << endl;
		
	return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;

int main(void){
  vector < vector <int> > square;
  square.resize(14);
  for(int i=0; (int)i<square.size(); i++){
    square[i].resize(14);
  }
  for(int i=0; i<(int)square.size(); i++){
    for(int j=0; j<(int)square[i].size(); j++){
      square[i][j] =0;
    }
  }

  int x, y, size;
  int min=0, max=0;

  while( cin >> y >> x >> size ){
    x+=2;
    y+=2;
    if(size>=1 && size<=3){
      square[x][y]++;
      square[x][y-1]++;
      square[x-1][y]++;
      square[x+1][y]++;
      square[x][y+1]++;
    }
    if(size==2 || size==3){
      square[x-1][y-1]++;
      square[x+1][y-1]++;
      square[x-1][y+1]++;
      square[x+1][y+1]++;
    }
    if(size==3){
      square[x][y-2]++;
      square[x-2][y]++;
      square[x+2][y]++;
      square[x][y+2]++;
    }
  }
  for(int i=2; i<(int)square.size()-2; i++){
    for(int j=2; j<(int)square[i].size()-2; j++){
      if( square[i][j]==0 ){
        min++;
      }else if(max < square[i][j]){
        max=square[i][j];
      }
    }
  }

  cout << min << endl << max << endl;

  return 0;
}

C++: #include <iostream>

using namespace std;

int small_x[4] = {-1,  0, 0, 1};
int small_y[4] = { 0, -1, 1, 0};

int medium_x[8] = {-1, -1, -1,  0, 0,  1, 1, 1};
int medium_y[8] = {-1,  0,  1, -1, 1, -1, 0, 1};

int large_x[12] = {-2, -1, -1, -1,  0,  0, 0, 0,  1, 1, 1, 2};
int large_y[12] = { 0, -1,  0,  1, -2, -1, 1, 2, -1, 0, 1, 0};

void solve()
{
	int Field[14][14];
	memset(Field, 0, sizeof(Field));
	int a, b, c;
	while(scanf("%d,%d,%d", &a, &b, &c))
	{
		++Field[b + 2][a + 2];
		if(c == 1)
		{
			for(int i = 0; i < 4; ++i)
			{
				++Field[b + 2 + small_y[i]][a + 2 + small_x[i]];
			}
		}
		else if(c == 2)
		{
			for(int i = 0; i < 8; ++i)
			{
				++Field[b + 2 + medium_y[i]][a + 2 + medium_x[i]];
			}
		}
		else if(c == 3)
		{
			for(int i = 0; i < 12; ++i)
			{
				++Field[b + 2 + large_y[i]][a + 2 + large_x[i]];
			}
		}
	}
	int count = 0;
	int Max = 0;
	for(int i = 2; i < 12; ++i)
	{
		for(int j = 2; j < 12; ++j)
		{
			if(Field[i][j] == 0)
			{
				++count;
			}
			if(Max < Field[i][j])
			{
				Max = Field[i][j];
			}
		}
	}
	cout << count << endl;
	cout << Max << endl;
}

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