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<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

const int MAX_H = 10;
const int MAX_W = 10;
int m[MAX_H][MAX_W];
int x, y ,s;
int cnt = MAX_H * MAX_W;
int mx;

inline bool check(int x, int y){ return 0 <= x && x < MAX_H && 0 <= y && y < MAX_W; }

void dfs(int x, int y)
{
  maxup(mx, m[x][y]);
  m[x][y] = 0;
  cnt -= 1;
  erep(dx, -1, 1) erep(dy, -1, 1) if(check(x+dx, y+dy)) if(m[x+dx][y+dy]) dfs(x+dx, y+dy);
}

int main()
{
  while(~scanf("%d,%d,%d", &x, &y, &s)){
    m[x][y] += 1;
    if(s%2){
      int d = s/2 + 1;
      int dx[] = {-d, 0, d, 0};
      int dy[] = {0, -d, 0, d};
      rep(i, 4) if(check(x+dx[i], y+dy[i])) m[x+dx[i]][y+dy[i]] += 1;
    }
    if(s-1){
      erep(i, -1, 1) erep(j, -1, 1) if(i || j) if(check(x+i, y+j)) m[x+i][y+j] += 1;
    }
  }

  rep(i, MAX_H) rep(j, MAX_W) if(m[i][j]) dfs(i, j);

  cout << cnt << endl << mx << endl;

  return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <iomanip>
using namespace std;
int main(){
  int x,y,size,m[14][14]={0},max=0,none=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF{
    if(size>=1){
      m[x+2][y+2]++;
      m[x+2][y+1]++;
      m[x+2][y+3]++;
      m[x+1][y+2]++;
      m[x+3][y+2]++;
    }
    if(size>=2){
      m[x+1][y+1]++;
      m[x+1][y+3]++;
      m[x+3][y+1]++;
      m[x+3][y+3]++;
    }
    if(size==3){
      m[x+2][y]++;
      m[x+2][y+4]++;
      m[x][y+2]++;
      m[x+4][y+2]++;
    }
    for(y=0;y<14;y++){
      for(x=0;x<14;x++){
	cout<<m[x][y];
	(x==13)?cout<<endl:cout<<" ";
      }
    }
  }
  for(y=0;y<10;y++){
    for(x=0;x<10;x++){
      if(m[x+2][y+2]>max)max=m[x+2][y+2];
      if(!m[x+2][y+2])none++;
    }
  }
  cout<<none<<endl<<max<<endl;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int field[20][20]={0};
  int x,y,s;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    x+=5;
    y+=5;
    if(s>2){
      field[x+2][y]++;
      field[x-2][y]++;
      field[x][y+2]++;
      field[x][y-2]++;
    }
    if(s>1){
      field[x+1][y+1]++;
      field[x+1][y-1]++;
      field[x-1][y+1]++;
      field[x-1][y-1]++;
    }
    field[x][y]++;
    field[x+1][y]++;
    field[x][y+1]++;
    field[x-1][y]++;
    field[x][y-1]++;
  }
  int aans=0,bans=0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(field[i+5][j+5] == 0) aans++;
      if(bans<field[i+5][j+5]) bans = field[i+5][j+5];	
    }
  }
  cout <<aans<<endl<<bans<<endl;
  return 0;
}

C++: #include<iostream>

using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(cin>>x>>c>>y>>c>>s &&s){
		
		while(1){
			data[x][y]++;
			if(y-1>=0)data[x][y-1]++;
			if(x+1<10)data[x+1][y]++;
			if(y+1<10)data[x][y+1]++;
			if(x-1>=0)data[x-1][y]++;
			if(s==1)break;
			if(x+1<10 && y+1<10)data[x+1][y+1]++;
			if(x+1<10 && y-1>=0)data[x+1][y-1]++;
			if(x-1>=0 && y-1>=0)data[x-1][y-1]++;
			if(x-1>=0 && y+1<10)data[x-1][y+1]++;
			if(s==2)break;
			if(x+2<10)data[x+2][y]++;
			if(y-2>=0)data[x][y-2]++;
			if(y+2<10)data[x][y+2]++;
			if(x-2>=0)data[x-2][y]++;
			break;
		}
		
	}
	int white=0,ma=0;
	for(int i=0;i<i<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<" "<<ma<<endl;
}

C++: #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


#define X real()
#define Y imag()
typedef complex<double> P;

int main(){
	const int N = 10;
	int masu[N][N]={0};
	int a,b,c;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		string hit[4][5]={
			{"","","","",""},
			{
				"00000",
				"00100",
				"01110",
				"00100",
				"00000",
			},
			{
				"00000",
				"01110",
				"01110",
				"01110",
				"00000",
			},
			{
				"00100",
				"01110",
				"11111",
				"01110",
				"00100",
			},
		};
		
		a-=2;
		b-=2;
		
		rep(i,5){
			rep(j,5){
				int x = a+i;
				int y = b+j;
				if(x<0 || y<0 || x>=N || y>=N)continue;
				masu[y][x] += hit[c][i][j]-'0';
			}
		}
		
	}
	int z = 0;
	int p = 0;
	
	rep(i,N)rep(j,N){
		if(masu[i][j]==0)z++;
		p=max(p,masu[i][j]);
	}
	
	printf("%d %d\n",z,p);
	
}