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<vector>
#include<string>

enum InkSize
{
	small=0,
	middle,
	large
};

InkSize Next(int x)
{
	if(x<0 || 2<x)
	{
		std::cout << "Input Error.\n";

		return small;
	}

	const InkSize ink[3]=
	{
	small,
	middle,
	large
	};

	return ink[x];
}

struct Board
{
	Board(int a)
	{
		for(size_t i=0; i<m_element; ++i)
		{
			for(size_t j=0; j<m_element; ++j)
			{
				m_map[j][i] = a;
			}
		}
	}
	
	void DropInk(int x, int y, InkSize ink)
	{
		const int inkSet[3][5][5]=
		{
			{//small
				{0,0,0,0,0},
				{0,0,1,0,0},
				{0,1,1,1,0},
				{0,0,1,0,0},
				{0,0,0,0,0},
			},
			{//middle
				{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},
			},
			{//large
				{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(size_t i=0; i<5; ++i)
		{
			for(size_t j=0; j<5; ++j)
			{
				if( y-2+i<0 || x-2+j<0 || y-2+i>9 || x-2+j>9 )
				{
					continue;
				}

				m_map[y-2+i][x-2+j] += inkSet[ink][i][j];
			}
		}
	}

	int CountNonInkedCell()
	{
		int count=0;

		for(size_t i=0; i<m_element; ++i)
		{
			for(size_t j=0; j<m_element; ++j)
			{
				if(m_map[i][j]==0)
				{
					++count;
				}
			}
		}

		return count;
	}

	int MostInkedCell()
	{
		int max=0;

		for(size_t i=0; i<m_element; ++i)
		{
			for(size_t j=0; j<m_element; ++j)
			{
				if(m_map[i][j]>max)
				{
					max=m_map[i][j];
				}
			}
		}

		return max;
	}

	enum { m_element = 10 };

	int m_map[m_element][m_element];
};

int main()
{
	Board boad1(0);

	int x=0, y=0, inkSize=0;

	char c;

	while(std::cin >> x >> c >> y >> c >> inkSize)
	{
		boad1.DropInk(x,y,Next(inkSize-1));
	}

	std::cout << boad1.CountNonInkedCell() << ' ' << boad1.MostInkedCell() << '\n';

}

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

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

void drop_ink(int x,int y,int size) {
	if (size == 1) {
		for (int i = 0; i < 3; i++) {
			if (x + i - 1 >= 0 && y >= 0) { paper[x + i - 1][y] += 1; }
		}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y + i - 1 >= 0) {
				if (y + i - 1 != y) { paper[x][y + i - 1] += 1; }
			}
		}
	}
	else if (size == 2) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y - 1 + i >= 0) {
				paper[x][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
				}
			}
	}
	else if (size == 3) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
			}
		}
		for (int i = 0; i < 5; i++) {
			if (x >= 0 && y - 2 + i >= 0) {
				paper[x][y - 2 + i] += 1;
			}
		}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
			}
		}
		if (x + 2 >= 0 && y >= 0){paper[x + 2][y] += 1;}
		if (x - 2 >= 0 && y >= 0) { paper[x - 2][y] += 1; }
	}
}
int main() {
	char x[1], y[1], size[1]; char tem[100];
	int white = 0; int most_intense=0;
	for (int i = 0; i < 3;i++) {
		cin >> tem;
		x[0] = tem[0]; y[0] = tem[2]; size[0] = tem[4];
		drop_ink(atoi(x),atoi(y),atoi(size));
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[j][i] == 0) { white += 1; }
			if (most_intense < paper[j][i]) { most_intense = paper[j][i]; }
		}
	}
	cout << white << endl << most_intense ;
}

C++: #include<cstdio>

using namespace std;

int main(void){
	int pa[14][14];
	int i,j;
	int x,y,size,da=0,not=0;
	
	for(i=0;i<14;i++){
		for(j=0;j<14;j++)
			pa[i][j]=0;
	}

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		x=x+2;
		y=y+2;
		switch(size){
			case 1:
				pa[y][x]++;
				pa[y-1][x]++;
				pa[y+1][x]++;
				pa[y][x-1]++;
				pa[y][x+1]++;
				break;
			case 2:
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[y+i][x+j]++;
				}
				break;
			case 3:
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[y+i][x+j]++;
				}
				pa[y-2][x]++;
				pa[y+2][x]++;
				pa[y][x-2]++;
				pa[y][x+2]++;
				break;
		}
	}
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(pa[i][j]==0)
				not++;
			if(pa[i][j]>da)
				da=pa[i][j];
		}
	}
	printf("%d\n%d\n",not,da);

	return 0;
}

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

int map[14][14];

void inkM( int x, int y ){
	for( int i=-1; i<=1; i++ ){
		for( int j=-1; j<=1; j++ ){
			map[x+i][y+j]++;
		}
	}
}

void inkL( int x, int y ){
	inkM( x, y );
	map[x-2][y]++;
	map[x+2][y]++;
	map[x][y-2]++;
	map[x][y+2]++;
}

void inkS( int x, int y ){
	map[x][y]++;
	map[x-1][y]++;
	map[x+1][y]++;
	map[x][y+1]++;
	map[x][y-1]++;
}

int main(){
	int x,y,s;
	string str;
	while(1){
		getline( cin, str );
		if( str.length()==0 ) 	break;
		sscanf( str.c_str(), "%d,%d,%d", &x, &y, &s );
		x+=2; y+=2;
		if( s==1 )		inkS( x, y );
		else if( s==2 )	inkM( x, y );
		else if( s==3 )	inkL( x, y );
	}
	int max=0, cnt=0;
	for( int y=2; y<12; y++ ){
		for( int x=2; x<12; x++ ){
			if( map[x][y] == 0 )	cnt++;
			if( max < map[x][y] )	max = map[x][y];
		}
	}
	cout << cnt << endl;
	cout << max << endl;
	return 0;
}