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>
#include <algorithm>

void ink(char[][10],int,int,int);
void change(char[][10],int,int,int);

int main(void){
	char paper[10][10]={0};
	int white=0,max_ink=0;

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

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

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

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

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

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
 
using namespace std;
 
const double eps=1e-10;
 
int main()
{
	int x,y,s,c[14][14]={0};
	char dummy;
	while(cin>>x>>dummy>>y>>dummy>>s){
		x+=2; y+=2;

		c[y][x]++;
		c[y+1][x]++; c[y-1][x]++;
		c[y][x+1]++; c[y][x-1]++;

		if(s>=2){
			c[y-1][x-1]++; c[y-1][x+1]++;
			c[y+1][x-1]++; c[y+1][x+1]++;
		}

		if(s==3){
			c[y-2][x]++; c[y+2][x]++;
			c[y][x-2]++; c[y][x+2]++;
		}

	}

	int w=0,d=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(c[i][j]==0) w++;
			d=max(d,c[i][j]);
		}
	}

	cout<<w<<endl<<d<<endl;


	return 0;
}

C++: #include "stdio.h"
int main(){
	int i,j;
	int p[14][14],x,y,s;
	for(i=2;i<12;i++)for(j=2;j<12;j++)p[i][j]=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=-1){
		y+=2;x+=2;
		p[y][x]++;
		p[y+1][x]++;
		p[y-1][x]++;
		p[y][x+1]++;
		p[y][x-1]++;
		if(s>=2){
			p[y+1][x+1]++;
			p[y+1][x-1]++;
			p[y-1][x-1]++;
			p[y-1][x+1]++;
			
		}
		if(s>=3){
			p[y+2][x]++;
			p[y-2][x]++;
			p[y][x+2]++;
			p[y][x-2]++;
		}
	}
	int mx=0,no=0;
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(!p[i][j])no++;
			if(p[i][j]>mx)mx=p[i][j];
		}
	}
	printf("%d\n%d\n",no,mx);
	return 0;
}

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

int main() {
  int xi,yi,size,xy[10][10] = {0};
  int white,top;
  string str;
  while(cin >> str) {
    xi = atoi(str.substr(0,1).c_str());
    yi = atoi(str.substr(2,1).c_str());
    size = atoi(str.substr(4,1).c_str());
    if((size == 1) ||(size == 2)||(size == 3)) {
      xy[xi][yi]++;
      xy[xi+1][yi]++;
      xy[xi-1][yi]++;
      xy[xi][yi+1]++;
      xy[xi][yi-1]++;
    }
    if((size == 2) || (size == 3)) {
      xy[xi+1][yi+1]++;
      xy[xi+1][yi-1]++;
      xy[xi-1][yi+1]++;
      xy[xi-1][yi-1]++;
    }
    if(size == 3) {
      xy[xi][yi+2]++;
      xy[xi][yi-2]++;
      xy[xi+2][yi]++;
      xy[xi-2][yi]++;
    }
  }
  white = 0;
  top = xy[0][0];
  for(int i=0;i<10;i++) {
    for(int j=0;j<10;j++) {
      if(xy[i][j] == 0)
        white++;
      if(xy[i][j] > top)
        top = xy[i][j];
    }
  }
  cout << white << endl << top << endl;
}

C++: #include <iostream>

#define SIZE 10

using namespace std;

int map[SIZE][SIZE];

void drop(int x, int y) {
	if (x < 0 || y < 0 || x >= SIZE || y >= SIZE) return;

	map[x][y]++;
	return;
}

int main() {
	int x, y, s, count = 0, most = 0;
	char e;
	while (cin>>x>>e>>y>>e>>s) {
		x--;
		y--;
		drop(x, y);
		drop(x, y + 1);
		drop(x + 1, y);
		drop(x, y - 1);
		drop(x - 1, y);

		if (s > 1) {
			drop(x + 1, y + 1);
			drop(x + 1, y - 1);
			drop(x - 1, y - 1);
			drop(x - 1, y + 1);

			if (s > 2) {
				drop(x, y + 2);
				drop(x, y - 2);
				drop(x + 2, y);
				drop(x - 2, y);
			}
		}
	}

	for (int i = 0; i < SIZE; i++) {
		for (int j = 0; j < SIZE; j++) {
			if (map[i][j] > most) {
				most = map[i][j];
			}

			if (map[i][j] == 0) {
				count++;
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
bool in(int x,int y){
  if(x<0||x>9||y<0||y>9) return false;
  return true;
}
int main(){
  int pa[10][10]={{}};
  string str;
  int i,j;
  while(cin >> str){
    int x=str[0]-'0',y=str[2]-'0',s=str[4]-'0';
    if(s==1){
      for(i=-1;i<=1;i++){
	for(j=-1+abs(i);j<=1-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==2){
      for(i=-1;i<=1;i++){
	for(j=-1;j<=1;j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==3){
      for(i=-2;i<=2;i++){
	for(j=-2+abs(i);j<=2-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }
  }
  int o=0,m=0;
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      //cout << pa[i][j];
      m=max(m,pa[i][j]);
      if(pa[i][j]==0) o++;
    }
    //cout << endl;
  }
  cout << o << endl << m << endl;
  return 0;
}