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

#define W 10
#define H 10

int main()
{
	vector< vector<int> > paper(W, vector<int>(H));
	int x, y, size;
	int i, j;
	int blank, max;

	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		switch (size) {
			case 3:
				if (x-2 >= 0) paper[x-2][y] ++;
				if (x+2 < W) paper[x+2][y] ++;
				if (y-2 >= 0) paper[x][y-2] ++;
				if (y+2 < H) paper[x][y+2] ++;
			case 2:
				if (x-1 >= 0 && y-1 >= 0) paper[x-1][y-1] ++;
				if (x-1 >= 0 && y+1 <= H) paper[x-1][y+1] ++;
				if (x+1 <= W && y-1 >= 0) paper[x+1][y-1] ++;
				if (x+1 <= W && y+1 <= H) paper[x+1][y+1] ++;
			case 1:
				if (x-1 >= 0) paper[x-1][y] ++;
				if (x+1 < W) paper[x+1][y] ++;
				if (y-1 >= 0) paper[x][y-1] ++;
				if (y+1 < H) paper[x][y+1] ++;
				paper[x][y] ++;
				break;
		}
	}

	blank = 0;
	max = 0;
	for (i = 0; i < W; i++) {
		for (j = 0; j < H; j++) {
			if (paper[i][j] == 0) blank++;
			else if (paper[i][j] > max) max = paper[i][j];
		}
	}

	cout<<blank<<endl;
	cout<<max<<endl;

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int x[10][10];
  int a,b,c;
  int yoso[3]={4,8,12};
  int tmp[3][2][12]={{{-1,0,1,0},{0,1,0,-1}},{{-1,-1,-1,0,1,1,1,0},{-1,0,1,1,1,0,-1,-1}},{{-1,-1,-1,0,1,1,1,0,-2,0,2,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",&a,&b,&c)!=EOF){
    c--;x[a][b]++;
    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&&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;
}

C++: #include "bits/stdc++.h"
using namespace std;

int main(){
	int x,y,s;
	char b;
	int n=10;
	int x1[]={1,0,-1,0};
	int y1[]={0,1,0,-1};
	int x2[]={1,1,-1,-1};
	int y2[]={1,-1,1,-1};
	int x3[]={2,0,-2,0};
	int y3[]={0,2,0,-2};
	
	vector<vector<int> > a(n,vector<int>(n,0));
	while(cin>>x>>b>>y>>b>>s){
		//if(x==-1)break;
		a[x][y]++;
		for(int i=0;i<4;i++){
			if(x+x1[i]>-1&&y+y1[i]>-1&&x+x1[i]<10&&y+y1[i]<10){
				a[x+x1[i]][y+y1[i]]++;
			}
		}
		
		if(s>1){
				for(int i=0;i<4;i++){
				if(x+x2[i]>-1&&y+y2[i]>-1&&x+x2[i]<10&&y+y2[i]<10){
					a[x+x2[i]][y+y2[i]]++;
				}
			}
		}
		
		if(s>2){
				for(int i=0;i<4;i++){
				if(x+x3[i]>-1&&y+y3[i]>-1&&x+x3[i]<10&&y+y3[i]<10){
					a[x+x3[i]][y+y3[i]]++;
				}
			}
		}
	}
	int ans=0;
	int ans2=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)ans++;
			ans2=max(ans2,a[i][j]);
		}
	}
	
	cout<<ans<<endl<<ans2<<endl;
	return 0;
}

C++: //0026 Dropping Ink
//ÉCNðÆµÄV~ðÂ¯é
//¢­ç©CNðÆµ½ãAÜ¾V~ªoÄ¢È¢Æ±ëÆAêÔZ¢V~ÌÊð¦æ

//¡ñàI¹ð½à¢ÄÈ¢æH

#include<iostream>
#include<algorithm>
#include<limits>
using namespace std;

class Paper
{
public:
	static const int N = 10;
	static const int SIDE_SIZE = N+4;	//åÌCNÅRêÈ¢öxÌCN
	static const int FIELD_SIZE= SIDE_SIZE * SIDE_SIZE;
private:
	int a[FIELD_SIZE];
public:

	Paper(){fill(a, a+FIELD_SIZE, 0);}
	void Drop(int x, int y, int dropSize)
	{
		if(dropSize >= 3)
		{
			static const int X[] = {-2, 0, 2, 0};
			static const int Y[] = {0,  2, 0,-2};
			const int s = sizeof(X)/sizeof(X[0]);
			for(int i = 0; i < s; i++)
				Get(x+X[i], y+Y[i])++;
		}
		if(dropSize >= 2)
		{
			static const int X[] = {-1, 1, 1, -1};
			static const int Y[] = {1, -1, 1, -1};
			const int s = sizeof(X)/sizeof(X[0]);
			for(int i = 0; i < s; i++)
				Get(x+X[i], y+Y[i])++;
		}
		static const int X[] = {0, 1, 0, -1, 0};
		static const int Y[] = {0, 0, 1, 0, -1};
		const int s = sizeof(X)/sizeof(X[0]);
		for(int i = 0; i < s; i++)
			Get(x+X[i], y+Y[i])++;
	}
	int& Get(int x, int y){return a[(y+2)*SIDE_SIZE + (x+2)];}
};

int main(void)
{
	int x, y, size;
	char dummy;

	Paper p;

	while( cin >> x >> dummy >> y >> dummy >> size )
	{
		p.Drop(x, y, size);
	}

	int whiteCount = 0,
		maxDensity = numeric_limits<int>::min();
	for(x = 0; x < Paper::N; x++)
	{
		for(y = 0; y < Paper::N; y++)
		{
			int density = p.Get(x, y);
			if(!density)
				whiteCount++;
			maxDensity = max(maxDensity, density);
		}
	}

	cout << whiteCount << endl << maxDensity << endl;

	return 0;
}

C++: #include<functional>
#include<algorithm>
#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,x,n) for(int i=x;i<n;i++)
#define pf push_front
#define pb push_back
#define int long long
using namespace std;
const int INF=1000000007;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ex[4]={1,-1,1,-1};
int ey[4]={1,1,-1,-1};
int fx[4]={2,0,-2,0};
int fy[4]={0,2,0,-2};

int mp[20][20]={};

signed main(){
  int x,y,s;
  char z;
  while(cin>>x>>z>>y>>z>>s){
    x--;y--;
    if(s==1){
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
      }
    }
    else if(s==2){
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
        if(y-ey[i]>=0&&x-ex[i]>=0){
          mp[y+ey[i]][x+ex[i]]+=1;
        }
      }
    }
    else{
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
        if(y-ey[i]>=0&&x-ex[i]>=0){
          mp[y+ey[i]][x+ex[i]]+=1;
        }
        if(y-fy[i]>=0&&x-fx[i]>=0){
          mp[y+fy[i]][x+fx[i]]+=1;
        }
      }
    }
  }
  int ans1=0,ans2=0;
  rep(i,10){
    rep(j,10){
      if(mp[i][j]>0)ans1++;
      if(ans2<mp[i][j])ans2=mp[i][j];
    }
  }
  cout<<ans1<<ans2<<endl;
  return 0;
}