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<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

#define M 14

int main() {
	int A[M][M] = {};

	for (int x, y, size; scanf("%d,%d,%d", &x, &y, &size) != EOF;) {
		x += 2; y += 2;
		A[x][y]++;
		A[x + 1][y]++;
		A[x][y + 1]++;
		A[x - 1][y]++;
		A[x][y - 1]++;
		if (size == 1)continue;
		A[x + 1][y + 1]++;
		A[x + 1][y - 1]++;
		A[x - 1][y + 1]++;
		A[x - 1][y - 1]++;
		if (size == 2)continue;
		A[x + 2][y]++;
		A[x][y + 2]++;
		A[x - 2][y]++;
		A[x][y - 2]++;
	}

	int cnt = 100, MAX = 0;

	for (int x = 0; x < 10; x++) {
		for (int y = 0; y < 10; y++) {
			if (A[x + 2][y + 2]) {
				cnt--;
				MAX = max(MAX, A[x + 2][y + 2]);
			}
		}
	}
	cout << cnt << endl;
	cout << MAX << endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <set>

using namespace std;
typedef long long LL;
static const double EPS = 1e-9;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n) 

const static int dx[13] = {0,1,0,-1,0,1,-1,-1,1,2,0,-2,0};
const static int dy[13] = {0,0,1,0,-1,1,1,-1,-1,0,2,0,-2};
int main(void){  
  int date[14][14]={0};
  int x,y,s,c=0,m=0;
  
  while(scanf("%d,%d,%d",&x,&y,&s) != EOF)
    REP(i,4*s+1) date[x+2+dx[i]][y+2+dy[i]] += 1;

  FOR(i,2,13)
    FOR(j,2,13){
      if(date[i][j]>0) c++;
      m = max(date[i][j], m);
    }
  cout << 100-c << endl;
  cout << m << endl;
}

C++: #include <iostream>
using namespace std;

int main(){
  int x,y,size;
  int canvas[10][10];
  int empty_num, max_val;
  int i, j;

  for(i=0; i<10; i++)
    for(j=0; j<10; j++) canvas[i][j]=0;
  while(cin>>x){
    cin>>y; cin>>size;

    for(i=-1; i<=1; i=i+2)
      if(x+i>=0 && x+i<10) canvas[x+i][y]++;
    for(i=-1; i<=1; i=i+2)
      if(y+i>=0 && y+i<10) canvas[x][y+i]++;
    if(size>1){
      for(i=-1; i<=1; i=i+2){
        for(j=-1; j<=1; j=j+2)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }
    if(size>2){
      for(i=-2; i<=2; i=i+4){
        for(j=-2; j<=2; j=j+4)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }

    empty_num=0; max_val=0;
    for(i=0; i<10; i++){
      for(j=0; j<10; j++){
        if(canvas[i][j]>max_val) max_val=canvas[i][j];
        else if(canvas[i][j]==0) empty_num++;
      }
    }

    printf("%d\n%d\n", empty_num, max_val);
  }
  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	const int ink[3][4][2]={
		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 paper[12][12]={0};
	for(int x,y,size;~scanf("%d,%d,%d",&x,&y,&size);){
		rep(i,size){
			rep(j,4){
				paper[2+y+ink[i][j][0]][2+x+ink[i][j][1]]++;
			}
		}
	}
	
	int white=0,thick=0;
	rep(i,10){
		thick=max(thick,*max_element(paper[2+i]+2,paper[2+i]+12));
		white+=count(paper[2+i]+2,paper[2+i]+12,0);
	}
	cout<<white<<endl;
	cout<<thick<<endl;
	
	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int dp[20][20];
int main(){
	for(int i=0;i<20;i++)
		for(int j=0;j<20;j++)
			dp[i][j]=-1;
	for(int i=5;i<15;i++)
		for(int j=5;j<15;j++)
			dp[i][j]=0;
	int x,y,s;
	int maxo,zero;
	char z;
	while(cin>>x>>z>>y>>z>>s){
		if(s==1){
			dp[x+5][y+5]++;
			if(dp[x-1+5][y+5]!=-1)
				dp[x-1+5][y+5]++;
			if(dp[x+1+5][y+5]!=-1)
				dp[x+1+5][y+5]++;
			if(dp[x+5][y-1+5]!=-1)
				dp[x+5][y-1+5]++;
			if(dp[x+5][y+1+5]!=-1)
				dp[x+5][y+1+5]++;
		}
		if(s==2){
			for(int i=x-1+5;i<=x+1+5;i++){
				for(int j=y-1+5;j<=y+1+5;j++){
					if(dp[i][j]!=-1)
						dp[i][j]++;
				}
			}
		}
		if(s==3){
			for(int i=x-1+5;i<=x+1+5;i++){
				for(int j=y-1+5;j<=y+1+5;j++){
					if(dp[i][j]!=-1)
						dp[i][j]++;
				}
			}
			if(dp[x-2+5][y+5]!=-1)
				dp[x-2+5][y+5]++;
			if(dp[x+2+5][y+5]!=-1)
				dp[x+2+5][y+5]++;
			if(dp[x+5][y-2+5]!=-1)
				dp[x+5][y-2+5]++;
			if(dp[x+5][y+2+5]!=-1)
				dp[x+5][y+2+5]++;
		}
		maxo=1,zero=0;
		for(int i=0;i<20;i++){
			for(int j=0;j<20;j++){
				if(dp[i][j]>maxo)
					maxo=dp[i][j];
				if(dp[i][j]==0)
					zero++;
			}
		}
	}
	cout<<zero<<endl;
	cout<<maxo<<endl;
	return 0;
}