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 <cstdio>

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size,mx,my;
	int dx[] = {0,-1,1,0,-1,1,-1,1,0,-2,2,0};
	int dy[] = {-1,0,0,1,-1,-1,1,1,-2,0,0,2};
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		for (int i=0; i<size*4; i++) {
			mx=x+dx[i];
			my=x+dy[i];
			if (mx>=0&&mx<10&&my>=0&&my<10) p[mx][my]++;
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) c++;
			else if (p[i][j]>m) m=p[i][j];
		}
	}
	scanf("%d\n%d\n",c,m);
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	string buf;
	vector< vector<int> > paper(14,vector<int>(14,0));
	while((cin>>buf)!=NULL){
		vector<int> a(3);
		for(int i=0;i<3;++i){
			a[i]=buf[2*i]-'0';
		}
		if(a[2]==1){
			const int dx[]={0,0,0,1,-1};
			const int dy[]={0,1,-1,0,0};
			for(int i=0;i<5;++i){
				++paper[a[0]+2+dx[i]][a[1]+2+dy[i]];
			}
		}else if(a[2]==2){
			const int dx[]={0,0,0,1,1,1,-1,-1,-1};
			const int dy[]={0,1,-1,0,1,-1,0,1,-1};
			for(int i=0;i<9;++i){
				++paper[a[0]+2+dx[i]][a[1]+2+dy[i]];
			}
		}else if(a[2]==3){
			const int dx[]={0,0,0,1,1,1,-1,-1,-1,0,2,0,-2};
			const int dy[]={0,1,-1,0,1,-1,0,1,-1,2,0,-2,0};
			for(int i=0;i<13;++i){
				++paper[a[0]+2+dx[i]][a[1]+2+dy[i]];
			}
		}
	}
	int cnt=0;
	int max=0;
	for(int i=2;i<12;++i){
		for(int j=2;j<12;++j){
			if(paper[i][j]==0){
				++cnt;
			}else{
				if(paper[i][j]>max) max=paper[i][j];
			}
		}
	}
	cout << cnt << endl;
	cout << max << endl;
	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;     

int ta[100][100];
const int BAN=10;
int main(){
 char ttmp;
int y,x,s,cnt=0,ma=0;
while(cin>>x>>ttmp>>y>>ttmp>>s){
	x+=2,y+=2;
	if(s==1){
	 ta[y][x]++;
	 ta[y+1][x]++;
	 ta[y][x-1]++;
	 ta[y-1][x]++;
	 ta[y][x+1]++;
	}
	if(s==2||s==3){
	for(int i=-1;i<=1;i++)for(int j=-1;j<=1;j++)ta[y+i][x+j]++;
	}
	if(s==3){
	ta[y+2][x]++;
	ta[y][x+2]++;
	ta[y-2][x]++;
	ta[y][x-2]++;
	}
}//endwhile
/*for(int i=2;i<BAN+2;i++){
	for(int j=2;j<BAN+2;j++){
	cout<<ta[i][j];
	}
	cout<<endl;
}*/
for(int i=0+2;i<BAN+2;i++){
	for(int j=0+2;j<BAN+2;j++){
	if(ta[i][j]==0)cnt++;
	ma=max(ma,ta[i][j]);
	}
}
cout<<cnt<<endl<<ma<<endl;
return 0;
}

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

//int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0};

int main(){
	int x, y, s;
	int board[10][10] = {{0}};
	while( ~scanf("%d,%d,%d", &x, &y, &s) ){
		if( s == 3 ){
			for(int i=-2; i<3; i++){
				for(int j=-2; j<3; j++){
					if( abs(i)+abs(j) < 3 ) board[y+i][x+j]++;
				}
			}
		}else if( s == 2 ){
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					board[y+i][x+j]++;
				}
			}
		}else{
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( abs(i)+abs(j) < 2 ) board[y+i][x+j]++;
				}
			}
		}
	}
	int max_c = 0, white = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if( board[i][j] == 0 ) white++;
			max_c = max(max_c, board[i][j]);
		}
	}
	cout << white << endl;
	cout << max_c << endl;
}

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

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  // 5, 9, 13
  int dx1[] = {-1,0,0,0,1};
  int dy1[] = {0,-1,0,1,0};
  int dx2[] = {-1,-1,-1,0,0,0,1,1,1};
  int dy2[] = {-1,0,1,-1,0,1,-1,0,1};
  int dx3[] = {-2,-1,-1,-1,0,0,0,0,0,1,1,1,2};
  int dy3[] = {0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
  vector<int> dx[3];
  vector<int> dy[3];
  dx[0].assign(dx1,dx1+5);
  dx[1].assign(dx2,dx2+9);
  dx[2].assign(dx3,dx3+13);
  dy[0].assign(dy1,dy1+5);
  dy[1].assign(dy2,dy2+9);
  dy[2].assign(dy3,dy3+13);
  
  int x, y, s;
  int ans1 = 100;
  int ans2 = 0;
  int ma[10][10];
  memset(ma,0,sizeof(ma));
  while(scanf("%d,%d,%d", &x,&y,&s)==3) {
    s--;
    REP(i,dx[s].size()) {
      int xx = x + dx[s][i];
      int yy = y + dy[s][i];
      if (xx<0||10<=xx||yy<0||10<=yy) continue;
      if (ma[xx][yy]==0) ans1--;
      ma[xx][yy]++;
      ans2 = max(ma[xx][yy], ans2);
    }

  }
  cout << ans1 << endl;
  cout << ans2 << endl;
}