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 <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	int dx1[] = {0, 1, 0, -1, 0};
	int dy1[] = {0, 0, 1, 0, -1};
	int dx2[] = {0, 0, 0, 1, 1, 1, -1, -1, -1};
	int dy2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	int dx3[] = {0, 0, 0, 0, 0, 1, 1, 1, 2, -1, -1, -1, -2};
	int dy3[] = {-2, -1, 0, 1, 2, -1, 0, 1, 0, -1, 0, 1, 0};

	int a[14][14] = {0};
	int x, y, size;
	char c[2];
	while(cin>>x){
		cin>> c[0]>> y>> c[1]>> size;
		x += 2;
		y += 2;
		switch(size){
			case 1:
				for(int i=0;i<5;i++){
					a[x+dx1[i]][y+dy1[i]]++;
				}
				break;
			case 2:
				for(int i=0;i<9;i++){
					a[x+dx2[i]][y+dy2[i]]++;
				}
				break;
			case 3:
				for(int i=0;i<13;i++){
					a[x+dx3[i]][y+dy3[i]]++;
				}
				break;
			default: 
				cout<< "default"<< endl;
				break;
		}
	}
	int ans = 0;
	int ans2 = 0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(a[i][j] == 0) ans++;
			ans2 = max(ans2, a[i][j]);
		}
	}
	cout<< ans<< endl
	cout<< ans2<< endl;
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <iostream>

using namespace std;

int main() {

	int hyou[14][14] = {0};

	int a,b,c;
	int counter1 = 0;
	int counter2 = 0;
	char d;

	while (cin >> a >> d >> b >> d >> c) {
		a += 2;
		b += 2;
		if (c == 1) {
			hyou[a][b] += 1;
			hyou[a - 1][b] += 1;
			hyou[a + 1][b] += 1;
			hyou[a][b - 1] += 1;
			hyou[a][b + 1] += 1;
		} else if(c == 2) {
			for (int i = a - 1; i < a + 2; i++) {
				for (int j = b - 1; j < b + 2; j++) {
					hyou[i][j] += 1;
				}
			}
		} else {
			for (int i = a - 1; i < a + 2; i++) {
				for (int j = b - 1; j < b + 2; j++) {
					hyou[i][j] += 1;
				}
			}
			hyou[a - 2][b] += 1;
			hyou[a + 2][b] += 1;
			hyou[a][b - 2] += 1;
			hyou[a][b + 2] += 1;
		}
	}

	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (hyou[i][j] == 0) {
				counter1++;
			}
			counter2 = max(counter2,hyou[i][j]);
		}
	}

	cout << counter1 << endl << counter2 << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
#define W 10+2+2
#define H 10+2+2

int main()
{
  int field[W][H]={0},x,y,size,max,cnt,i,j;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    x+=2;y+=2;
    if(size==1){
      field[x][y]++;
      field[x-1][y]++;
      field[x+1][y]++;
      field[x][y-1]++;
      field[x][y+1]++;
    }else if(size==2){
      field[x][y]++;
      field[x-1][y]++;
      field[x+1][y]++;
      field[x][y-1]++;
      field[x][y+1]++;
      field[x-1][y-1]++;
      field[x-1][y+1]++;
      field[x+1][y-1]++;
      field[x+1][y+1]++;
    }else{
      field[x][y]++;
      field[x-1][y]++;
      field[x+1][y]++;
      field[x][y-1]++;
      field[x][y+1]++;
      field[x-1][y-1]++;
      field[x-1][y+1]++;
      field[x+1][y-1]++;
      field[x+1][y+1]++;
      field[x-2][y]++;
      field[x+2][y]++;
      field[x][y-2]++;
      field[x][y+2]++;
    }
  }
  max=0;
  cnt=0;
  for(i=2;i<12;i++)for(j=2;j<12;j++){
    cnt+=field[i][j]==0;
    if(max<field[i][j])max=field[i][j];
  }
  cout<<cnt<<endl<<max<<endl;
}

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

int board[10][10];

void small(int x, int y){
	board[x][y]++;
	if(x>=1) board[x-1][y]++;
	if(x<=9) board[x+1][y]++;
	if(y>=1) board[x][y-1]++;
	if(y<=9) board[x][y+1]++;
}

void middle(int x, int y){
	small(x, y);
	if(x>=1 && y>=1) board[x-1][y-1]++;
	if(x>=1 && y<=9) board[x-1][y+1]++;
	if(x<=9 && y>=1) board[x+1][y-1]++;
	if(x<=9 && y<=9) board[x+1][y+1]++;
}

void large(int x, int y){
	middle(x, y);
	if(x>=2) board[x-2][y]++;
	if(x<=8) board[x+2][y]++;
	if(y>=2) board[x][y-2]++;
	if(y<=8) board[x][y+2]++;
}

int main(void){
	
	for(int i=0; i<10; i++)
		for(int j=0; j<10; j++)
			board[i][j] = 0;

	int x, y, size;
	char c1, c2;

	while(cin >> x >> c1 >> y >> c2 >> size){
		switch(size){
		case 1:
			small(x, y);
			break;
		case 2:
			middle(x, y);
			break;
		case 3:
			large(x, y);
			break;
		}
	}

	int max = 0;
	int count = 0;

	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if(board[i][j] > max) max = board[i][j];
			if(board[i][j] == 0) count++;
		}
	}

	cout << count << endl << max << endl;

	return 0;
}