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 <algorithm>
using namespace std;

int main( void )
{
	int bi[13][2] = {
		{ 0, 2 },
		{ -1, 1 }, { 0, 1 }, { 1, 1 },
		{ -2, 0 }, { -1, 0 }, { 0, 0 }, { 1, 0 }, { 2, 0 },
		{ -1, -1 }, { 0, -1 }, { 1, -1 },
		{ 0, -2 }
	};
	int me[9][2] = {
		{ -1, 1 }, { 0, 1 }, { 1, 1 },
		{ -1, 0 }, { 0, 0 }, { 1, 0 },
		{ -1, -1 }, { 0, -1 }, { 1, -1 }
	};
	int sm[5][2] = {
		{ 0, 1 },
		{ -1, 0 }, { 0, 0 }, { 1, 0 },
		{ 0, -1 }
	};

	vector < vector <int> > V(10, vector<int>(10, 0));
	int max_value = 0;
	while ( !cin.eof() )
	{
		int x, y, size;
		char c1, c2;
		cin >> x >> c1 >> y >> c2 >> size;
		if ( cin.eof() )
			break;

		if ( size == 1 )
		{
			for ( int i = 0; i < 5; i++ )
			{
				int nx = x + sm[i][0];
				int ny = y + sm[i][1];

				if ( ( nx >= 0 && nx < 10 ) && ( ny >= 0 && ny < 10 ) )
				{
					V[ny][nx]++;
					max_value = max( V[ny][nx], max_value );
				}
			}
		}
		else if ( size == 2 )
		{
			for ( int i = 0; i < 9; i++ )
			{
				int nx = x + me[i][0];
				int ny = y + me[i][1];

				if ( ( nx >= 0 && nx < 10 ) && ( ny >= 0 && ny < 10 ) )
				{
					V[ny][nx]++;
					max_value = max( V[ny][nx], max_value );
				}
			}
		}
		else if ( size == 3 )
		{
			for ( int i = 0; i < 13; i++ )
			{
				int nx = x + bi[i][0];
				int ny = y + bi[i][1];

				if ( ( nx >= 0 && nx < 10 ) && ( ny >= 0 && ny < 10 ) )
				{
					V[ny][nx]++;
					max_value = max( V[ny][nx], max_value );
				}
			}
		}
	}

	int emp = 0;
	for ( int i = 0; i < 10; i++ )
	{
		for ( int j = 0; j < 10; j++ )
		{
			if ( V[i][j] == 0 )
				emp++;
		}
	}

	cout << emp << endl;
	cout << max_value << endl;

	return 0;
}

C++: #include <cstdio>
#include <iostream>
using namespace std;
bool t[3][5][5] = {
  {{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}},
  {{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,1,0,0}, {0,1,1,1,0}, {1,1,1,1,1}, {0,1,1,1,0}, {0,0,1,0,0}}
};
int main() {
  int a[10][10] = {}, x, y, s, i, j, m = 0, c = 0;
  while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    for (i = 0; i < 5; i++) {
      for (j = 0; j < 5; j++) {
        if ((x + i - 2) < 0 || (x + i - 2) > 9 || (y + j - 2) < 0 || (y + j - 2) > 9)
          continue;
        if (t[s - 1][i][j])
          a[x + i - 2][y + j - 2]++;
      }
    }
  }
  for (x = 0; x < 10; x++) {
    for (y = 0; y < 10; y++) {
      if (!a[x][y])
        c++;
      if (a[x][y] > m)
        m = a[x][y];
    }
  }
  cout << c << endl;
  cout << m << endl;
  return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>

typedef long long ll;
using namespace std;


void paint(int cell[10][10],int x, int y, int size,int *maxC){
	if(size == 3){
		for(int i=x-2;i<=x+2;i++){
			for(int j=y-2;j<=y+2;j++){
				if(sqrt(pow((double)i-(double)x,2.0) + pow((double)j-(double)y,2.0)) <= 2.0){
					if(i >=0 && i< 10 && j>= 0&& j<10){
						cell[j][i]++;
						*maxC = max(cell[j][i],*maxC);
					}
				}
			}
		}
	}

	if(size == 2){
		for(int i=x-1;i<=x+1;i++){
			for(int j=y-1;j<=y+1;j++){
				if(i >=0 && i< 10 && j>= 0&& j<10){
					cell[j][i]++;
					*maxC = max(cell[j][i],*maxC);
				}
			}
		}
	}

	if(size == 1){
		int tx[5] = {-1,0,1,0,0};
		int ty[5] = {0,1,0,-1,0};
		for(int i=0;i<5;i++){
			cell[y+ty[i]][x+tx[i]]++;
			*maxC = max(cell[y+ty[i]][x+tx[i]],*maxC);
		}
	}
}

int main()
{
	int cell[10][10];
	fill((int*)cell,(int*)cell+10*10,0);
	string str;
	int maxC=0;
	int count=0;
	while(getline(cin,str,',')){
		string str2;

		getline(cin,str2,',');
		string str3;

		getline(cin,str3);		
		paint(cell,str[0]-'0',str2[0]-'0',str3[0]-'0',&maxC);
		
	}
	for(int i=0;i<10;i++) for(int j=0;j<10;j++) count += cell[i][j] == 0 ? 1 : 0;

	cout << count << endl;
	cout << maxC << endl;
}

C++: #include <stdio.h>
  int xy[15][15]={};
  int main(){
	  int x,y,s,i,j,num=0;
	  while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
		  if(s==1){
			  xy[x][y]++;
			  xy[x-1][y]++;
			  xy[x+1][y]++;
			  xy[x][y-1]++;
			  xy[x][y+1]++;
		  }else if(s==2){
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
		  }else if(s==3){
			  xy[x-2][y]++;
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-2]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x][y+2]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
			  xy[x+2][y]++;
		  }
	  }
	  int max=xy[0][0];
	  for(i=0;i<10;i++){
		  for(j=0;j<10;j++){
			  if(xy[i][j]==0) num++;
			  if(xy[i][j]>max) max=xy[i][j];
		  }
	  }
	  printf("%d\n%d\n",num,max);
	  return 0;
  }

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

int table[12][12]={0};

void dropink(int x,int y, int s){
	switch (s){
		case 3:
			if(x-2>=0)
				table[x-2][y]++;
			if(y-2>=0)
				table[x][y-2]++;
			if(x+2<=11)
				table[x+2][y]++;
			if(y+2<=11)
				table[x][y+2]++;
		case 2:
			table[x+1][y+1]++;
			table[x-1][y+1]++;
			table[x+1][y-1]++;
			table[x-1][y-1]++;
		case 1:
			table[x][y]++;
			table[x+1][y]++;
			table[x][y+1]++;
			table[x-1][y]++;
			table[x][y-1]++;
	}
	return ;
}

int main(){
	int x,y,s;
	char tem;
	while( cin >> x >> tem >> y >> tem >> s ,!cin.eof())
		dropink(x+1,y+1,s);
	int NUM=0,MAX=0;
	for(int y=1;y<=10;y++){
		for(int x=1;x<=10;x++){
			cout << table[x][y] << ' ';
			if(table[x][y])
				MAX=max(MAX,table[x][y]);
			else
				NUM++;
		}
		cout << endl;
	}
	cout << NUM << endl << MAX << endl;
	return 0;
}