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\n", count, max)
}

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

using namespace std;

short inkmap[10][10] = { 0 };

void drawSmall(int, int);
void drawMedium(int, int);
void drawLarge(int, int);
void sch(short *, short *);

int main(void) {
	short mx = 0, buff[3], c = 0;
	
	while( scanf("%d,%d,%d", &buff[0], &buff[1], &buff[2]) != EOF ) {
		switch(buff[2]) {
		case 1:
			drawSmall(buff[0], buff[1]);		break;
		case 2:
			drawMedium(buff[0], buff[1]);		break;
		case 3:
			drawLarge(buff[0], buff[1]);		break;
		}
	}
	sch(&c, &mx);
	cout << c << endl << mx << endl;
}

void drawSmall(int x, int y) {
	const short vX[5] = { 0, -1, 0, 1, 0 };
	const short vY[5] = { -1, 0, 0, 0, 1 };
	for(int i = 0; i < 5; i++) {
		inkmap[x + vX[i]][y + vY[i]]++;
	}
}
void drawMedium(int x, int y) {
	const short vX[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1 };
	const short vY[9] = { -1, -1, -1, 0, 0, 0, 1, 1, 1 };
	for(int i = 0; i < 9; i++) {
		inkmap[x + vX[i]][y + vY[i]]++;
	}
}
void drawLarge(int x, int y) {
	const short vX[13] = { 0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0 };
	const short vY[13] = { -2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2 };
	for(int i = 0; i < 13; i++) {
		inkmap[x + vX[i]][y + vY[i]]++;
	}
}
void sch(short *c, short *m) {
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			if(inkmap[i][j] == 0) {
				(*c)++;
			}
			else {
				*m = max(*m, inkmap[i][j]);
			}
		}
	}
}

C++: #include <iostream>
using namespace std;
int small[3][3] = {{0,1,0},{1,1,1},{0,1,0}};
int medium[3][3] ={{1,1,1},{1,1,1},{1,1,1}};
int big [5][5] = {{0,0,1,0,0},{0,1,1,1,0},{1,1,1,1,1},{0,1,1,1,0},{0,0,1,0,0}};

int main(){
    int paper[10][10] = {0};
    int x, y, size;
    int pivot_x, pivot_y;
    while(~scanf("%d,%d,%d", &x, &y, &size)){
        if(size == 1 || size == 2){
            pivot_x = x-1;
            pivot_y = y-1;
            for(int i=0; i<3; i++){
                for(int j=0; j<3; j++){
                    if((pivot_x+j >= 0)&&(pivot_x+j <= 9)&&(pivot_y+i >= 0)&&(pivot_y+i <= 9)){
                        if(size == 1){
                            paper[pivot_y+i][pivot_x+j] += small[j][i];
                        }else{
                            paper[pivot_y+i][pivot_x+j] += medium[j][i];
                        }
                    }
                }
            }
        }else{
            pivot_x = x-2;
            pivot_y = y-2;
            for(int i=0; i<5; i++){
                for(int j=0; j<5; j++){
                    if((pivot_x+j >= 0)&&(pivot_x+j <= 9)&&(pivot_y+i >= 0)&&(pivot_y+i <= 9)){
                        paper[pivot_y+i][pivot_x+j] += big[j][i];
                    }
                }
            }

        }
    }
    int max = 0;
    int cnt = 0;
    for(int i=0; i<10; i++){
        for(int j=0; j<10; j++){
            if(max < paper[i][j]){
                max = paper[i][j];
            }
            if(paper[i][j] == 0){
                cnt++;
            }
        }
    }

    cout << cnt << endl;
    cout << max << endl;
    return 0;
}

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

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int field[15][15];
int dx[12] = {-1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
int dy[12] = {0, -1, 0, 1, -1, 1, -1, 1, 0, -2, 0, 2};

void wfs(int y, int x, int size) {
  int n;
  if(size == 1) n = 4;
  else if(size == 2) n = 8;
  else n = 12;

  field[y][x]++;
  REP(i, n) {
    int nx = x+dx[i], ny = y+dy[i];
    if(nx < 0 || 9 < nx || ny < 0 || 9 < ny) continue;
    field[ny][nx]++;
  }
}

int main() {
  int x, y, size;
  char c1, c2;
  
 memset(field, 0, sizeof(field));
  while(cin >> x >> c1 >> y >> c2 >> size) {
    wfs(x, y, size);
  }  
    
  int max = 0;
  int cnt = 0;
  REP(i, 10) {
    REP(j, 10) {
      if(field[i][j] > max) max = field[i][j];
      if(field[i][j] == 0) cnt++;
    } 
  }  
  cout << cnt << endl;
  cout << max << endl;
}

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


#define SIZE 10

using namespace std;

int format[3][12][2] = { { { 0,1 },{ 1,0 },{ 0,-1 },{ -1,0 } },
						 { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 } },
						 { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 },{ 0,2 },{ 2,0 },{ 0,-2 },{ -2,0 } } };

int main() {
	int dx, dy, x, y, s, count, most, map[SIZE][SIZE], num[3] = { 4,9,12 };

	count = 100;
	most = 0;
	while (scanf("%d,%d,%d", &x, &y, &s)) {
		x--;
		y--;
		s--;

		for (int i = 0; i < num[s]; i++) {
			dx = x + format[s][i][0];
			dy = y + format[s][i][1];

			if (dx < 0 || dx >= SIZE || dy < 0 || dy >= SIZE) {
				continue;
			}

			map[dx][dy]++;
			if (map[dx][dy] == 1) {
				count--;
			}

			if (map[dx][dy] > most) {
				most = map[dx][dy];
			}
		}
	}

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