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<stdio.h>
int main(void)
{
	int p[15][15];
	int x,y,z;
	int i,j;
	int max,cnt;
	max=0;
	cnt=0;
	
	for(i=0;i<14;i++){
		for(j=0;j<14;j++){
			p[i][j]=0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
		p[x+2][y+2]++;
		p[x+3][y+2]++;
		p[x+1][y+2]++;
		p[x+2][y+3]++;
		p[x+2][y+1]++;
		if(z==2){
			p[x+3][y+3]++;
			p[x+3][y+1]++;
			p[x+1][y+3]++;
			p[x+1][y+1]++;
		}
		else if(z==3){
			p[x+3][y+3]++;
			p[x+3][y+1]++;
			p[x+1][y+3]++;
			p[x+1][y+1]++;
			p[x+4][y+2]++;
			p[x][y+2]++;
			p[x+2][y+4]++;
			p[x+2][y]++;
		}
	/*	for(i=2;i<12;i++){
			for(j=2;j<12;j++){
				printf("%d ",p[i][j]);
			}
			printf("\n");
		}
		printf("\n");
	*/}
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(p[i][j]==0){
				cnt++;
			}
			else if(max<p[i][j]){
				max=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",cnt,max);
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back 
#define pf push_front 
#define mp make_pair
#define fr first
#define sc second
#define Rep(i,n) for(int i=0;i<(n);i++)
#define All(v) v.begin(),v.end()
typedef pair<int, int> Pii; typedef pair<int, Pii> Pip;
const int INF = 1107110711071107;

int ok( int x, int y )
{
  if( 0 <= x && 0 <= y && x <= 10 && y <= 10 ) return 1;
  else return 0;
}

main()
{
  int x, y, s;
  int data[11][11] = {{0}};
  while( scanf("%lld,%lld,%lld", &x, &y, &s) != EOF ) {
    //cout << x << " " << y << " " << s << endl;
    if( s == 1 ) {
      if( ok(x, y) )   data[y][x]++;
      if( ok(x, y-1) ) data[y-1][x]++;
      if( ok(x+1, y) ) data[y][x+1]++;
      if( ok(x, y+1) ) data[y+1][x]++;
      if( ok(x-1, y) ) data[y][x-1]++;
    }

    if( s == 2 ) {
      if( ok(x, y) )     data[y][x]++;
      if( ok(x, y-1) )   data[y-1][x]++;
      if( ok(x+1, y-1) ) data[y-1][x+1]++;
      if( ok(x+1, y) )   data[y][x+1]++;
      if( ok(x+1, y+1) ) data[y+1][x+1]++;
      if( ok(x, y+1) )   data[y+1][x]++;
      if( ok(x-1, y+1) ) data[y+1][x-1]++;
      if( ok(x-1, y) )   data[y][x-1]++;
      if( ok(x-1, y-1) ) data[y-1][x-1]++;
    }

    if( s == 3 ) {
      if( ok(x, y) )     data[y][x]++;
      if( ok(x, y-1) )   data[y-1][x]++;
      if( ok(x+1, y-1) ) data[y-1][x+1]++;
      if( ok(x+1, y) )   data[y][x+1]++;
      if( ok(x+1, y+1) ) data[y+1][x+1]++;
      if( ok(x, y+1) )   data[y+1][x]++;
      if( ok(x-1, y+1) ) data[y+1][x-1]++;
      if( ok(x-1, y) )   data[y][x-1]++;
      if( ok(x-1, y-1) ) data[y-1][x-1]++;
      
      if( ok(x, y-2) )     data[y-2][x]++;
      if( ok(x+2, y) )     data[y][x+2]++;
      if( ok(x, y+2) )     data[y+2][x]++;
      if( ok(x-2, y) )     data[y][x-2]++;
    }
    
  }

  int cnt = 0;
  int ma = 0;
  Rep(i, 10) Rep(j, 10) {
    if( !data[i][j] ) cnt++;
    ma = max(ma, data[i][j]);
  }

  cout << cnt << endl << ma << endl;
  
}

C++: #include <iostream>

using namespace std;

const int SMALL = 1;
const int MIDDLE = 2;
const int BIG = 3;
int paper[10][10] = {0};

void Dropping_Ink(int x, int y, int size)
{
		if(x-1 > -1)    paper[y][x-1]++;
		if(x+1 < 10)    paper[y][x+1]++;
		if(y-1 > -1)    paper[y-1][x]++;
		if(y+1 < 10)    paper[y+1][x]++;

		if(size >= MIDDLE)
		{
			if(x-1 > -1)
			{
				if(y-1 > -1)    paper[y-1][x-1]++;
				if(y+1 < 10)    paper[y+1][x-1]++;
			}
			if(x+1 < 10)
			{
				if(y-1 > -1)    paper[y-1][x+1]++;
				if(y+1 < 10)    paper[y+1][x+1]++;
			}
		}

		if(size >= BIG)
		{
			if(x-2 > -1)    paper[y][x-2]++;
			if(x+2 < 10)    paper[y][x+2]++;
			if(y-2 > -1)    paper[y-2][x]++;
			if(y+2 < 10)    paper[y+2][x]++;
		}
}

int main()
{
	int x, y, size, white, color;
	char c[2];

	while(cin >> x >> c[0] >> y >> c[1] >> size)
	{
		if(cin.eof())    break;

		Dropping_Ink(x, y, size);

		white = 0;
		color = 0;	
	
		for(int i=0; i<10; i++)
		{
			for(int j=0; j<10; j++)
			{
				if(paper[i][j] == 0)    white++;
				if(paper[i][j] > color)    color = paper[i][j];
			}
		}	
	}

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

C++: #include<iostream>

int data[10][10];

int main(){
	int count=0,max=0;
	int x,y,size;
	char c;

	int dx_1[4]={0,-1,1,0},dy_1[4]={-1,0,0,1};
	int dx_2[8]={0,-1,1,-1,1,0,-1,1},dy_2[8]={-1,-1,-1,0,0,1,1,1};
	int dx_3[12]={0,-1,1,-1,1,-2,2,0,-1,1,0,0},dy_3[12]={-1,-1,-1,0,0,0,0,1,1,1,-2,2};
	
	while(std::cin>>x>>c>>y>>c>>size){
		data[y][x]++;
		if(size==1){
			for(int i=0;i<4;i++){
				int nx=x+dx_1[i],ny=y+dy_1[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)data[ny][nx]++;
			}
		}else if(size==2){
			for(int i=0;i<8;i++){
				int nx=x+dx_2[i],ny=y+dy_2[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)data[ny][nx]++;
			};
		}else if(size==3){
			for(int i=0;i<12;i++){
				int nx=x+dx_3[i],ny=y+dy_3[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)data[ny][nx]++;
			}
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			max=std::max(max,data[i][j]);
			if(data[i][j]==0)count++;
		}
	}
	std::cout<<count<<std::endl;
	std::cout<<max<<std::endl;
	return 0;
}

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

void ink(int,int,int);
void change(int,int,int);

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

int main(void){
	int white=0,max_ink=0;

	for(int x,y,size;scanf("%d,%d,%d",&x,&y,&size)!=EOF;)
		ink(x,y,size);

	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++)
			if(!paper[i][j])
				white++;
			else
				max_ink=std::max(max_ink,int(paper[i][j]));

	printf("%d\n%d\n",white,max_ink);
	return 0;
}

void ink(int x,int y,int size){
	switch(size){
		case 1:
			ink(x,y,2);
			for(int i=-1;i<=1;i+=2)
				for(int j=-1;j<=1;j+=2)
					change(x+i,y+j,-1);
			change(x,y,-1);
			break;
		case 2:
			for(int i=-1;i<=1;i++)
				for(int j=-1;j<=1;j++)
					change(x+i,y+j,1);
			break;
		case 3:
			ink(x,y,2);
			change(x-2,y,1);
			change(x+2,y,1);
			change(x,y-2,1);
			change(x,y+2,1);
			break;
	}
}

void change(int x,int y,int inc){
	if(x>=0&&x<10&&y>=0&&y<10)
		paper[x][y]+=inc;
}