Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d", count, max)
}

C++: #include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

const int MAX_H = 10;
const int MAX_W = 10;
int m[MAX_H][MAX_W];
int x, y ,s;
int cnt = MAX_H * MAX_W;
int mx;

inline bool check(int x, int y){ return 0<=x&&x<MAX_H && 0<=y&&y<=MAX_W; }

void dfs(int x, int y)
{
  maxup(mx, m[x][y]);
  m[x][y] = 0;
  cnt -= 1;
  erep(dx, -1, 1) erep(dy, -1, 1) if(check(x+dx, y+dy)) if(m[x+dx][y+dy]) dfs(x+dx, y+dy);
}

int main()
{
  while(scanf(" %d,%d,%d", &x, &y, &s) == 3){
    if(s%2){
      int d = s/2 + 1;
      int dx[] = {-d, 0, d, 0};
      int dy[] = {0, -d, 0, d};
      rep(i, 4) if(check(x+dx[i], y+dy[i])) m[x+dx[i]][y+dy[i]] += 1;
    }
    if(s-1){
      erep(i, -1, 1) erep(j, -1, 1) if(i || j) if(check(x+i, y+j)) m[x+i][y+j] += 1;
    }
  }

  rep(i, MAX_H) rep(j, MAX_W) if(m[i][j]) dfs(i, j);

  cout << cnt << endl << mx << endl;

  return 0;
}

C++: #include<stdio.h>
#include<string.h>

int main(){
	int kami[14][14],x,y,size,i,j,max,siro;
	memset(kami,0,sizeof(kami));
	
	while(0<=scanf("%d,%d,%d",&x,&y,&size)){
		if(size==1){
			kami[x+1][y+2]+=1;
			kami[x+2][y+1]+=1;
			kami[x+2][y+2]+=1;
			kami[x+2][y+3]+=1;
			kami[x+3][y+2]+=1;
		}else if(size==2){
			kami[x+1][y+1]+=1;
			kami[x+1][y+2]+=1;
			kami[x+1][y+3]+=1;
			kami[x+2][y+1]+=1;
			kami[x+2][y+2]+=1;
			kami[x+2][y+3]+=1;
			kami[x+3][y+1]+=1;
			kami[x+3][y+2]+=1;
			kami[x+3][y+3]+=1;
		}else if(size==3){
			kami[x][y+2]+=1;
			kami[x+1][y+1]+=1;
			kami[x+1][y+2]+=1;
			kami[x+1][y+3]+=1;
			kami[x+2][y]+=1;
			kami[x+2][y+1]+=1;
			kami[x+2][y+2]+=1;
			kami[x+2][y+3]+=1;
			kami[x+2][y+4]+=1;
			kami[x+3][y+1]+=1;
			kami[x+3][y+2]+=1;
			kami[x+3][y+3]+=1;
			kami[x+4][y+2]+=1;
		}
		
	}
	max=0;
	siro=0;
	
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(kami[i][j]==0)++siro;
			if(max<kami[i][j])max=kami[i][j];
		}
	}
	printf("%d\n%d\n",siro,max);
	return 0;
}

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

int board[10][10];
int empty = 0;
int _max = INT_MIN;

bool ok(int val) {
    return(val >= 0 && val < 10);
}
void initialize() {
    for(int r = 0; r < 10; r++) {
        memset(board[r], 0, sizeof(board[r]));
    }
}
void small(int x, int y) {
    board[y][x]++;
    int north = y - 1, south = y + 1,  east = x + 1, west = x - 1;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}
void mid(int x, int y) {
    small(x, y);
    int uprightx = x + 1, uprighty = y + 1;
    int downrightx = x + 1, downrighty = y - 1;
    int downleftx = x - 1, downlefty = y - 1;
    int upleftx = x - 1, uplefty = y + 1;
    if(ok(uprightx) && ok(uprighty)) board[uprighty][uprightx]++;
    if(ok(downrightx) && ok(downrighty)) board[downrighty][downrightx]++;
    if(ok(downleftx) && ok(downlefty)) board[downrighty][downrightx]++;
    if(ok(upleftx) && ok(uplefty)) board[uplefty][upleftx]++;
}
void large(int x, int y) {
    mid(x, y);
    int north = y - 2, south = y + 2,  east = x + 2, west = x - 2;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}
void search() {
    for(int r = 0; r < 10; r++) {
        for(int c = 0; c < 10; c++) {
            if(board[r][c] > _max) _max = board[r][c];
            if(board[r][c] == 0) empty++;
        }
    }
}

int main(void) {
    int x, y, size;
    initialize();
    while(scanf("%d,%d,%d", &x, &y, &size) != EOF) {
        switch(size) {
            case 1: small(x, y); break;
            case 2: mid(x, y);   break;
            default:large(x, y); break;
        }
    }
    search();
    cout << empty << endl << _max << endl;
    return(0);
}

C++: #include <cstdio>
#define MAX 10

using namespace std;

int map[MAX][MAX] = {0};

const int def1[4][2] = {
  {1, 0},
  {-1, 0},
  {0, 1},
  {0, -1}
};

const int def2[8][2] = {
  {1, 0}, {-1, 0},
  {0, 1}, {0, -1},
  {1, 1}, {1, -1},
  {-1, 1}, {-1, -1}
};

const int def3[12][2] = {
  {1, 0}, {2, 0}, {-1, 0},
  {-2, 0}, {1, 1}, {0, 1},
  {-1, 1}, {1, -1}, {0, -1},
  {-1, -1}, {0, 2}, {0, -2}
};

void dodrop(int px, int py, const int d[][2], int size) {
  int x, y, i;
  for (i = 0; i < size; i++) {
    x = px + d[i][0];
    y = py + d[i][1];
    if (x < MAX && x >= 0 && y < MAX && y >= 0)
      map[x][y] += 1;
  }
  return;
}

void drop(int *p, int size) {
  if (size == 1)
    dodrop(p[0], p[1], def1, 4);
  if (size == 2)
    dodrop(p[0], p[1], def2, 8);
  if (size == 3)
    dodrop(p[0], p[1], def3, 12);
  return;
}

int main() {
  int p[2], size, sum, max;
  char c1, c2;
  while (scanf("%d,%d,%d", &p[0], &p[1], &size) != EOF) {
    drop(p, size);
    for (int i = sum = max = 0; i < MAX; i++) {
      for (int j = 0; j < MAX; j++) {
        if (map[i][j] == 0) sum++;
        if (map[i][j] > max) max = map[i][j];
      }
    }
  }
  printf("%d\n%d\n", sum, max);
  return 0;
}