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 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<iostream>
#include<stdio.h>
using namespace std;

int paper[10][10]={0};

void small_ink(int x,int y){
  paper[y][x]++;
  if(x+1<10)paper[y][x+1];
  if(x-1>=0)paper[y][x-1];
  if(y+1<10)paper[y+1][x];
  if(y-1>=0)paper[y-1][x];
}
void midium_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;i<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
}
void big_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;i<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
  for(int i=-1;i<2;i=i+2){
    for(int j=-1;j<2;j=j+2){
      if(y+i*2>=0 && y+i*2<10 && x+j*2>=0 && x+j*2<10)paper[y+i*2][x+j*2]++;
    }
  }
}

int main(){
  int x,y,s;
  int white=0;
  int darkest=0;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    if(s==1)small_ink(x,y);
    else if(s==2)midium_ink(x,y);
    else if(s==3)big_ink(x,y);
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(paper[i][j]==0)white++;
      if(paper[i][j]>darkest)darkest=paper[i][j];
    }
  }
  cout<<white<<endl<<darkest<<endl;
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

const int MAX_H = 10;
const int MAX_W = 10;
int m[MAX_H][MAX_W];
int x, y ,s;
int cnt = MAX_H * MAX_W;
int mx;

inline bool check(int x, int y){ return 0<=x&&x<MAX_H && 0<=y&&y<=MAX_W; }

void dfs(int x, int y)
{
  maxup(mx, m[x][y]);
  m[x][y] = 0;
  cnt -= 1;
  erep(dx, -1, 1) erep(dy, -1, 1) if(check(x+dx, y+dy)) if(m[x+dx][y+dy]) dfs(x+dx, y+dy);
}

int main()
{
  while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
    m[x][y] += 1;
    if(s%2){
      int d = s/2 + 1;
      int dx[] = {-d, 0, d, 0};
      int dy[] = {0, -d, 0, d};
      rep(i, 4) if(check(x+dx[i], y+dy[i])) m[x+dx[i]][y+dy[i]] += 1;
    }
    if(s-1){
      erep(i, -1, 1) erep(j, -1, 1) if(i || j) if(check(x+i, y+j)) m[x+i][y+j] += 1;
    }
  }

  rep(i, MAX_H) rep(j, MAX_W) if(m[i][j]) dfs(i, j);

  cout << cnt << endl << mx << endl;

  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>

int main()
{
	int table[10][10] = { { 0 } };
	int x, y, size;
	while (scanf("%d,%d,%d", &x,&y, &size) != EOF)
	{
		switch (size)
		{
		case 1:
		{
			table[y][x]++;
			if (x - 1 >= 0)table[y][x - 1]++;
			if (x + 1 <= 9)table[y][x + 1]++;
			if (y - 1 >= 0)table[y - 1][x]++;
			if (y + 1 <= 9)table[y + 1][x]++;
		}break;
		case 2:
		{
			table[y][x]++;
			if (x - 1 >= 0)
			{
				table[y][x - 1]++;
				if (y - 1 >= 0)table[y - 1][x - 1]++;
				if (y + 1 <= 9)table[y + 1][x - 1]++;

			}
			if (x + 1 <= 9)
			{
				table[y][x + 1]++;
				if (y - 1 >= 0)table[y - 1][x + 1]++;
				if (y + 1 <= 9)table[y + 1][x + 1]++;
			}
			if (y - 1 >= 0)table[y - 1][x]++;
			if (y + 1 <= 9)table[y + 1][x]++;
		}break;
		default:
		{
			table[y][x]++;
			if (x - 1 >= 0)
			{
				table[y][x - 1]++;
				if (y - 1 >= 0)table[y - 1][x - 1]++;
				if (y + 1 <= 9)table[y + 1][x - 1]++;
				if (x - 2 >= 0)table[y][x - 2]++;
			}
			if (x + 1 <= 9)
			{
				table[y][x + 1]++;
				if (y - 1 >= 0)table[y - 1][x + 1]++;
				if (y + 1 <= 9)table[y + 1][x + 1]++;
				if (x + 2 <= 9)table[y][x + 2]++;
			}
			if (y - 1 >= 0)
			{
				table[y - 1][x]++;
				if (y - 2 >= 0)table[y - 2][x]++;
			}
			if (y + 1 <= 9)
			{
				table[y + 1][x]++;
				if (y + 2 <= 9)table[y + 2][x]++;
			}
		}break;
		}
	}
	int cnt=0, i, j, max = 0;
	for (j = 0; j < 10; j++)
	{
		for (i = 0; i < 10; i++)
		{
			if (table[j][i] > max)max = table[j][i];
			if (table[j][i] == 0)cnt++;
		}
	}
	printf("%d\n%d\n", cnt, max);
	return 0;
}