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

int xy[14][14] = {};

int dai(int x, int y){
	xy[x-2][y]++;
	xy[x+2][y]++;
	xy[x][y-2]++;
	xy[x][y+2]++;
	return 0;
}

int chu(int x, int y, int z){
	if(z>2){
		dai(x, y);
	}
	xy[x-1][y+1]++;
	xy[x+1][y+1]++;
	xy[x-1][y-1]++;
	xy[x+1][y-1]++;
	return 0;
}

int sho(int x, int y, int z){
	if(z>1){
		chu(x, y, z);
	}
	xy[x][y]++;
	xy[x-1][y]++;
	xy[x][y-1]++;
	xy[x+1][y]++;
	xy[x][y+1]++;
	return 0;
}

int main(){
	string input, xx, yy, zz;
	int x, y, z;
	while (true){
		cin >> input;
		if (cin.eof()||input == "000") { break; }
		xx = input[0];
		yy = input[2];
		zz = input[4];
		x = stoi(xx) + 2;
		y = stoi(yy) + 2;
		z = stoi(zz);
		sho(x, y, z);
		cout << xx << yy << zz << x << y << z << endl;
	}
	int add = 0, max = 0;
	for(int i = 2;i<12;i++){
		for(int j = 2;j<12;j++){
			cout << xy[i][j];
			if (xy[i][j] == 0) { add++; }
			if (xy[i][j] > max) { max = xy[i][j]; }
		}
		cout << endl;
	}
	cout << add << endl
		<< max << endl;
	return 0;
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

int sheet[10 + 4][10 + 4];
int sx[] = {1, 0, -1, 0};
int sy[] = {0, -1, 0, 1};
int ssize = 4;
int mx[] = {1, 1, 1, 0, -1, -1, -1, 0};
int my[] = {1, 0, -1, -1, -1, 0, 1, 1};
int msize = 8;
int lx[] = {1, 1, 1, 0, -1, -1, -1, 0, 2, 0, -2, 0};
int ly[] = {1, 0, -1, -1, -1, 0, 1, 1, 0, -2, 0, 2};
int lsize = 12;

int main()
{
  int x, y, size;
  for (int i = 0; i < 15; i++) {
    fill(sheet[i], &sheet[i][15], 0);
  }
  while (scanf("%d,%d,%d ", &x, &y, &size) == 3) {
    //printf("%d,%d,%d\n", x, y, size);
    x += 2, y += 2;
    sheet[x][y]++;
    if (size == 1) {
      for (int i = 0; i < ssize; i++) {
	sheet[x + sx[i]][y + sy[i]]++;
      }
    } else if (size == 2) {
      for (int i = 0; i < msize; i++) {
	sheet[x + mx[i]][y + my[i]]++;
      }
    } else {
      for (int i = 0; i < lsize; i++) {
	sheet[x + lx[i]][y + ly[i]]++;
      }
    }
  }
  
  int max_w = 0, count = 0;;
  for (int i = 2; i <= 11; i++) {
    for (int j = 2; j <= 11; j++) {
      max_w = max(max_w, sheet[i][j]);
      if (sheet[i][j] == 0) {
	count++;
      }
    }
  }
  printf("%d\n%d\n", count, max_w);
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;
int main ()
{
	int m[18][18] = {};
	int x, y, s;
	int dx1[4] = {0, 1, 0, -1}, dy1[4] = {1, 0, -1, 0};
	int dx2[8] = {0, 1, 1, 1, 0, -1, -1, -1}, dy2[8] = {1, 1, 0, -1, -1, -1, 0, 1};
	int dx3[12] = {0, -1, 0, 1, -2, -1, 1, 2, -1, 0, 1, 0}, dy3[12] = {2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2};
	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		x += 3;
		y += 3;
		m[x][y]++;
		switch (s)
		{
		case 1:
			for (int i = 0; i < 4; i++)m[x + dx1[i]][y + dy1[i]]++;
			break;
		case 2:
			for (int i = 0; i < 8; i++)m[x + dx2[i]][y + dy2[i]]++;
			break;
		case 3:
			for (int i = 0; i < 12; i++)m[x + dx3[i]][y + dy3[i]]++;
			break;
		}
	}
	int ans1 = 0, ans2 = 0;
	for (int x = 3; x <13; x++)
	{
		for (int y = 3; y < 13; y++)
		{
			if (m[x][y] == 0)ans1++;
			ans2 = max(ans2, m[x][y]);
			cout<<m[y][x];
		}
		cout<<endl;
	}
	cout << ans1 << endl << ans2 << endl;
	return 0;
}

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

int board[10][10];

void fill(int x, int y){
	if(0<=x && x<10 && 0<=y && y<10){
		board[y][x]++;
	}
}

int main(){
	int x, y, size;
	for (y = 0; y < 10; y++) {
		for (x = 0; x < 10; x++) {
			board[y][x] = 0;
		}
	}
	while(~scanf("%d,%d,%d", &x, &y, &size)){
		if(size >= 1){ // small
			fill(x, y);
			fill(x+1, y);
			fill(x-1, y);
			fill(x, y+1);
			fill(x, y-1);
		}
		if (size >= 2) { // medium
			fill(x+1, y+1);
			fill(x+1, y-1);
			fill(x-1, y+1);
			fill(x-1, y+1);
		}
		if(size >= 3){ // large
			fill(x+2, y);
			fill(x-2, y);
			fill(x, y+2);
			fill(x, y-2);
		}
	}
	int num_zero = 0;
	int deepest = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if(board[j][i] == 0){
				num_zero++;
			}
			if(deepest < board[j][i]){
				deepest = board[j][i];
			}
		}
	}
	cout << num_zero << endl;
	cout << deepest << endl;

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

