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 <algorithm>
#include <cstdio>
#define rep(i,n) for(int i=0;i < n;i++)

using namespace std;

int p[10][10];
int cnt = 0,Max = 0;
void ink(int x,int y){
  if(0<=x && x < 10&& 0<=y && y<10)p[x][y]++;
}

int main(){

    rep(i,10)rep(j,10){
      p[i][j] = 0;
    }
    int x,y,size;
  while(~scanf("%d,%d,%d",&x,&y,&size)){

    if(size == 1){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
    }else  if(size == 2){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
    }else  if(size == 3){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
      ink(x+2,y);
      ink(x-2,y);
      ink(x,y+2);
      ink(x,y-2);
    }
    cnt =0;
    Max = -10000000;
    rep(i,10)rep(j,10){
      if(p[i][j]==0)cnt++;
      Max = max(Max,p[i][j]);
    }
    
  }
  cout << cnt <<"\n" << Max << endl;
  
  return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
class Point{
public:
   int x,y;
   Point(){}
   Point(int _x,int _y){
      x = _x; y = _y;
   }
}ink[13] = {Point(0,-1),Point(-1,0),Point(0,0),Point(1,0),Point(0,1),
            Point(-1,-1),Point(1,-1),Point(-1,1),Point(1,1),
            Point(0,-2),Point(-2,0),Point(2,0),Point(0,2)
            };

int main(void){
   int x,y,sz;
   int field[11][11] = {0};
   while(scanf("%d,%d,%d",&x,&y,&sz) != EOF){
      for(int i = 0;i < 13;i++){
         if(sz == 1 && i >= 5) break;
         if(sz == 2 && i >= 9) break;
         int _x = x + ink[i].x,_y = y + ink[i].y;
         if(0 <= _x&&_x < 10 && 0 <= _y&&_y < 10) field[_x][_y]++;
      }
   }
   int blank = 0,ma = 0;
   for(int i = 0;i < 10;i++)
      for(int j = 0;j < 10;j++){
         if(field[i][j] == 0) blank++;
         ma = max(field[i][j],ma);
      }

   printf("%d\n%d\n",blank,ma);
   return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#define N 13
#define N1 3
#define N2 2
using namespace std;
void Drop(int,int,int);
int data[N][N];
int dy[N1]={-1,0,1};int dx[N1]={-1,0,1};
int dy2[N2]={-1,1};int dx2[N2]={-1,1};
int dy3[N1+1]={-2,0,2,0};int dx3[N1+1]={0,2,0,-2};
int main(){
  int x,y,size,maxv=0,cnt=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    Drop(y+2,x+2,size);
  }
  for(int i=2;i<N-1;i++){
    for(int j=2;j<N-1;j++){
      maxv=max(maxv,data[i][j]);
      if(data[i][j]==0) cnt++;
    }
  }
  cout << cnt << endl << maxv << endl;
  return 0;
}
void Drop(int y,int x,int size){
  for(int i=0;i<N1;i++)
    for(int j=0;j<N1;j++)
      data[y+dy[i]][x+dx[j]]++;
  if(size==1)
    for(int i=0;i<N2;i++)
      for(int j=0;j<N2;j++)
	data[y+dy2[i]][x+dx2[j]]--;
  if(size==3)
    for(int i=0;i<N1+1;i++)
      data[y+dy3[i]][x+dx3[i]]++;
}

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

int field[10][10];

int main() {
  int x,y,size; 
  char ch;
  while ( cin >> x >> ch >> y >> ch >> size ) {
    if ( size == 1 ) {
      field[y][x]++;
      if ( x-1 >= 0 ) field[y][x-1]++;
      if ( x+1 < 10 ) field[y][x+1]++;
      if ( y-1 >= 0 ) field[y-1][x]++;
      if ( y+1 < 10 ) field[y+1][x]++;

    } else if ( size == 2 ) {
      field[y][x]++;
      if ( x-1 >= 0 ) field[y][x-1]++;
      if ( x+1 < 10 ) field[y][x+1]++;
      if ( y-1 >= 0 ) field[y-1][x]++;
      if ( y+1 < 10 ) field[y+1][x]++;
      if ( x+1 < 10 && y+1 < 10 ) field[y+1][x+1]++;
      if ( x-1 >= 0 && y+1 < 10 ) field[y-1][x+1]++;
      if ( x+1 < 10 && y-1 >= 0 ) field[y+1][x-1]++;
      if ( x-1 >= 0 && y-1 >= 0 ) field[y-1][x-1]++;
    } 

    if ( size == 3 ) {
      field[y][x]++;
      if ( x-1 >= 0 ) field[y][x-1]++;
      if ( x+1 < 10 ) field[y][x+1]++;
      if ( y-1 >= 0 ) field[y-1][x]++;
      if ( y+1 < 10 ) field[y+1][x]++;
      if ( x+1 < 10 && y+1 < 10 ) field[y+1][x+1]++;
      if ( x-1 >= 0 && y+1 < 10 ) field[y-1][x+1]++;
      if ( x+1 < 10 && y-1 >= 0 ) field[y+1][x-1]++;
      if ( x-1 >= 0 && y-1 >= 0 ) field[y-1][x-1]++;
      if ( x+2 < 10 ) field[y][x+2]++;
      if ( x-2 >= 0 ) field[y][x-2]++;
      if ( y+2 < 10 ) field[y+2][x]++;
      if ( y-2 >= 0 ) field[y-2][x]++;
    }

  }

  int cnt = 0,maxv = 0;

  for ( int i = 0; i < 10; i++ ) {
    for ( int j = 0; j < 10; j++ ) {
      if ( field[i][j] == 0 ) cnt++;
      maxv = max(maxv,field[i][j]);
    }
  }

  cout << cnt << endl;
  cout << maxv << endl;
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
signed main(void){
	char c;
	int a[25][25];
	memset(a,0,sizeof(a));
	int x,y,m;
	while(cin>>x>>c>>y>>c>>m){
		x+=5;
		y+=5;
		a[x][y]++;
		a[x-1][y]++;
		a[x+1][y]++;
		a[x][y-1]++;
		a[x][y+1]++;
		if(m==1)
			continue;
		a[x-1][y-1]++;
		a[x-1][y+1]++;
		a[x+1][y-1]++;
		a[x+1][y+1]++;
		if(m==2)
			continue;
		a[x-2][y]++;
		a[x+2][y]++;
		a[x][y-2]++;
		a[x][y+2]++;
	}
	int ans1=0,ans2=0;
	for(int i=5;i<15;i++)
		for(int j=5;j<15;j++){
			if(a[i][j]==0)
				ans1++;
			else if(a[i][j]>ans2)
				ans2=a[i][j];
		}
	cout<<ans1<<endl
		<<ans2<<endl;
}