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<cstdio>

int main(void){

	int paper[10+2+2][10+2+2]={0};
	int x,y,s;
	int max=0,num=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		if(s>=1){
			paper[2+x][2+y]++;
			paper[2+x][2+y+1]++;
			paper[2+x][2+y-1]++;
			paper[2+x+1][2+y]++;
			paper[2+x-1][2+y]++;
		}
		if(s>=2){
			paper[2+x+1][2+y+1]++;
			paper[2+x-1][2+y+1]++;
			paper[2+x+1][2+y-1]++;
			paper[2+x-1][2+y-1]++;
		}
		if(s>=3){
			paper[2+x][2+y+2]++;
			paper[2+x][2+y-2]++;
			paper[2+x+2][2+y]++;
			paper[2+x-2][2+y]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(max<paper[2+i][2+j]) max=paper[2+i][2+j];
			if(paper[2+i][2+j]==0) num++;
		}
	}
	printf("%d\n%d\n",num,max);
	return 0;
}

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

using namespace std;

static int paper[10][10];

void drop_ink(int x, int y, int size) {
  switch (size) {
    case 3:
      if (y > 1) { ++paper[y-2][x]; }
      if (x > 1) { ++paper[y][x-2]; }
      if (x < 8) { ++paper[y][x+2]; }
      if (y < 8) { ++paper[y+2][x]; }
      // Fall through.
    case 2:
      if (y > 0 && x > 0) { ++paper[y-1][x-1]; }
      if (y > 0 && x < 9) { ++paper[y-1][x+1]; }
      if (y < 9 && x > 0) { ++paper[y+1][x-1]; }
      if (y < 9 && x < 9) { ++paper[y+1][x+1]; }
      // Fall through.
    case 1:
      if (y > 0) { ++paper[y-1][x]; }
      if (x > 0) { ++paper[y][x-1]; }
      ++paper[y][x];
      if (x < 9) { ++paper[y][x+1]; }
      if (y < 9) { ++paper[y+1][x]; }
      break;
  }
}

int main() {
  char *line = NULL;
  size_t buffer_size = 0;
  while (getline(&line, &buffer_size, stdin) > 0) {
    int x, y, size;
    sscanf(line, "%d,%d,%d", &x, &y, &size);
    drop_ink(x, y, size);
  }
  free(line);

  int num_white_cells = 0;
  int deepest_cell = 0;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      if (paper[i][j] == 0) { ++num_white_cells; }
      else { deepest_cell = max(deepest_cell, paper[i][j]); }
    }
  }
  printf("%d\n%d\n", num_white_cells, deepest_cell);

  return 0;
}

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() << '\n' << boad1.MostInkedCell() << '\n';

}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int masu[13][13]={0},x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		x+=2,y+=2;
		if(s==1){
			for(int i=x-1;i<=x+1;i++)masu[i][y]++;
			masu[x][y-1]++;
			masu[x][y+1]++;
		}else if(s==2){
			for(int i=x-1;i<=x+1;i++){
				for(int j=y-1;j<=y+1;j++){
					masu[i][j]++;
				}
			}
		}else{
			for(int i=x-1;i<=x+1;i++){
				for(int j=y-1;j<=y+1;j++){
					masu[i][j]++;
				}
			}
			masu[x-2][y]++,masu[x+2][y]++;
			masu[x][y-2]++,masu[x][y+2]++;
		}
	}
	int siro=0,koi=0;
	for(int i=2;i<=11;i++){
		for(int j=2;j<=11;j++){
			if(masu[i][j]==0)siro++;
			if(koi<masu[i][j])koi=masu[i][j];
		}
	}
	cout<<siro<<endl<<koi<<endl;
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int m[10][10];
void small(int x,int y,int r) {
	if (y-r>=0) m[x][y-r]++;
	if (x-r>=0) m[x-r][y]++; 
	if (x+r<=9) m[x+r][y]++;
	if (y+r<=9) m[x][y+r]++;
	m[x][y]++;
}
void middle(int x,int y) {
	for (int i=-1; i<2; i++) for (int j=-1; j<2; j++) 
		if (x+i>=0 && x+i<=9 && y+j>=0 && y+j<=9) m[x+i][y+j]++;
}
void large(int x,int y) {
	middle(x,y);
	small(x,y,2);
    m[x][y]--;
}

int main() {
	int x,y,n,i,j,h,k;
	while(scanf("%d,%d,%d",&x,&y,&n)) {
		if (n==1) small(x,y,1); 
		if (n==2) middle(x,y);
		if (n==3) large(x,y);
	}
    n=0; h=0; k=0;
	for (i=0;i<10;i++) for (j=0;j<10;j++) {
		if (m[i][j]==0) k++; else h=h<m[i][j] ? m[i][j] : h;
	}
    cout << k << endl << h << endl;
	return 0;
	}