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

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

vector<vector<int>> vv;

void ink(int x, int y) {
    if (x >= 0 && x < 10 && y >= 0 && y < 10) {
        vv[x][y]++;
    }
}

void big(int x, int y) {
    ink(x-2,y);
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x+2,y);
    ink(x-1,y-1);
    ink(x,y-1);
    ink(x+1,y-1);
    ink(x-1,y+1);
    ink(x,y+1);
    ink(x+1,y+1);
    ink(x,y-2);
    ink(x,y+2);
}

void mid(int x, int y) {
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x-1,y-1);
    ink(x,y-1);
    ink(x+1,y-1);
    ink(x-1,y+1);
    ink(x,y+1);
    ink(x+1,y+1);
}

void small(int x, int y) {
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x,y-1);
    ink(x,y+1);
}

int countBlank() {
    int cnt = 0;
    REP(i,10) REP(j,10) if (vv[i][j] == 0) cnt++;
    return cnt;
}

int getThickest() {
    int t = 0;
    REP(i,10) REP(j,10) if (vv[i][j] > t) t = vv[i][j];
    return t;
}

int main() {
    REP(i,10) {
        vector<int> v(10,0);
        vv.push_back(v);
    }
    
    int x, y, s;
    string t;
    while(cin >> t) {
        x = t[0] - '0';
        y = t[2] - '0';
        s = t[4] - '0';
        switch (s) {
            case 1:
                small(x,y);
                break;
            case 2:
                mid(x,y);
                break;
            case 3:
                big(x,y);
                break;
                
            default:
                break;
        }
    }
    
    cout << countBlank() << endl << getThickest() << endl;
    
    return 0;
}

C++: #include <stdio.h>
#define B 13
#define M 8
#define S 4
void drop(int x,int y,int xy[][10]){
	if(x>-1&&x<10&&y>-1&&y<10) xy[y][x]++;
}


int main(){
	int x,y,size,max,num;
	int i,j;
	int xy[10][10];
	max=num=0;
	for(i=0;i<10;i++){
		for(j=0;j<10;j++) xy[i][j]=0;
	}
	int b[B][2] = {{0,-2},{-1,-1},{0,-1},{1,-1},{-2,0},{-1,0},{1,0},{2,0},{-1,1},{0,1},{1,1},{0,2}};
	int m[M][2] = {{-1,-1},{0,-1},{1,-1},{-1,0},{1,0},{-1,1},{0,1},{1,1}};
	int s[S][2] = {{0,-1},{-1,0},{0,1},{1,0}};

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
		case 1:
			for(int i=0;i<S;i++) drop(x+s[i][0],y+s[i][1],xy);
			break;
		case 2:
			for(int i=0;i<M;i++) drop(x+m[i][0],y+m[i][1],xy);
			break;
		case 3:
			for(int i=0;i<B;i++) drop(x+b[i][0],y+b[i][1],xy);
			break;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(!xy[i][j]) num++;
			else if(xy[i][j]>max) max = xy[i][j];
		}
	}
	printf("%d\n%d\n",num,max);
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define drep(n,m) for(int i=0;i<n;i++)for(int j=0;j<m;j++)
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

ll gcd(ll a,ll b){
    if(a<b){
        int t=a;a=b;b=t;
    }
    int c=a%b;
    while(c!=0){
        a=b;
        b=c;
        c=a%b;
    }
    return b;
}

ll lcm(ll a,ll b){
    return a*b/gcd(a,b);
}

bool isPrime(int x){
    if(x==1)return false;
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=3;i<=sqrt(x);i+=2){
        if(x%i==0)return false;
    }
    return true;
}

vector<vector<int>> v;
void calc1(int x,int y){
    v[y][x]++;
    rep(i,0,4){
        int nx=x+dx[i],ny=y+dy[i];
        if(0<=nx&&0<=ny&&nx<10&&ny<10)v[ny][nx]++;
    }
}

void calc2(int x,int y){
    v[y][x]++;
    for(int i=-1;i<=1;i++){
        for(int j=-1;j<=1;j++){
            int nx=x+i,ny=y+j;
            if(0<=nx&&0<=ny&&nx<10&&ny<10)v[ny][nx]++;
        }
    }
}

void calc3(int x,int y){
    calc2(x,y);
    rep(i,0,4){
        int nx=x+dx[i]*2,ny=y+dy[i]*2;
        if(0<=nx&&0<=ny&&nx<10&&ny<10)v[ny][nx]++;
    }
    
}
int main() {
    v.resize(10,vector<int>(10,0));
    int x,y,mode;
    char c;
    while(cin>>x>>c>>y>>c>>mode){
        if(mode==1)calc1(x,y);
        else if(mode==2)calc2(x,y);
        else calc3(x,y);
    }
    
    int blank=0,ma=-INF;
    rep(i,0,10){
        rep(j,0,10){
            if(v[i][j]==0)blank++;
            ma=max(ma,v[i][j]);
        }
    }
    cout<<blank<<endl<<ma-1<<endl;
    
  
    return 0;
}