int dens[10][10];
void sink(int x, int y) {
  if (0 <= x && x < 10 && 0 <= y && y < 10) {
    dens[y][x]++;
  }
}

int main() {
  string line;
  while (getline(cin, line)) {
    int x, y, size;
    sscanf(line.c_str(), "%d,%d,%d", &x, &y, &size);
    if (size == 1) {
      sink(x+0,y+0);
      sink(x+1,y+0);
      sink(x-1,y+0);
      sink(x+0,y+1);
      sink(x+0,y-1);
    } else if (size == 2) {
      sink(x+0,y+0);
      sink(x+1,y+0);
      sink(x-1,y+0);
      sink(x+0,y+1);
      sink(x+0,y-1);
      sink(x+1,y+1);
      sink(x-1,y+1);
      sink(x+1,y-1);
      sink(x-1,y-1);
    } else if (size == 3) {
      sink(x+0,y+0);
      sink(x+1,y+0);
      sink(x-1,y+0);
      sink(x+0,y+1);
      sink(x+0,y-1);
      sink(x+1,y+1);
      sink(x-1,y+1);
      sink(x+1,y-1);
      sink(x-1,y-1);
      sink(x+2,y+0);
      sink(x-2,y+0);
      sink(x+0,y+2);
      sink(x+0,y-2);
    }
  }
  int m = 0;
  int count = 0;
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) {
      if (dens[i][j] == 0) count++;
      m = max(m, dens[i][j]);
    }
  }
  cout << count << endl;
  cout << m << endl;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <queue>

using namespace std;

int main(void){

	int p[10][10] = {};
	int l[4] = { 0, 5, 9, 13 };
	int d[13][2] = { { 0, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 },		//ここまで小
					{ 1, 1 } , { 1, -1 }, { -1, 1 }, { -1, -1 },	//ここまで中
					{ 2, 0 }, { 0, 2 }, { -2, 0 }, { 0, -2 } };		//ここまで大
	int x, y, s;

	while( scanf("%d,%d,%d", &x, &y, &s) != EOF ) {
		for( int i = 0; i < l[s]; i++ ) {
			int tx = x + d[i][0], ty = y + d[i][1];
			if( tx < 0 || tx >= 9 || ty < 0 || ty >= 9 ) continue;
			p[tx][ty] ++;
		}
	}

	int cnt = 0, max = 0;
	for( int i = 0; i < 100; i++ ) {
		if( p[i%10][i/10] > max ) max = p[i%10][i/10];
		if( p[i%10][i/10] == 0 ) cnt ++;
	}
	cout << cnt << endl;
	cout << max << endl;

    return 0;
}