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 <algorithm>
#include <sstream>
using namespace std;
int G[10][10],mx;
bool in(int x,int y){
  if(0<=x && x < 10 && 0<=y && y < 10)return true;
  else return false;
}
void m(int x,int y,int size)
{
  G[x][y]++;
  if(size == 1){
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
  } else if(size == 2){
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
    if(in(x-1,y-1))G[x-1][y-1]++;
    if(in(x+1,y+1))G[x+1][y+1]++;
    if(in(x-1,y+1))G[x-1][y+1]++;
    if(in(x+1,y-1))G[x+1][y-1]++;
  } else {
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
    if(in(x-1,y-1))G[x-1][y-1]++;
    if(in(x+1,y+1))G[x+1][y+1]++;
    if(in(x-1,y+1))G[x-1][y+1]++;
    if(in(x+1,y-1))G[x+1][y-1]++;
    if(in(x+2,y))G[x+2][y]++;
    if(in(x-2,y))G[x-2][y]++;
    if(in(x,y+2))G[x][y+2]++;
    if(in(x,y-2))G[x][y-2]++;
  }
}
int main(){
  char d;
  int a,b,c;
  mx = 0;
  fill(G[0],G[10],0);
  while(cin >> a >> d >> b >> d >>c  ){
    m(a,b,c);
  }
  int cnt = 0;
  for(int i = 0 ; i < 10 ; i++ ){
    for(int j = 0 ; j < 10 ; j++ ){
      if(G[j][i] > mx)mx = G[j][i];
      if(G[j][i] == 0)cnt++;
    }
  }
  cout << cnt << endl;
  cout << mx << endl;
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>

int main()
{
	int table[10][10] = { { 0 } };
	int x, y, size;
	while (scanf("%d,%d,%d", &x,&y, &size) != EOF)
	{
		switch (size)
		{
		case 1:
		{
			table[y][x]++;
			if (x - 1 >= 0)table[y][x - 1]++;
			if (x + 1 <= 9)table[y][x + 1]++;
			if (y - 1 >= 0)table[y - 1][x]++;
			if (y + 1 <= 9)table[y + 1][x]++;
		}break;
		case 2:
		{
			table[y][x]++;
			if (x - 1 >= 0)
			{
				table[y][x - 1]++;
				if (y - 1 >= 0)table[y - 1][x - 1]++;
				if (y + 1 <= 9)table[y + 1][x - 1]++;

			}
			if (x + 1 <= 9)
			{
				table[y][x + 1]++;
				if (y - 1 >= 0)table[y - 1][x + 1]++;
				if (y + 1 <= 9)table[y + 1][x + 1]++;
			}
			if (y - 1 >= 0)table[y - 1][x]++;
			if (y + 1 <= 9)table[y + 1][x]++;
		}break;
		default:
		{
			table[y][x]++;
			if (x - 1 >= 0)
			{
				table[y][x - 1]++;
				if (y - 1 >= 0)table[y - 1][x - 1]++;
				if (y + 1 <= 9)table[y + 1][x - 1]++;
				if (x - 2 >= 0)table[y][x - 2]++;
			}
			if (x + 1 <= 9)
			{
				table[y][x + 1]++;
				if (y - 1 >= 0)table[y - 1][x + 1]++;
				if (y + 1 <= 9)table[y + 1][x + 1]++;
				if (x + 2 <= 9)table[y][x + 2]++;
			}
			if (y - 1 >= 0)
			{
				table[y - 1][x]++;
				if (y - 2 >= 0)table[y - 2][x]++;
			}
			if (y + 1 <= 9)
			{
				table[y + 1][x]++;
				if (y + 2 <= 9)table[y + 2][x]++;
			}
		}break;
		}
	}
	int cnt=0, i, j, max = 0;
	for (j = 0; j < 10; j++)
	{
		for (i = 0; i < 10; i++)
		{
			if (table[j][i] > max)max = table[j][i];
			if (table[j][i] == 0)cnt++;
		}
	}
	printf("%d\n%d\n", max, cnt);
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int x,y,a;
  char d;
  int in[10][10]={0};
  while(cin>>x>>d>>y>>d>>a){
    if(a==1){
      loop(i,-1,2){
	loop(j,-1,2){
	  if(i&&j)continue;
	  if(y+i>=0 &&y+i<10 && x+j>=0&&x+j<10)in[y+i][x+j]++;
	}
      }
    }else if(a==2){
      loop(i,-1,2){
	loop(j,-1,2){
	  if(y+i>=0 &&y+i<10 && x+j>=0&&x+j<10)in[y+i][x+j]++;
	}
      }
    }else if(a==3){
      loop(i,-2,3){
	loop(j,-2,3){
	  if(abs(i)+abs(j)>2)continue;
	  if(y+i>=0 &&y+i<10 && x+j>=0&&x+j<10)in[y+i][x+j]++;
	}
      }
    }
  }
  int co=0;
  int max=0;
  rep(i,10){
    rep(j,10){
      if(!in[i][j])co++;
      if(max<in[i][j])max=in[i][j];
    }
  }
  cout<<co<<endl<<max<<endl;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>

using namespace std;

static const int dx4[]={-1, 0, 1, 0}, dy4[]={0, -1, 0, 1};
static const int dx8[]={-1, -1, -1, 0, 0, 1, 1, 1};
static const int dy8[]={-1, 0, 1, -1, 1, -1, 0, 1};

int main() {
    vector<vector<int>> g(10, vector<int>(10));

    while (true) {
        size_t x, y;
        int s;
        if (scanf("%zu, %zu, %d", &x, &y, &s) == EOF)
            break;

        ++g[y][x];
        if (s == 1) {
            for (size_t k=0; k<4; ++k) {
                int X=x+dx4[k], Y=y+dy4[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
        } else if (s == 2) {
            for (size_t k=0; k<8; ++k) {
                int X=x+dx8[k], Y=y+dy8[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
        } else if (s == 3) {
            for (size_t k=0; k<8; ++k) {
                int X=x+dx8[k], Y=y+dy8[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
            for (size_t k=0; k<4; ++k) {
                int X=x+2*dx4[k], Y=y+2*dy4[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
        }
    }

    pair<size_t, int> res;  // <0, max>
    for (vector<int> &col: g)
        for (int d: col) {
            if (d == 0)
                ++res.first;

            if (res.second < d)
                res.second = d;
        }

    printf("%zu\n", res.first);
    printf("%d\n", res.second);
    return 0;
}