Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

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;
}

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) == 3){
    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;
}