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++: #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    int p[13][13] = {};
    int x, y, s;
    char c;
    int w = 0, dens = 0;

    while (cin >> x >> c >> y >> c >> s)
    {
        switch (s)
        {
        case 1:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            break;
        case 2:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            p[x + 1][y + 1]++;
            p[x - 1][y + 1]++;
            p[x - 1][y - 1]++;
            p[x + 1][y - 1]++;
            break;
        case 3:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            p[x + 1][y + 1]++;
            p[x - 1][y + 1]++;
            p[x - 1][y - 1]++;
            p[x + 1][y - 1]++;
            p[x + 2][y]++;
            p[x - 2][y]++;
            p[x][y + 2]++;
            p[x][y - 2]++;
            break;
        }
    }

    rep(i, 10)
    {
        rep(j, 10)
        {
            if (p[i][j] == 0)
            {
                w++;
            }
            if (p[i][j] >= dens)
            {
                dens = p[i][j];
            }
        }
    }
    OP(w)
    OP(dens)

    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
 
#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <queue>
#include <cmath>
#include <stack>
#include <map>
 
#define int64 long long int 
 
using namespace std;
typedef pair<int, int> P;
 
void ink(P, int, int map[10][10]);
 
int main()
{
    int map[10][10] = {0};
    int x, y, s, count, max;
    while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
        P p(x, y);
        ink(p, s, map);
    }
    count = max = 0;
    for(int i=0; i<10; i++){
        for(int j=0; j<10; j++){
            if(!map[i][j]) count++;
            if(max < map[i][j]) max = map[i][j];
        }
    }
    cout << count << '\n' << max << '\n';
    return 0;
}
 
void ink(P p, int s, int map[10][10])
{
    int dx1[4] = {1, 0, -1, 0};
    int dy1[4] = {0, 1, 0, -1};
    int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1};
    int dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
    int dx3[12] = {1, 1, 0, -1, -1, -1, 0, 1, 2, 0, -2, 0};
    int dy3[12] = {0, 1, 1, 1, 0, -1, -1, -1, 0, 2, 0, -2};
    int nx, ny;
 
    if(s == 1){
        map[p.first][p.second]++;
        for(int i=0; i<4; i++){
            nx = p.first + dx1[i], ny = p.second + dy1[i];
            if(0 <= nx && nx < 10 && 0 <= ny && ny < 10)
                map[nx][ny]++;
        }
    }
    if(s == 2){
        map[p.first][p.second]++;
        for(int i=0; i<8; i++){
            nx = p.first + dx2[i], ny = p.second + dy2[i];
            if(0 <= nx && nx < 10 && 0 <= ny && ny < 10)
                map[nx][ny]++;
        }
    }
    if(s == 3){
        map[p.first][p.second]++;
        for(int i=0; i<12; i++){
            nx = p.first + dx3[i], ny = p.second + dy3[i];
            if(0 <= nx && nx < 10 && 0 <= ny && ny < 10)
                map[nx][ny]++;
        }
    }
    return;
}

C++: #include <iostream>

#define SIZE 10

using namespace std;

int map[SIZE][SIZE] = {0};

void drop(int x, int y) {
	if (0 <= x && x < SIZE && 0 <= y && y < SIZE) {
		map[x][y]++;
	}
}

int main() {
	int x, y, s, count = 0, most = 0;
	char e;
	while (cin>>x>>e>>y>>e>>s) {
		x--;
		y--;
		drop(x, y);
		drop(x, y + 1);
		drop(x + 1, y);
		drop(x, y - 1);
		drop(x - 1, y);

		if (s > 1) {
			drop(x + 1, y + 1);
			drop(x + 1, y - 1);
			drop(x - 1, y - 1);
			drop(x - 1, y + 1);

			if (s > 2) {
				drop(x, y + 2);
				drop(x, y - 2);
				drop(x + 2, y);
				drop(x - 2, y);
			}
		}
	}

	for (int i = 0; i < SIZE; i++) {
		for (int j = 0; j < SIZE; j++) {
			if (map[i][j] > most) {
				most = map[i][j];
			}

			if (map[i][j] == 0) {
				count++;
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}

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

int main(){
	int x,y,board[10][10],c=0,k=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			board[i][j]=0;
		}
	}	
	char input[5];
	while( scanf("%s",&input)!=EOF){
		x=input[0]-'0';
		y=input[2]-'0';
		if(input[4]=='1'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
		}
		if(input[4]=='2'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
			board[x+1][y+1]++;
			board[x-1][y-1]++;
			board[x-1][y+1]++;
			board[x+1][y-1]++;
		}
		if(input[4]=='3'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
			board[x+1][y+1]++;
			board[x-1][y-1]++;
			board[x-1][y+1]++;
			board[x+1][y-1]++;
			board[x+2][y]++;
			board[x-2][y]++;
			board[x][y+2]++;
			board[x][y-2]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(board[i][j]==0){
				c++;
			}
			if(board[i][j]>k){
				k=board[i][j];
				x=i;
				y=j;
			}
		}
	}
	printf("%d\n%d\n",c,k);
	
			
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<stdio.h>
int main(){
	int x,y,size;
	std::vector<std::vector<int> > vec(10,std::vector<int>(10,0));
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
	}
	std::cout<<no<<std::endl;
	sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;
	return 0;
}