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 <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };
const int dx2[] = { -1, -1, 1, 1 }; const int dy2[] = { -1, 1, 1, -1 };
int main() {
	string s;
	int cell[10][10]={0};
	while (getline(cin, s),cin){
		if (s.empty())break;
		int x, y, size;
		x = s[0]-'0';
		y = s[2] - '0';
		size = s[4] - '0';
		switch (size)
		{
		case 3:
			REP(i, 4){
				if (0 <= x + dx[i] * 2 && x + dx[i] * 2 <= 9 && 0 <= y + dy[i] * 2 && y + dy[i] * 2 <= 9)
					cell[x + dx[i] * 2][y + dy[i] * 2]++;
			}
		case 2:
			REP(i, 4){
				if (0 <= x + dx2[i]  && x + dx2[i]  <= 9 && 0 <= y + dy2[i]  && y + dy2[i]  <= 9)
					cell[x + dx2[i] ][y + dy2[i]]++;
			}
		case 1:
			REP(i, 4){
				if (0 <= x + dx[i] && x + dx[i] <= 9 && 0 <= y + dy[i] && y + dy[i] <= 9)
					cell[x + dx[i]][y + dy[i]]++;
			}
			break;
		}
	}
	int maxb=0;
	int count=0;
	REP(i,10){
		REP(j,10){
			if(cell[i][j]==0)
			count++;
			maxb=max(maxb,cell[i][j]);
		}
	}
	cout<<count<<endl<<maxb<<endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
	int box[11][11];
	int i,j;
	int x,y,z;
	int sx[4]={ 0,-1, 1, 0};
	int sy[4]={-1, 0, 0, 1};
	int mx[8]={-1, 0, 1,-1, 1,-1, 0, 1};
	int my[8]={-1,-1,-1, 0, 0, 1, 1, 1};
	int lx[12]={ 0,-1, 0, 1,-2,-1, 1, 2,-1, 0, 1, 0};
	int ly[12]={-2,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 2};
	int xx,yy;
	int sum,MAX;
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			box[i][j]=0;
		}
	}
	while(scanf("%d",&x)!=EOF){
		scanf(",%d,%d",&y,&z);
		if(0<=x&&x<10&&0<=y&&y<10)	box[y][x]++;
		if(z==1){
			for(i=0;i<4;i++){
				xx=x+sx[i];
				yy=y+sy[i];
				//cout<<xx<<" "<<yy<<endl;
				if(0<=xx&&xx<10&&0<=yy&&yy<10){
					box[yy][xx]++;
				}
			}
		}
		else if(z==2){
			for(i=0;i<8;i++){
				xx=x+mx[i];
				yy=y+my[i];
				//cout<<xx<<" "<<yy<<endl;
				if(0<=xx&&xx<10&&0<=yy&&yy<10){
					box[yy][xx]++;
				}
			}
		}
		else{
			for(i=0;i<12;i++){
				xx=x+lx[i];
				yy=y+ly[i];
				//cout<<xx<<" "<<yy<<endl;
				if(0<=xx&&xx<10&&0<=yy&&yy<10){
					box[yy][xx]++;
				}
			}
		}
	}
	sum=0;
	MAX=-1;
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(box[i][j]>0)	MAX=max(MAX,box[i][j]);
			else			sum++;
		}
	}
	cout<<sum<<endl;
	cout<<MAX<<endl;
	return 0;
}

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

int paper[10][10] = { 0 };
int white = 100, max = 0;

void ink(int x, int y) {
	if (0 <= x && x <= 9 && 0 <= y && y <= 9) {
		if (paper[x][y] == 0) white--;
		paper[x][y] += 1;
		max = paper[x][y] > max ? paper[x][y] : max;
	}
}

int main() {
	int x, y, s;
	while (std::scanf("%d,%d,%d", &x, &y, &s) != EOF) {
		if (s >= 3) {
			ink(x - 2, y);
			ink(x + 2, y);
			ink(x, y - 2);
			ink(x, y + 2);
		}
		if (s >= 2) {
			ink(x - 1, y - 1);
			ink(x - 1, y + 1);
			ink(x + 1, y - 1);
			ink(x + 1, y + 1);
		}
		ink(x, y);
		ink(x - 1, y);
		ink(x + 1, y);
		ink(x, y - 1);
		ink(x, y + 1);
	}
	std::cout << white << std::endl << max << std::endl;
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;k<6;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==1){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<10)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<10)paper[x][y+1]++;
			if(x>=0 && x<10 && y>=0 && y<10)paper[x][y]++;
		}
		if(n==2){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<10)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<10)paper[x][y+1]++;
			if(x-1>=0 && y-1>=0)paper[x-1][y-1]++;
			if(x-1>=0 && y+1<10)paper[x-1][y+1]++;
			if(x+1<10 && y-1>=0)paper[x+1][y-1]++;
			if(x+1<10 && y+1<10)paper[x+1][y+1]++;
			if(x>=0 && x<10 && y>=0 && y<10)paper[x][y]++;
		}
		if(n==3){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<10)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<10)paper[x][y+1]++;
			if(x-1>=0 && y-1>=0)paper[x-1][y-1]++;
			if(x-1>=0 && y+1<10)paper[x-1][y+1]++;
			if(x+1<10 && y-1>=0)paper[x+1][y-1]++;
			if(x+1<10 && y+1<10)paper[x+1][y+1]++;
			
			if(x-2>=0)paper[x-2][y]++;
			if(x+2<10)paper[x+2][y]++;
			if(y+2<10)paper[x][y+2]++;
			if(y-2>=0)paper[x][y-2]++;
			if(x>=0 && x<10 && y>=0 && y<10)paper[x][y]++;
		}
		for(i=0;i<10;i++){
			for(j=0;j<10;j++){
				printf("%d ",paper[i][j]);
			}
			puts("");
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			printf("%d ",paper[i][j]);
		}
		puts("");
	}
	
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(paper[i][j]==0)c++;
			if(paper[i][j]>=max)max=paper[i][j];
		}
	}
	printf("%d\n%d\n",c,max);
	return 0;
}