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	<iostream>
#include	<cstdio>
#include	<algorithm>

using namespace std;

short inkmap[10][10] = { 0 };

void drawSmall(int, int);
void drawMedium(int, int);
void drawLarge(int, int);
void sch(short *, short *);

int main(void) {
	short mx = 0, buff[3], c = 0;
	
	while( scanf("%d,%d,%d", &buff[0], &buff[1], &buff[2]) != EOF ) {
		switch(buff[2]) {
		case 1:
			drawSmall(buff[0], buff[1]);		break;
		case 2:
			drawMedium(buff[0], buff[1]);		break;
		case 3:
			drawLarge(buff[0], buff[1]);		break;
		}
	}
	sch(&c, &mx);
	cout << c << endl << mx << endl;
}

void drawSmall(int x, int y) {
	const short vX[5] = { 0, -1, 0, 1, 0 };
	const short vY[5] = { -1, 0, 0, 0, 1 };
	int nX, nY;
	for(int i = 0; i < 5; i++) {
		nX = x + vX[i], nY = y + vY[i];
		if( ( 0 <= nX && nX < 10 ) && ( 0 <= nY && nY < 10 ) )
		inkmap[nX][nY]++;
	}
}
void drawMedium(int x, int y) {
	const short vX[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1 };
	const short vY[9] = { -1, -1, -1, 0, 0, 0, 1, 1, 1 };
	int nX, nY;
	for(int i = 0; i < 9; i++) {
		nX = x + vX[i], nY = y + vY[i];
		if( ( 0 <= nX && nX < 10 ) && ( 0 <= nY && nY < 10 ) )
		inkmap[nX][nY]++;
	}
}
void drawLarge(int x, int y) {
	const short vX[13] = { 0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0 };
	const short vY[13] = { -2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2 };
	int nX, nY;
	for(int i = 0; i < 13; i++) {
		nX = x + vX[i], nY = y + vY[i];
		if( ( 0 <= nX && nX < 10 ) && ( 0 <= nY && nY < 10 ) )
		inkmap[nX][nY]++;
	}
}
void sch(short *c, short *m) {
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			if(inkmap[i][j] == 0) {
				(*c)++;
			}
			else {
				*m = max(*m, inkmap[i][j]);
			}
		}
	}
}

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 filldd(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]++;
	}
}
void filldia(int x, int y){
	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 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]++;
	}
	filldia(x,y);
}
void chuu(int x, int y){
	filldd(x,y);
	filldia(x,y);
}

int main(){
	int x,y,sz;
	memset(paper,0,sizeof(paper));
	while(~scanf("%d,%d,%d",&x,&y,&sz)){
		paper[y][x]++;
		if( sz==3 )      dai(x,y);
		else if( sz==2 ) chuu(x,y);
		else             filldd(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 <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]++;
}