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 <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

int dx[]={0,0,0,1,-1,1,1,-1,-1,0,0,2,-2};
int dy[]={0,1,-1,0,0,1,-1,1,-1,2,-2,0,0};
	int sz[4] ={0,5,9,13};
int mas[12][12]={0};
int x,y,s;
char zz;
	
	while(cin >> x >> zz >> y >>zz >> s ){
		rep(i,sz[s]){
			int xx=x+dx[i]; int yy=y+dy[i];
			if(xx >=0 && xx <=9 && yy >=0 && yy<=9) mas[xx][yy]++;
		}
	}
	int wcnt =0, mx =-999;
	rep(i,10) rep(j,10){
		if(mas[i][j]==0) wcnt++;
		mx = max(mx,mas[i][j]);
	}
	cout << wcnt << endl << mx << endl;;
	return 0;
}

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

using namespace std;

int m[10][10];

void small(int x, int y, int r) {
    if (y - r >= 0) m[x][y-r]++;
    if (x - r >= 0) m[x-r][y]++;
    if (x + r >= 0) m[x+r][y]++;
    if (y + r >= 0) m[x][y+r]++;
    m[x][y]++;
}

void middle(int x, int y) {
    for (int i = -1; i < 2; i++) for (int j = -1; j < 2; j ++){
        if (x + i >= 0 && x+i <= 9 && y + j >= 0 && y + j <= 9) m[x + i][y + i]++;
    }
}

void large(int x, int y) {
    middle(x, y);
    small(x, y, 2);
    m[x][y]--;
}

int main() {
    int x, y, n, i, j, h, k;
    while(scanf("%d, %d, %d", &x, &y, &n) != EOF) {
        if (n == 1) small(x, y, 1);
        if (n == 2) middle(x, y);
        if (n == 3) large(x, y);
    }
    n = 0;
    h = 0;
    k = 0;
    for (i = 0; i < 10; i++) for (j = 0; j < 10; j++) {
        if (m[i][j] == 0) k++; else h = h < m[i][j] ? m[i][j] : h;
    }
    cout << k << endl << h << endl;
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
#define rep(i,n) for (int i=0; i<(int)(n); i++)
#define ct(string) cout << string << endl

int main() {
    ios::sync_with_stdio(false);
    vector<vector<int> > map(10, vector<int>(10, 0));
    rep(i,50) {
        int x, y, s;
        string raw;
        cin >> raw;
        if (raw=="") break;
        x = raw.at(0) - '0';
        y = raw.at(2) - '0';
        s = raw.at(4) - '0';
        map.at(x).at(y)++;
        if (x+1<10) map.at(x+1).at(y)++;
        if (y+1<10) map.at(x).at(y+1)++;
        if (x-1>(-1)) map.at(x-1).at(y)++;
        if (y-1>(-1)) map.at(x).at(y-1)++;
        if (s > 1) {
            if (x+1<10&&y+1<10) map.at(x+1).at(y+1)++;
            if (x+1<10&&y-1>(-1)) map.at(x+1).at(y-1)++;
            if (x-1>(-1)&&y-1>(-1)) map.at(x-1).at(y-1)++;
            if (x-1>(-1)&&y+1<10) map.at(x-1).at(y+1)++;
        } 
        if (s > 2) {
            if (x+2<10) map.at(x+2).at(y)++;
            if (x-2>(-1)) map.at(x-2).at(y)++;
            if (y+2<10) map.at(x).at(y+2)++;
            if (y-2>(-1)) map.at(x).at(y-2)++;
        }
    }
    int count=0,ma=0;
    rep(i,10) rep(j,10) {
        if (map.at(i).at(j) == 0) count++;
        ma = max(ma, map.at(i).at(j));
    }
    ct(count << endl << ma);
}

C++: #include<iostream>
#include<string>
int mem[14][14] = {}, i = 0, X[50], Y[50], S[50], flag = 0, max = 0, x, y, s;
int main() {
	char b;
	while (1) { 
		std::cin >> x >> b >> y >> b >> s;
		if (s == 0)
			break;
		Y[i] = y, S[i] = s, X[i] = x;
		i += 1;
	}
	for (int a = 0; a < i; a += 1) {
		if (S[a] >= 1) {
			mem[X[a] + 2][Y[a] + 2] += 1;
			mem[X[a] + 1][Y[a] + 2] += 1;
			mem[X[a] + 3][Y[a] + 2] += 1;
			mem[X[a] + 2][Y[a] + 1] += 1;
			mem[X[a] + 2][Y[a] + 3] += 1;
		}
		if (S[a] >= 2) {
			mem[X[a] + 1][Y[a] + 1] += 1;
			mem[X[a] + 1][Y[a] + 3] += 1;
			mem[X[a] + 3][Y[a] + 1] += 1;
			mem[X[a] + 3][Y[a] + 3] += 1;
		}
		if (S[a] >= 3) {
			mem[X[a]][Y[a] + 2] += 1;
			mem[X[a] + 4][Y[a] + 2] += 1;
			mem[X[a] + 2][Y[a] + 4] += 1;
			mem[X[a] + 2][Y[a]] += 1;
		}
	}
	for (int i = 0; i < 10; i += 1)
		for (int j = 0; j < 10; j += 1) {
			if (0 == mem[i + 2][j + 2])
				flag += 1;
			if (max < mem[i + 2][j + 2])
				max = mem[i + 2][j + 2];
		}
	std::cout << flag << std::endl;
	std::cout << max << std::endl;
	return 0;
}

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

#pragma warning(disable : 4996)

int x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q), x--, y--)
	{
		if (q == 1)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (abs(i) + abs(j) <= 1)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}

		if (q == 2)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
					{
						ok[y + i][x + j]++;
					}
				}
			}
		}

		if (q == 3)
		{
			for (int i = -2; i <= 2; i++)
			{
				for (int j = -2; j <= 2; j++)
				{
					if (abs(i) + abs(j) <= 2)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}
	}

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (ok[i][j] == 0)
			{
				r1++;
			}

			if (ok[i][j] > r2)
			{
				r2 = ok[i][j];
			}
		}
	}

	printf("%d\n", r1);
	printf("%d\n", r2);

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int x[10][10];
  int a,b,c;
  int yoso[3]={5,9,13};
  int tmp[3][2][13]={{{0,-1,0,1,0},{0,0,1,0,-1}},{{0,-1,-1,-1,0,1,1,1,0},{0,-1,0,1,1,1,0,-1,-1}},{{0,-1,-1,-1,0,1,1,1,0,-2,0,2,0},{0,-1,0,1,1,1,0,-1,-1,0,2,0,-2}}};
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      x[i][j]=0;
    }
  }

  while(scanf("%d,%d,%d",&b,&a,&c)!=EOF){
    c--;
    for(int i=0;i<yoso[c];i++){
      if(a+tmp[c][0][i]>=0&&a+tmp[c][0][i]<10&&b+tmp[c][1][i]>=0&&b+tmp[c][1][i]<10){
	x[a+tmp[c][0][i]][b+tmp[c][1][i]]++;
      }
    }
  }
  int cnt=0,max=0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(x[i][j]==0)cnt++;
      if(x[i][j]>max)max=x[i][j];
    }
  }
  cout << cnt << endl << max << endl;
}