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 <cstring>
#include <algorithm>
using namespace std;
int imap[11][11];
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
int maxv, sum;

void color(const int &x, const int &y, const int &t) {
    int nx = x, ny = y;
    if (t == 1) {
        imap[x][y]++;
        for (int i = 0; i < 4; i++) {
            nx=x+dx[i], ny=y+dy[i];
            if (nx >= 0 && nx < 10 && ny >= 0 && ny < 10) imap[nx][ny]++;
        }
        return;
    }
    if (t == 2 || t == 3) {
        imap[x][y]++;
        for (int i = -1; i <= 1; i++) {
            for (int j = -1; j <= 1; j++) {
                if (i == 0 && j == 0) continue;
                nx=x+i, ny=y+j;
                if (nx >= 0 && nx < 10 && ny >= 0 && ny < 10) imap[nx][ny]++;
            }
        }
        if (t == 2) return;
    }
    if (t == 3) {
        for (int i = 0; i < 4; i++) {
            nx=x+dx[i]*2, ny=y+dy[i]*2;
            if (nx >= 0 && nx < 10 && ny >= 0 && ny < 10) imap[nx][ny]++;
        }
        return;
    }
}

void calc() {
    maxv = sum = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (imap[i][j] == 0) sum++;
            else maxv = max(imap[i][j], maxv);
        }
    }
}

int main(){
    memset(imap, 0, sizeof (imap));
    int x, y, t;
    while(scanf("%d,%d,%d", &y, &x, &t) != EOF) {
        color(x, y, t);
    }
    calc();

    /*for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) printf("%d ", imap[i][j]);
        printf("\n");
    }*/
    printf("%d\n%d\n", sum, maxv);
    return 0;
}

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

int main(){
  int x,y,size,cnt = 0,ma = -1;
  int mas[10][10] = {0};
  int dx1[4] = {0,1,0,-1},dy1[4] = {1,0,-1,0};
  int dx2[8] = {0,1,0,-1,1,1,-1,-1},dy2[8] = {1,0,-1,0,1,-1,1,-1};
  int dx3[12]={1,0,-1,0,1,1,-1,-1,0,0,2,-2},dy3[12]={0,1,0,-1,-1,1,1,-1,2,-2,0,0};
  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    if(size == 1){
      mas[y][x] += 1;
      for(int i=0;i<4;i++){
	int nx = x+dx1[i];
	int ny = y+dy1[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 2){
      mas[y][x] += 1;
      for(int i=0;i<8;i++){
	int nx = x+dx2[i];
	int ny = y+dy2[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 3){
      mas[y][x] += 1;
      for(int i=0;i<12;i++){
	int nx = x+dx3[i];
	int ny = y+dy3[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j] == 0) cnt++;
      ma = max(ma,mas[i][j]);
    }
  }
  cout << cnt << endl << ma << endl;
}

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

int ds[3] = {5,9,13};
int dx[13] = { 0,-1, 0, 1, 0,-1, 1,-1, 1, 0,-2, 2, 0};
int dy[13] = {-1, 0, 0, 0, 1,-1,-1, 1, 1,-2, 0, 0, 2};

int main() {

  int x,y,size;
  char c;
  int map[14][14] = {0};

  int cnt = 0;
  int map_max = 0;

  while( cin >> x >> c >> y >> c >> size ) {

    for ( int i = 0; i < ds[size-1]; i++ ) {

      map[ x+2 + dx[i] ][ y+2 + dy[i] ]++;

    }

  }

  for ( int i = 2; i < 12; i++ ) {
    for ( int j = 2; j < 12; j++ ) {
      
      if ( map[i][j] == 0 ) cnt++;
      map_max = max( map_max, map[i][j] );
      
    }
  }

  cout << cnt << endl << map_max << endl;

  return 0;

}

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int dc[3] = {4,10,13};
int dx[3][13] = {
	{-1,0,-1,0,0},
	{-1,-1,-1,0,0,0,1,1,1},
	{-2,-1,-1,-1,0,0,0,0,0,1,1,1,2}
};
int dy[3][13] = {
	{0,0,0,-1,1},
	{-1,0,1,-1,0,1,-1,0,1},
	{0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}
};

int main(){
	int a,b,c;
	int d[10][10] = {0};
	while(~scanf("%d,%d,%d",&a,&b,&c)){
		c--;
		rep(i,dc[c]){
			int tx = a + dx[c][i] , ty = b + dy[c][i];
			if(tx < 0 || ty < 0 || ty > 9 || tx > 9) continue;
			d[ty][tx]++;
		}
	}
	int white = 0;
	int ans = 0;
	rep(i,10)rep(j,10){
		if(d[i][j]==0)white++;
		else ans = max(d[i][j],ans);
	}
	cout << white << endl << ans << endl;
}

C++: #include<iostream>
#include<vector>
#include <algorithm>
#include<stdio.h>
int main(){
	std::vector<std::vector<int>> vec(10,std::vector<int>(10,0));
	while(1){
		int x,y,size;
		scanf("%d,%d,%d",&x,&y,&size);
		//std::cin>>x>>y>>size;
		if(std::cin.eof())break;
		//if(x==0&&y==0&&size==0)break;
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
	}
	std::cout<<no<<std::endl;
	sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;
	return 0;
}