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 <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int mp[10][10];

int main(){
  int x,y,s;
  while(~scanf("%d,%d,%d",x,y,s)){
    if(s==1){
      // small
      mp[x][y]++;
      if(x-1>=0) mp[x-1][y]++;
      if(x+1<=9) mp[x+1][y]++;
      if(y-1>=0) mp[x][y-1]++;
      if(y+1>=0) mp[x][y+1]++;
    }else if(s==2){
      // mid
      FOR(i,max(0,x-1),min(9,x+1)+1){
        FOR(j,max(0,y-1),min(9,y+1)+1){
          mp[i][j]++;
        }
      }
    }else{
      // big
      FOR(i,max(0,x-1),min(9,x+1)+1){
        FOR(j,max(0,y-1),min(9,y+1)+1){
          mp[i][j]++;
        }
      }
      if(x-2>=0) mp[x-2][y]++;
      if(x+2<=9) mp[x+2][y]++;
      if(y-2>=0) mp[x][y-2]++;
      if(y+2>=0) mp[x][y+2]++;
    }
  }
  int cnt = 0;
  int mx = 0;
  REP(i,10)REP(j,10){
    if(mp[i][j]==0)++cnt;
    else mx=max(mx,mp[i][j]);
  }
  cout<<cnt<<endl;
  cout<<mx<<endl;
  return 0;
}

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

using namespace std;

bool onPaper(int x, int y) {
  return (0 <= x && x <= 9 &&
          0 <= y && y <= 9);
}

void smallDrop(int x, int y, int p[][10]) {
  if (onPaper(x-1, y))
    p[x-1][y]++;
  if (onPaper(x+1, y))
    p[x+1][y]++;
  if (onPaper(x, y-1))
    p[x][y-1]++;
  if (onPaper(x, y+1))
    p[x][y+1]++;
}

void middleDrop(int x, int y, int p[][10]) {
  smallDrop(x, y, p);
  if (onPaper(x-1, y-1))
    p[x-1][y-1]++;
  if (onPaper(x-1, y+1))
    p[x-1][y+1]++;
  if (onPaper(x+1, y-1))
    p[x+1][y-1]++;
  if (onPaper(x+1, y+1))
    p[x+1][y+1]++;
}

void bigDrop(int x, int y, int p[][10]) {
  middleDrop(x, y, p);
  if (onPaper(x-2, y))
    p[x-2][y]++;
  if (onPaper(x+2, y))
    p[x+2][y]++;
  if (onPaper(x, y-2))
    p[x][y-2]++;
  if (onPaper(x, y+2))
    p[x][y+2]++;
}

int main(int argc, char *argv[]) {
  int paper[10][10] = {0};
  int x, y, size;

  while (scanf("%d,%d,%d", &x, &y, &size) != -1) {
    paper[x][y]++;
    if (size == 1)
      smallDrop(x, y, paper);
    else if (size == 2)
      middleDrop(x, y, paper);
    else
      bigDrop(x, y, paper);
  }

  int white, black;
  white = black = 0;
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < 10; j++)
      if (paper[i][j] == 0)
        white++;
      else if (black < paper[i][j])
        black = paper[i][j];

  cout << white << endl;
  cout << black << endl;
  return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;

int field[10][10], x, y, s, cnt, ma;

void s1()
{
    if (y - 1 >= 0) field[x][y-1]++;
    if (x - 1 >= 0) field[x-1][y]++;
    if (y + 1 < 10) field[x][y+1]++;
    if (x + 1 < 10) field[x+1][y]++;
}

void s2()
{
    s1();
    if (x - 1 >= 0 && y - 1 >= 0) field[x-1][y-1]++;
    if (x - 1 >= 0 && y + 1 < 10) field[x-1][y+1]++;
    if (x + 1 < 10 && y - 1 >= 0) field[x+1][y-1]++;
    if (x + 1 < 10 && y + 1 < 10) field[x+1][y+1]++;
}

void s3()
{
    s2();
    if (y - 2 >= 0) field[x][y-2]++;
    if (x - 2 >= 0) field[x-2][y]++;
    if (y + 2 < 10) field[x][y+2]++;
    if (x + 2 < 10) field[x+2][y]++;
}

int main()
{
    while(scanf("%d,%d,%d",&x,&y,&s) != EOF) {
        field[x][y]++;

        if      (s == 1) s1();
        else if (s == 2) s2();
        else if (s == 3) s3();

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

    printf("%d\n%d\n", cnt, ma);

    return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int pos[10][10];
/*void p(){
	for(int i=0;i<10;++i){
		for(int j=0;j<10;++j){
			cout<<pos[i][j]<<" ";
		}
		cout<<endl;
	}
	cout<<endl;
}*/
main(){
	int tmp[3],ink2[3]={1,1,2};
	int ink[3][5][5]={
		{{0,1,0,0,0},{1,1,1,0,0},{0,1,0,0,0},{0,0,0,0,0},{0,0,0,0,0}},
		{{1,1,1,0,0},{1,1,1,0,0},{1,1,1,0,0},{0,0,0,0,0},{0,0,0,0,0}},
		{{0,0,1,0,0},{0,1,1,1,0},{1,1,1,1,1},{0,1,1,1,0},{0,0,1,0,0}}
	};
	for(int i=0;i<10;++i)
		for(int j=0;j<10;++j)
			pos[i][j]=0;
	while(cin>>tmp[0]){
		scanf(",%d,%d",&tmp[1],&tmp[2]);
		for(int i=0;i<5;++i){
			for(int j=0;j<5;++j){
				int t[2]={tmp[0]-ink2[tmp[2]-1]+i,tmp[1]-ink2[tmp[2]-1]+j};
				if(t[0]>=0 && t[0]<=9 && t[1]>=0 && t[1]<=9){
					pos[t[0]][t[1]]+=ink[tmp[2]-1][i][j];
				}
			}
		}
	}
	int ans[2]={0,0};
	for(int i=0;i<10;++i){
		for(int j=0;j<10;++j){
			if(pos[i][j]==0)ans[0]++;
			ans[1]=max(pos[i][j],ans[1]);
		}
	}
	cout<<ans[0]<<endl<<ans[1]<<endl;
}

C++: #include <iostream>

using namespace std;

int cell[10][10];

int main() {
  int x, y, size;
  int max = 0, zero = 0;

  while (cin >> x) {
    cin.ignore();
    cin >> y;
    cin.ignore();
    cin >> size;

    switch (size) {
      case 3:
        if(x >= 2)
          cell[x-2][y]++;
        if(y >= 2)
          cell[x][y-2]++;
        if(x <= 7)
          cell[x+2][y]++;
        if(y <= 7)
          cell[x][y+2]++;
      case 2:
        if(x >= 1){
          if(y >= 1)
            cell[x-1][y-1]++;
          if(y <= 8)
            cell[x-1][y+1]++;
          }
        if(x <= 8){
          if(y >= 1)
            cell[x+1][y-1]++;
          if(y <= 8)
            cell[x+1][y+1]++;
        }
      case 1:
        if(x >= 1)
          cell[x-1][y]++;
        if(x <= 8)
          cell[x+1][y]++;
        if(y >= 1)
          cell[x][y-1]++;
        if(y <= 8)
          cell[x][y+1]++;
        cell[x][y]++;
    }
  }

  for(int i = 0; i < 10; i++)
    for(int j = 0; j < 10; j++){
      if(!cell[i][j])
        zero++;
      else if(cell[i][j] > max)
        max = cell[i][j];
    }

  cout << zero << endl << max << endl;

}