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 <stdio.h>

#define SIZE 10

int paper[SIZE][SIZE];

void exist(int x, int y)
{
	if(x >= 0 && x < 10 && y >= 0 && y < 10) paper[x][y]++;
}

int main()
{
	int x, y, s, i, j, zero_count, max;

	zero_count = 0;
	max = 0;

	for(i = 0; i < SIZE; i++){
		for(j = 0; j < SIZE; j++){
			paper[i][j] = 0;
		}
	}

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		switch(s){
			case 1:
				exist(x, y);
				exist(x-1, y);
				exist(x, y-1);
				exist(x+1, y);
				exist(x, y+1);
				break;
			case 2:
				for(i = 0; i < 3; i++){
					for(j = 0; j < 3; j++){
						exist(x+i-1, y+j-1);
					}
				}
				break;
			case 3:
				for(i = 0; i < 3; i++){
					for(j = 0; j < 3; j++){
						exist(x+i-1, y+j-1);
					}
				}

				exist(x-2, y);
				exist(x, y-2);
				exist(x+2, y);
				exist(x, y+2);
				break;
		}
	}

	for(i = 0; i < SIZE; i++){
		for(j = 0; j < SIZE; j++){
			printf("%2d", paper[j][i]);
			if(paper[j][i] == 0) zero_count++;
			if(paper[j][i] > max) max = paper[j][i];
		}
		printf("\n");
	}

	printf("%d\n%d\n", zero_count, max);

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
int density[15][15];
const int dr[] = { 0,-1, 0, 1, 0 };
const int dc[] = { 0, 0, 1, 0,-1 };

int main()
{
//	cut here before submit 
//	freopen ("testcase.DI", "r", stdin );
	memset (density, 0, sizeof (density ) );
	string str = "";
	while (getline (cin, str ) ){
		int n = str.length();
		rep (i, n ){
			if (str[i] == ',' ) str[i] = ' ';
		} // end rep
		stringstream ss (str );
		int col, row, size;
		ss >> col >> row >> size;
		switch (size ){
			case 1:	// small
				rep (k, 5 ){
					int nr = row + dr[k];
					int nc = col + dc[k];
					if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
					density[nr][nc]++;
				} // end rep
				break;
			case 2:	// medium
				for (int drow = -1; drow <= 1; drow++ ){
					for (int dcol = -1; dcol <= 1; dcol++ ){
						int nr = row + drow;
						int nc = col + dcol;
						if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
						density[nr][nc]++;
					} // end for
				} // end for
				break;
			case 3:	// large
				for (int drow = -1; drow <= 1; drow++ ){
					for (int dcol = -1; dcol <= 1; dcol++ ){
						int nr = row + drow;
						int nc = col + dcol;
						if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
						density[nr][nc]++;
					} // end for
				} // end for
				for (int k = 1; k < 5; k++ ){
					int nr = row + 2*dr[k];
					int nc = col + 2*dc[k];
					if (nr < 0 || nr >= 10 || nc < 0 || nc >= 10 ) continue;
					density[nr][nc]++;
				} // end for
				break;
		} // end switch
	} // end while
	int noink = 0;
	int max_density = 0;
	rep (i, 10 ) rep (j, 10 ){
		if (density[i][j] == 0 ) noink++;
		else
			max_density = max (max_density, density[i][j] );
	} // end rep
	cout << noink << endl;
	cout << max_density << endl;
		
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int dir[][2] = {{0, 0}, {1, 0}, {0, 1}, {-1, 0}, {0, -1}, {1, 1}, {1, -1}, {-1,
  1}, {-1, -1}, {2, 0}, {0, 2}, {-2, 0}, {0, -2}};
int map[10][10], dens = 0, rest = 100;
void drop(int x, int y) {
  if (0 <= x && x < 10 && 0 <= y && y < 10) {
    if (map[x][y]++ == 0) rest--;
    dens = max(map[x][y], dens);
  }
}
int main() {
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < 10; j++)
      map[i][j] = 0;
  int x, y, size;
  char c;
  while (cin >> x >> c >> y >> c >> size)
    for (int i = 0; i <= 4 * size; i++)
      drop(x + dir[i][0], y + dir[i][1]);
  cout << rest << endl << dens << endl;
}

C++: #include<stdio.h>
int dx[4]={-1,0,0,1};
int dy[4]={0,1,-1,0};
int dx2[8]={-1,-1,-1,0,1,1,1,0};
int dy2[8]={-1,0,1,1,1,0,-1,-1};
int dx3[12]={-1,-1,-1,0,1,1,1,0,-2,0,2,0};
int dy3[12]={-1,0,1,1,1,0,-1,-1,0,2,0,-2};
int main(){
	int t[14][14];
	int i,j;
	for(i=0;i<14;i++)for(j=0;j<14;j++)t[i][j]=0;
	int a,b,c;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		t[a+2][b+2]++;
		if(c==1)for(i=0;i<4;i++)t[a+dx[i]+2][b+dy[i]+2]++;
		if(c==2)for(i=0;i<8;i++)t[a+dx2[i]+2][b+dy2[i]+2]++;
		if(c==3)for(i=0;i<12;i++)t[a+dx3[i]+2][b+dy3[i]+2]++;
	}
	int ans1=0;
	int ans2=0;
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(t[i][j]>0)ans1++;
			if(ans2<t[i][j])ans2=t[i][j];
		}
	}
	printf("%d\n%d\n",100-ans1,ans2);
	return 0;
}

C++: #include <iostream>
#define rep(i,a) for(int i=0;i<(a);i++)

using namespace std;
int f[30][30]={},x,y,size;

void n(){
    int dx[13]={0,1,-1,0,0,-1,-1,1,1,0,0,2,-2},dy[13]={0,0,0,1,-1,1,-1,1,-1,2,-2,0,0};
    rep(i,4*size+1)f[y+dy[i]+10][x+dx[i]+10]+=1;
    
}

int main(){
    char z;
    while(cin>>x>>z>>y>>z>>size){
        n();
    }
    int m=0,c=0;
    rep(i,10)
        rep(j,10)
            if(f[i+10][j+10]==0)c++;
                else m=max(m,f[i+10][j+10]);
    cout<<c<<endl<<m<<endl;
    return 0;
}