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>
#include <cstdio>
#include <cstring>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  // 5, 9, 13
  int dx1[] = {-1,0,0,0,1};
  int dy1[] = {0,-1,0,1,0};
  int dx2[] = {-1,-1,-1,0,0,0,1,1,1};
  int dy2[] = {-1,0,1,-1,0,1,-1,0,1};
  int dx3[] = {-2,-1,-1,-1,0,0,0,0,0,1,1,1,0};
  int dy3[] = {0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
  vector<int> dx[3];
  vector<int> dy[3];
  dx[0].assign(dx1,dx1+5);
  dx[1].assign(dx2,dx2+9);
  dx[2].assign(dx3,dx3+13);
  dy[0].assign(dy1,dy1+5);
  dy[1].assign(dy2,dy2+9);
  dy[2].assign(dy3,dy3+13);
  
  int x, y, s;
  int ans1 = 100;
  int ans2 = 0;
  int ma[10][10];
  memset(ma,0,sizeof(ma));
  while(scanf("%d,%d,%d", &x,&y,&s)==3) {
    s--;
    REP(i,dx[s].size()) {
      int xx = x + dx[s][i];
      int yy = y + dy[s][i];
      if (xx<0||10<=xx||yy<0||10<=yy) continue;
      if (ma[xx][yy]==0) ans1--;
      ma[xx][yy]++;
      ans2 = max(ma[xx][yy], ans2);
    }
  }
  cout << ans1 << endl;
  cout << ans2 << endl;
}

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

int main()
{
  int x, y, size;
  int map[10][10] = {0};

  while (~scanf("%d,%d,%d", &x, &y, &size)){
    if ((0 <= x && x <= 9) && (0 <= y && y <= 9)) map[y][x]++;
    switch (size){
      case 1:
        if (0 <= y - 1 && y - 1 <= 9) map[y-1][x]++;
        if (0 <= y + 1 && y + 1 <= 9) map[y+1][x]++;
        if (0 <= x - 1 && x - 1 <= 9) map[y][x-1]++;
        if (0 <= x + 1 && x + 1 <= 9) map[y][x+1]++;
        break;
      case 2:
        if (0 <= y - 1 && y - 1 <= 9) map[y-1][x]++;
        if (0 <= y + 1 && y + 1 <= 9) map[y+1][x]++;
        if (0 <= x - 1 && x - 1 <= 9) map[y][x-1]++;
        if (0 <= x + 1 && x + 1 <= 9) map[y][x+1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x-1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x-1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x+1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x+1]++;
        break;
      case 3:
        if (0 <= y - 1 && y - 1 <= 9) map[y-1][x]++;
        if (0 <= y + 1 && y + 1 <= 9) map[y+1][x]++;
        if (0 <= x - 1 && x - 1 <= 9) map[y][x-1]++;
        if (0 <= x + 1 && x + 1 <= 9) map[y][x+1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x-1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x-1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x+1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x+1]++; 
        if (0 <= x + 2 && x + 2 <= 9) map[y][x+2]++;
        if (0 <= x - 2 && x - 2 <= 9) map[y][x-2]++;
        if (0 <= y + 2 && y + 2 <= 9) map[y+2][x]++;
        if (0 <= y - 2 && y - 2 <= 9) map[y-2][x]++;
        break;
    }
  }
  int w = 0, max = 0;
  for (int i = 0; i < 10; i++){
    for (int j = 0; j < 10; j++){
      if (!map[i][j]) w++;
      if (max < map[i][j]) max = map[i][j];
    }
  }
  printf("%d\n%d\n", w, max);

  return (0);
}

C++: #include <iostream>
#include <stdlib.h>
//using namespace System;
using namespace std;
int main()
{
	int map[10][10]={};
	int x,y,s,nx,ny;
	int dx1[]={-1,0,0,0,1};
	int dy1[]={0,-1,0,1,0};
	int dx2[]={-1,-1,-1,0,0,0,1,1,1};
	int dy2[]={-1,0,1,-1,0,1,-1,0,1};
	int dx3[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2};
	int dy3[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
	char c;
	while(cin>>x>>c>>y>>c>>s){
		if(cin.eof())break;
		if(s==1){
			for(int i=0;i<5;i++){
				nx=x+dx1[i];
				ny=y+dy1[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}else if(s==2){
			for(int i=0;i<9;i++){
				nx=x+dx2[i];
				ny=y+dy2[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}else{
			for(int i=0;i<13;i++){
				nx=x+dx3[i];
				ny=y+dy3[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}
	}
	int res=0,m=0;
	for(int i=0;i<10;i++)for(int j=0;j<10;j++)if(!map[i][j])res++;else if(map[i][j]>m)m=map[i][j];
	printf("%d\n%d\n",res,m);
	//system("pause");
    return 0;
}

C++: #include<stdio.h>
int main()
{
	int x,y,s,p[10][10]={0},nou=0,nul=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		p[x][y]++;
		if(x!=0){
			p[x-1][y]++;
		}
		if(x<9){
			p[x+1][y]++;
		}
		if(y!=0){
			p[x][y-1]++;
		}
		if(y<9){
			p[x][y+1]++;
		}
		if(s!=1){
			if(x!=0){
				if(y!=0){
					p[x-1][y-1]++;
				}
				if(y<9){
					p[x-1][y+1]++;
					}

			}
			if(x<9){
				if(y!=0){
					p[x+1][y-1]++;
				}
				if(y<9){
					p[x+1][y+1]++;
				}
			}
		}
		if(s==3){
			if(x>2){
				p[x-2][y]++;
			}
			if(y>2){
				p[x][y-2]++;
			}


			if(x<8){
				p[x+2][y]++;
			}
			if(y<8){
				p[x][y+2]++;
			}
		}

	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(p[i][j]==0){
				nul++;
			}
			if(p[i][j]>nou){
				nou=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",nul-1,nou);
	return 0;
}

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

int d[10][10];

inline void drop2(int x, int y) {
	if (x>=0 && x<10 && y>=0 && y<10)
		d[y][x]++;
}

void drop(int x, int y, int size) {
	if (size == 1) {
		drop2(x-1, y);
		drop2(x, y-1);
		drop2(x, y);
		drop2(x, y+1);
		drop2(x+1, y);
	} else if (size == 2) {
		for (int i = -1; i <= 1; i++)
			for (int j = -1; j <= 1; j++)
				drop2(x+i, y+j);
	} else /* if (size == 3 */ {
		for (int i = -1; i <= 1; i++)
			for (int j = -1; j <= 1; j++)
				drop2(x+i, y+j);
		drop2(x-2, y);
		drop2(x, y-2);
		drop2(x, y+2);
		drop2(x+2, y);
	}
}

int main() {
	int x, y, size;
	for (int y = 0; y < 10; y++)
		for (int x = 0; x < 10; x++)
			d[y][x] = 0;
	
	while (scanf("%d,%d,%d", &x, &y, &size) == 3) {
		drop(x, y, size);
	}

	int zeronum = 0;
	int maxnum = 0;
	for (int y = 0; y < 10; y++) {
		for (int x = 0; x < 10; x++) {
			if (d[y][x] == 0)
				zeronum++;
			if (d[y][x] > maxnum)
				maxnum = d[y][x];
		}
	}
	cout << zeronum << endl;
	cout << maxnum << endl;
	return 0;
}