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 <cstdio>
#include <cstdlib>
#define rep(i, n) for(int i = 0; i < (n); ++i)

int p[11][11];
int main()
{
	int dx[] = { -1, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2 };
	int dy[] = { 0, -1, 1, 0, -1, 1, -1, 1, 0, -2, 2, 0 };
	int x, y, s;
	rep(i, 10) rep(j, 10) p[i][j] = 0;
	while (scanf("%d,%d,%d", &x, &y, &s) == 3) {
		p[y][x]++;
		rep(i, 4 * s) {
			int r = y + dy[i];
			int c = x + dx[i];
			if (r < 0 || r > 9 || c < 0 || c > 9) continue;
			p[r][c]++;
		}
	}
	int c = 0, best = 0;
	rep(i, 10) rep(j, 10) {
		if (p[i][j] == 0) c++;
		if (best < p[i][j]) best = p[i][j];
	}
	printf("%d\n%d\n", c, best);
	return 0;
}

C++: #include<iostream>
using namespace std;

int main() {
	int pap[10][10] = {};
	int x, y, s;
	while (scanf("%d,%d,%d", &x, &y, &s) + 1) {
		int ca = 0;
		int p = 0;

		if (s == 1) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }

			if (s == 2) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }

			if (s == 3) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }
			if (x + 2 < 10) { pap[x + 2][y] += 1; }
			if (x - 2 > -1) { pap[x - 2][y] += 1; }
			if (y + 2 < 10) { pap[x][y + 2] += 1; }
			if (y - 2 > -1) { pap[x][y - 2] += 1; }
		
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 10; j++) {
					if (pap[i][j] == 0) { ca++; }
					if (p < pap[i][j]) { p = pap[i][j]; }
				}
			}

			cout << ca << endl << p << endl;
	}
	return 0;
}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define F first
#define S second
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl

int main(){
	li dx[13]={ 0, -1,  1,  0,  0,  1,  1, -1, -1,  2, -2,  0,  0};
	li dy[13]={ 0,  0,  0, -1,  1,  1, -1,  1, -1,  0,  0,  2, -2};
	li lim[3]={ 5, 9, 13};
	
	li kami[10][10];
	rep(i,10)rep(j,10)kami[i][j]=0;
	
	int x,y,s;
	while(~scanf("%d,%d,%d", &x, &y, &s)){
		rep(i,lim[s-1]){
			li nx=x+dx[i];
			li ny=y+dy[i];
			if(min(nx,ny)>=0 && max(nx,ny)<10)kami[nx][ny]++;
		}
		
	}
	
	li siro=0;
	li ma=0;
	
	rep(i,10){
		rep(j,10){
			ma=max(ma,kami[i][j]);
			if(kami[i][j]==0)siro++;
		}
	}
	cout<<siro<<endl<<ma<<endl;
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;

int small[3][3] = {0, 1, 0,
		   1, 1, 1,
		   0, 1, 0};
int normal[3][3] = {1, 1, 1,
		    1, 1, 1,
		    1, 1, 1};
int big[5][5] = {0, 0, 1, 0, 0,
		 0, 1, 1, 1, 0,
		 1, 1, 1, 1, 1,
		 0, 1, 1, 1, 0,
		 0, 0, 1, 0, 0};

int map[10][10];
int x, y, size;
int white = 0;
int black = 0;

int main(){
	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		switch(size){
			case 1:
				for(int i = 0; i < 3; i++){
					for(int j = 0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += small[i][j];
					}
				}
				break;
			case 2:
				for(int i =0; i < 3; i++){
					for(int j=0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += normal[i][j];
					}
				}
				break;
			case 3:
				for(int i=0; i < 5; i++){
					for(int j=0; j < 5; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-2+i][y-2+j] += big[i][j];
					}
				}
				break;
		}
	}
	for(int i=0; i < 10; i++){
		for(int j=0; j < 10; j++){
			if(map[i][j] == 0) white++;
			black = max(black, map[i][j]);
		}
	}

	cout << white << endl;
	cout << black << endl;

}

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define loop(i,a,b) for(int i = a ; i < b ; i++)
#define rep(i,a) for(int i = 0 ; i < a ; i++) 

int maze[10][10];
int smallx[5] = {1,-1,0,0,0};
int smally[5] = {0,0,0,1,-1};
int midx[4] = {1,1,-1,-1};
int midy[4] = {1,-1,1,-1};
int largex[4] = {2,-2,0,0};
int largey[4] = {0,0,2,-2};

bool inmaze(int x,int y){
  return (0<=x && x<10) && (0<=y && y<10);
	     
}
void Fsmall(int x,int y){
  rep(i,5)
    if(inmaze(x+smallx[i],y+smally[i]))
       maze[x+smallx[i]][y+smally[i]]++;
       
}
void Fmid(int x,int y){
  rep(i,4)
    if(inmaze(x+midx[i],y+midy[i]))
       maze[x+midx[i]][y+midy[i]]++;
}
void Flarge(int x,int y){
  rep(i,5)
    if(inmaze(x+largex[i],y+largey[i]))
    maze[x+largex[i]][y+largey[i]]++;
}
int main(void){
  int x,y,size;
  rep(i,10)rep(j,10)maze[i][j] = 0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF)
    switch(size){
    case 3:
      Flarge(x,y);
    case 2:
      Fmid(x,y);
    case 1:
      Fsmall(x,y);
    }
  int no,ma;
  rep(i,10)rep(j,10){
    if(maze[i][j] == 0)no ++;
    ma = max(ma,maze[i][j]);
  }
  cout<<no<<endl<<ma<<endl;
  
}