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 ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int mp[10][10];

int main(){
  int x,y,s;
  while(~scanf("%d,%d,%d",&x,&y,&s)){
    if(s==1){
      // small
      mp[x][y]++;
      if(x-1>=0) mp[x-1][y]++;
      if(x+1<=9) mp[x+1][y]++;
      if(y-1>=0) mp[x][y-1]++;
      if(y+1>=0) mp[x][y+1]++;
    }else if(s==2){
      // mid
      FOR(i,max(0,x-1),min(9,x+1)+1){
        FOR(j,max(0,y-1),min(9,y+1)+1){
          mp[i][j]++;
        }
      }
    }else{
      // big
      FOR(i,max(0,x-1),min(9,x+1)+1){
        FOR(j,max(0,y-1),min(9,y+1)+1){
          mp[i][j]++;
        }
      }
      if(x-2>=0) mp[x-2][y]++;
      if(x+2<=9) mp[x+2][y]++;
      if(y-2>=0) mp[x][y-2]++;
      if(y+2>=0) mp[x][y+2]++;
    }
  }
  int cnt = 0;
  int mx = 0;
  REP(i,10)REP(j,10){
    if(mp[i][j]==0)++cnt;
    else mx=max(mx,mp[i][j]);
  }
  cout<<cnt<<endl;
  cout<<mx<<endl;
  return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int x,y,t;
  int field[30][30] = {0};
  for(;;){
    if(scanf("%d,%d,%d",&x,&y,&t) == EOF){break;}
    field[x+10][y+10]++;
    field[x+9][y+10]++;
    field[x+11][y+10]++;
    field[x+10][y+9]++;
    field[x+10][y+11]++;
    if(t>1){
      field[x+9][y+11]++;
      field[x+9][y+9]++;
      field[x+11][y+11]++;
      field[x+11][y+9]++;
    }
    if(t>2){
      field[x+10][y+12]++;
      field[x+10][y+8]++;
      field[x+12][y+10]++;
      field[x+8][y+10]++;
    }
  }
  int ans[2] = {0};
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(!field[i+10][y+10]){ans[0]++;}
      if(field[i+10][y+10] > ans[1]){ans[1] = field[i+10][j+10];}
    }
  }
  cout <<ans[0]<<endl<<ans[1]<<endl;
  return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>

using namespace std;
void big(int x,int y,int a[10][10]);
void middle(int x,int y,int a[10][10]);
void small(int x,int y,int a[10][10]);

int main(){
	int a[10][10]={0};
	int x,y,s;
	char c;
	int cnt=0,max=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
	if(s==3)big(x,y,a);
	else if(s==2)middle(x,y,a);
	else if(s==1)small(x,y,a);
	
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)cnt++;
			if(a[i][j]>max)max=a[i][j];
			//cout<<a[i][j]<<" ";
		}
		//cout<<endl;
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

void big(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x-2][y]++;a[x][y-2]++;
	a[x-1][y]++;a[x][y-1]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x+2][y]++;a[x][y+2]++;	
	a[x+1][y+1]++;a[x-1][y-1]++;
	a[x+1][y-1]++;a[x-1][y+1]++;
}

void middle(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x-1][y]++;a[x][y-1]++;
	a[x+1][y+1]++;a[x-1][y-1]++;
	a[x+1][y-1]++;a[x-1][y+1]++;
}
void small(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x-1][y]++;a[x][y-1]++;
}

C++: #include<iostream>
#include<stdio.h>

int paper[10][10];
int vecx[] = { 0, 1, 0, -1 }, vecy[] = { -1, 0, 1, 0 };

int main()
{
	int x, y, size;
	
	while( scanf( "%d,%d,%d", &x, &y, &size ) != EOF ){
		switch( size ){
			case 1:
				paper[x][y]++;
				for( int i = 0; i < 4; i++ ){
					int nx = x + vecx[i], ny = y + vecy[i];
					
					if( nx >= 0 && nx < 10 && ny >= 0 && ny < 10 ){
						paper[nx][ny]++;
					}
				}
				break;
			case 2:
			        for( int i = -1; i <= 1; i++ ){
					for( int j = -1; j <= 1; j++ ){
						if( x + i >= 0 && x + i < 10 && y + j >= 0 && y + j < 10 ){
							paper[x+i][y+j]++;
						}
					}
				}
				
				break;
			case 3:
				for( int i = -1; i <= 1; i++ ){
					for( int j = -1; j <= 1; j++ ){
						if( x + i >= 0 && x + i < 10 && y + j >= 0 && y + j < 10 ){
							paper[x+i][y+j]++;
						}
					}
				}
				
				for( int i = 0; i < 4; i++ ){
					int nx = x + vecx[i] * 2, ny = y + vecy[i] * 2;
					
					if( nx >= 0 && nx < 10 && ny >= 0 && ny < 10 ){
						paper[nx][ny]++;
					}
				}
				break;
		}
	}
	
	int a = 0, b = 0;
	
	for( int i = 0; i < 10; i++ ){
		for( int j = 0; j < 10; j++ ){
			if( !paper[i][j] ){
				a++;
			}
			else{
			 	b = std::max( b, paper[i][j] );
			}
		}
	}
	
	std::cout << a << std::endl;
	std::cout << b << std::endl;

 	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int x,y,s,xx[196]={0},i,j,m=0,d,w=0;
char c;
while(cin>>x){
cin>>c>>y>>c>>s;
xx[x*14+y+16]++;
xx[x*14+y+29]++;
xx[x*14+y+30]++;
xx[x*14+y+31]++;
xx[x*14+y+44]++;
if(s>=2){
xx[x*14+y+15]++;
xx[x*14+y+17]++;
xx[x*14+y+43]++;
xx[x*14+y+45]++;
}
if(s>=3){
xx[x*14+y+2]++;
xx[x*14+y+28]++;
xx[x*14+y+32]++;
xx[x*14+y+58]++;
}
}
for(i=2;i<12;i++)
for(j=2;j<12;j++){
d=xx[i*14+j];
if(d>m)m=d;
if(d==0)w++;
}
cout<<w<<endl;
cout<<m<<endl;
return 0;
}