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 <sstream>
//#include <fstream>

using namespace std;

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 (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
	} // end for

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

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

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

int m[10][10];
int ax[12]={0,1,0,-1,1,1,-1,-1,0,2,0,-2};
int ay[12]={-1,0,1,0,-1,1,1,-1,-2,0,2,0};

void dfs(int x,int y,int size){
  m[x][y]+=1;
  if(size==1){
    for(int i=0;i<4;i++){
      if(x-ax[i]<0 || x-ax[i]>9 || y-ay[i]<0 || y-ay[i]>9) continue;
      m[x-ax[i]][y-ay[i]]+=1;
    }
  }else if(size==2){
    for(int i=0;i<8;i++){
      if(x-ax[i]<0 || x-ax[i]>9 || y-ay[i]<0 || y-ay[i]>9) continue;
      m[x-ax[i]][y-ay[i]]+=1;
    }
  }else if(size==3){
    for(int i=0;i<12;i++){
      if(x-ax[i]<0 || x-ax[i]>9 || y-ay[i]<0 || y-ay[i]>9) continue;
      m[x-ax[i]][y-ay[i]]+=1;
    }
  }

}


int main(){
  int x,y,size,clear=0,color=0;

  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      m[i][j]=0;
    }
  }

  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    dfs(x,y,size);
  }

  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(m[i][j]==0){
	clear++;
      }else if(m[i][j]>color){
	color=m[i][j];
      }

    }
  }

  cout << clear << endl;
  cout << color << endl;

}

C++: #include <cstdio>

int main(void) {
	int x,y,s;
	int map[10][10],w=0,m=0,t=0;
	int i,j;

	for(i=0;i<10;i++) { for(j=0;j<10;j++) { map[j][i] = 0; } }
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF) {
		switch(s) {
			case 3:
				if(x-2>=0) { map[x-2][y]++; }
				if(x+2<10) { map[x+2][y]++; }
				if(y-2>=0) { map[x][y-2]++; }
				if(y+2<10) { map[x][y+2]++; }
			case 2:
				if(x-1>=0) {
					if(y-1>=0) { map[x-1][y-1]++; }
					if(y+1<10) { map[x-1][y+1]++; }
				}
				if(x+1<10) {
					if(y-1>=0) { map[x+1][y-1]++; }
					if(y+1<10) { map[x+1][y+1]++; }
				}
			case 1:
				if(x-1>=0) { map[x-1][y]++; }
				if(x+1<10) { map[x+1][y]++; }
				if(y-1>=0) { map[x][y-1]++; }
				if(y+1<10) { map[x][y+1]++; }
			default:
				map[x][y]++;
				break;
		}
	}
	for(i=0;i<10;i++) {
		for(j=0;j<10;j++) {
			if(map[j][i]==0) { w++; }
			if(map[j][i]==m) { t++; }
			else if(map[j][i]>m) { m=map[j][i];t=0; }
			//printf("%d ", map[j][i]);
		}
		//printf("\n");
	}
	printf("%d\n%d\n", w, m);
	return 0;
}

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) 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) 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) f[i][j]++;	
			}
		}
	}
	
	int max=0, count=100;
	for(int i=0; i<10; ++i){
		for(int j=0; j<10; ++j){
			if(f[i][j]>0) count--;
			if(f[i][j]>max) max=f[i][j];
		}
	}
	
	printf("%d\n%d\n", count, max);
}