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 <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

void drop1(int s[][14] , int x , int y){
	s[x][y]++;
	s[x-1][y]++;
	s[x][y-1]++;
	s[x+1][y]++;
	s[x][y+1]++;
}

void drop2(int s[][14] , int x , int y){
	drop1(s , x , y);
	s[x-1][y-1]++;
	s[x+1][y-1]++;
	s[x-1][y+1]++;
	s[x+1][y+1]++;
}

void drop3(int s[][14] , int x , int y){
	drop2(s , x , y);
	s[x-2][y]++;
	s[x][y-2]++;
	s[x+2][y]++;
	s[x][y+2]++;
}


int main(){
	int square[14][14]={0};
	int x , y , s , mx=0 ,cnt=0;
	while(scanf("%d,%d,%d",&x,&y,&s)){
		switch(s){
			case 1:
			drop1(square , x+2 , y+2);
			break;
			case 2:
			drop2(square , x+2 , y+2);
			break;
			case 3:
			drop3(square , x+2 , y+2);
		}
	}
		for(int i=2;i<12;++i){
			for(int j=2;j<12;++j){
				if(square[i][j]==0) cnt++;
				mx=max(mx , square[i][j]);
			}
		}
		cout << cnt << endl << mx << endl;	
	return 0; 
}

C++: #include <bits/stdc++.h>

#define SIZE 300005
#define MOD 1000000007LL
#define INF INT_MAX / 3
#define LLINF 1LL << 60
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)
#define SET(a,c) memset(a,c,sizeof a)
#define FORALL(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique((o).begin(),(o).end()), (o).end())
#define SQ(x) ((x)*(x))
using namespace std;
typedef long long ll;
typedef valarray<int> Array;
typedef pair<ll,ll> Pll;
typedef pair<int, int> Pii;
typedef pair<double, double> Pdd;
template<typename T> inline void priv(vector<T>a){REP(i,a.size()){cout<<a[i];if(i==a.size()-1)cout<<endl;else cout<<" ";}}
int gcd(int a,int b){int c=max(a,b);int d=min(a,b);return c==0||d==0?c:gcd(c%d,d);}
int lcm(int a,int b){return a==0||b==0?0:a*b/gcd(a,b);}

int a[100];

void solve(int x, int y, int s)
{
  REP(i,10) REP(j,10)
  {
    if(s == 3 && abs(x-i)+abs(y-j)<=2) a[i+j*10]++;
    if(s == 2 && abs(x-i)<=1 && abs(y-j)<=1) a[i+j*10]++;
    if(s == 1 && abs(x-i)+abs(y-j)<=1) a[i+j*10]++;
  }
}

int main()
{
  fill_n(a,100,0);
  int x, y, s;
  while(~scanf("%d,%d,%d",&x,&y,&s))
    solve(x,y,s);
  int ans1 = 0, ans2 = -1;
  REP(i,100)
  {
    if(a[i] == 0) ans1++;
    ans2 = max(ans2, a[i]);
  }
  printf("%d\n%d\n",ans1,ans2);
  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<random>
using namespace std;

int main(){

  int s3x[12] = {0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2};
  int s3y[12] = {1, 0, -1, 0, 1, -1, 1, -1, 2, 0, -2, 0};

  vector< vector<int> > p( 10, vector<int> (10, 0) );
  int x, y, s;
  int cnt = 0;
  int mx = 0;
  // while( cin >> x >> y >> s ){
  while( scanf("%d,%d,%d\n", &x, &y, &s) != EOF ){
    p[ x ][ y ]++;
    cnt++;
    for(int i=0; i<s*4; i++){
      int tx = x + s3x[i];
      int ty = y + s3y[i];
      if( tx < 0 || ty < 0 || tx >= 10 || ty >= 10 ) continue;
      p[tx][ty]++;
      cnt++;
      mx = max(mx, p[tx][ty]);
    }
    cerr << cnt << endl;
  }
  cout << cnt << endl;
  cout << mx << endl;
  return 0;
}




// EOF

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

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)

long long paper[10][10];
const int dx[] = {0,0,1,-1};
const int dy[] = {1,-1,0,0};
const int diax[] = {1,1,-1,-1};
const int diay[] = {-1,1,1,-1};

void dai(int x, int y){
	REP(z,1,3)rep(k,4){
		int tx = x+dx[k]*z , ty = y+dy[k]*z;
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
	rep(k,4){
		int tx = x+diax[k] , ty = y+diay[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}
void chuu(int x, int y){
	rep(k,4){
		int tx = x+dx[k] , ty = y+dy[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
	rep(k,4){
		int tx = x+diax[k] , ty = y+diay[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}
void shou(int x, int y){
	rep(k,4){
		int tx = x+dx[k] , ty = y+dy[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}

int main(){
	int x,y,sz;
	memset(paper,0,sizeof(paper));
	while(~scanf("%d,%d,%d",&x,&y,&sz)){
		if( sz==3 )      dai(x,y);
		else if( sz==2 ) chuu(x,y);
		else             shou(x,y);
	}
	long long nasi = 0, ari = 0;
	rep(i,10)rep(j,10){
		if( paper[i][j]==0 )nasi++;
		else{
			ari = max(ari,paper[i][j]);
		}
	}
	printf("%lld\n%lld\n",nasi,ari);
	return 0;
}

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

using namespace std;

int main(){
	int a[15][15]={0};
	int x,y,s;
	
	while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
		a[x+2][x+2]++;a[x+1][y+2]++;a[x+3][y+2]++;a[x+2][y+1]++;a[x+2][y+3]++;
		if(1<s){a[x+1][y+1]++;a[x+3][y+3]++;a[x+1][y+3]++;a[x+3][y+1]++;}
		if(2<s){a[x][y+2]++;a[x+4][y+2]++;a[x+2][y+2]++;a[x+2][y]++;a[x+2][y+2]++;}
	}
	int br=0,max=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(0==a[i][j])br++;
			if(max<a[i][j])max=a[i][j];
		}
	}
	
        cout<<br<<endl;
        cout<<max<<endl;
}