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<cstring>
using namespace std;

int main(void){
	int map[10][10];
	int x,y,s;
	int n=0,m=0;
	memset(map,0,sizeof(map));
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s>=1){
			map[x][y]+=1;
			map[x-1][y]+=1;
			map[x+1][y]+=1;
			map[x][y-1]+=1;
			map[x][y+1]+=1;
		}
		if(s>=2){
			map[x-1][y-1]+=1;
			map[x+1][y-1]+=1;
			map[x-1][y+1]+=1;
			map[x+1][y+1]+=1;
		}
		if(s>=2){
			map[x][y-2]+=1;
			map[x][y+2]+=1;
			map[x-2][y]+=1;
			map[x+2][y]+=1;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(map[i][j]==0)n++;
			if(map[i][j]>m)m=map[i][j];
		}
	}
	printf("%d\n",n);
	printf("%d\n",m);
    return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
#define bv vector<bool>
using namespace std;
typedef pair<int, int>PA;
using namespace std;
#define MAX 1e7
int sx[] = {0,0,-1,1};
int sy[] = {1,-1,0,0};
int my[] = {0,0,1,1,1,-1,-1,-1};
int mx[] = {1,-1,0,1,-1,0,1,-1};
int lx[] = {0,0,0,0,1,1,2,-1,-1,-2};
int ly[] = {1,-1,2,-2,1,-1,0,1,-1,0};
int  main(){
    
    vvi v(12,vi(12,0));
    vi x(100,0); vi y(100,0); vi ink(100,0);
    v[0][0] = 0;
    rep(i,51){
        char c,d;
        cin >> x[i] >>c>>y[i] >>d >> ink[i];
        v[y[i]][x[i]]+=1;
        if(ink[i] == 1){
            rep(j,4){
                int tx =x[i]+sx[j]; int ty = y[i]+sy[j];
                if(0<=tx && tx<10 && 0<=ty && ty<10)
                    v[ty][tx]+=1;
            }
        }else if(ink[i] == 2){
            rep(j,8){
                int tx =x[i]+mx[j]; int ty = y[i]+my[j];
                if(0<=tx && tx<10 && 0<=ty && ty<10)
                    v[ty][tx]+=1;
                }
        }else if(ink[i] == 3){
                rep(j,10){
                    int tx =x[i]+lx[j]; int ty = y[i]+ly[j];
                    if(0<=tx && tx<10 && 0<=ty && ty<10)
                        v[ty][tx]+=1;
                }
        }
    }
        int ans1 = -INF; int ans2 = 0;
        rep(i,10) rep(j,10){
            if(i != 0 && j != 0)
            ans1 = max(ans1,v[i][j]);
            if(v[i][j]  == 0)
                ans2++;        }
    cout << ans2<< endl;
    cout << ans1<< endl;
        
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int paper[10][10];

void printv() {
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			printf("%2d", paper[i][j]);
		}
		printf("\n");
	}
	printf("---------------------------\n");
}

int main() {
	int x, y, size;
	int blank = 0, depth = 0;
	int dx[] = { 1, -1,  0,  0,  1, -1,  1, -1,  2, -2,  0,  0};
	int dy[] = { 0,  0,  1, -1,  1, -1, -1,  1,  0,  0,  2, -2};

	memset(paper, 0, sizeof(paper));
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		int i;
		paper[y][x] += 1;
		switch (size) {
			case 3:
				for (i = 8; i < 12; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
			case 2:
				for (i = 4; i < 8; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
			case 1:
				for (i = 0; i < 4; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
				break;
		}
//		printv();
	}
	for (int i = 0; i < 10; i++)
		for (int j = 0; j < 10; j++)
			if (paper[i][j] == 0)
				blank++;
			else
				depth = max(depth, paper[i][j]);
	printf("%d\n", blank);
	printf("%d\n", depth);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int x[2000][2000], a, b, c, sum, maxn; char f;
int main() {
	while (cin >> a >> f >> b >> f >> c) {
		for (int i = -c; i <= c; i++) {
			for (int j = -c; j <= c; j++) {
				if (a + i >= 0 && b + j >= 0) {
					if ((i + j >= -c && i + j <= c) && (i - j >= -c && i - j <= c)) {
						x[a + i][b + j]++;
					}
				}
			}
		}
	}
	sum = 0;
	maxn = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (x[i][j] == 0) { sum++; }
			maxn = max(maxn, x[i][j]);
		}
	}
	cout << sum << endl << maxn << endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector <vector <int> > a(15,vector<int>(15,0));
  int c,d,size,o=0;
  char s1,s2;
  while(cin>>c>>s1>>d>>s2>>size){
      c+=3;d+=3;
    if(size==1){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
    }
    if(size==2){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
      a[c-1][d-1]++;
      a[c+1][d+1]++;
      a[c-1][d+1]++;
      a[c+1][d-1]++;
    }
    if(size==3){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
      a[c-1][d-1]++;
      a[c+1][d+1]++;
      a[c-1][d+1]++;
      a[c+1][d-1]++;
      a[c+2][d]++;
      a[c-2][d]++;
      a[c][d+2]++;
      a[c][d-2]++;
    }
  }
  int maxi = 0;
  for(int i = 3; i < 13; i++){
    int d = *max_element(a[i].begin(),a[i].end());
    maxi = max (maxi, d);
    for(int j = 3; j < 13; j++){
      if(a[j][i]==0) o++;
    }
  }
 cout<<o<<endl<<maxi<<endl;
}