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 <stdio.h>

int main(){
	int map[10][10],ink,x,y,max=0,count=0;
	int dx[] = { 0, 0,-1, 1,-1,-1, 1, 1, 0, 0,-2, 2};
	int dy[] = {-1, 1, 0, 0,-1, 1,-1, 1,-2, 2, 0, 0};

	for(int i=0 ; i<10 ; i++){
		for(int j=0 ; j<10 ; j++){
			map[i][j] = 0;
		}
	}
	while( scanf("%d,%d,%d", &x, &y, &ink) != EOF ){
		map[y][x]++;
		for(int i=0 ; i<ink*4 ; i++){
			int mx = x + dx[i];
			int my = y + dy[i];
			if(mx>=0 && mx<10 && my>=0 && my<10){
				map[my][mx]++;
			}
		}
	}
	for(int y=0 ; y<10 ; y++){
		for(int x=0 ; x<10 ; x++){
			if(map[y][x]==0){
				count++;
			}
			if(map[y][x]>max){
				max = map[y][x];
			}
		}
	}
	printf("%d\n%d\n", count , max);
}

C++: #include <iostream>

using namespace std;

inline bool valid(int y, int x) {
    return (0 <= y && y < 10 && 0 <= x && x < 10);
}

int main() {
	int paper[10][10] = {};
	int x, y, siz;
	char c;
	while (cin >> x >> c >> y >> c >> siz) {
		switch (siz) {
			case 3:
				if (valid(y-2, x)) paper[y-2][x] ++;
				if (valid(y, x-2)) paper[y][x-2] ++;
				if (valid(y, x+2)) paper[y][x+2] ++;
				if (valid(y+2, x)) paper[y+2][x] ++;
			case 2:
				if (valid(y-1, x-1)) paper[y-1][x-1] ++;
				if (valid(y-1, x+1)) paper[y-1][x+1] ++;
				if (valid(y+1, x-1)) paper[y+1][x-1] ++;
				if (valid(y+1, x+1)) paper[y+1][x+1] ++;
			case 1:
				if (valid(y-1, x)) paper[y-1][x] ++;
				if (valid(y, x-1)) paper[y][x-1] ++;
				if (valid(y,   x))   paper[y][x] ++;
				if (valid(y, x+1)) paper[y][x+1] ++;
				if (valid(y+1, x)) paper[y+1][x] ++;
		}
	}
	int empty = 0, mx = 0;
	for (int i=0; i<10; ++i) {
		for (int j=0; j<10; ++j) {
			empty += !paper[i][j];
			mx = max(mx, paper[i][j]);
		}
	}
	cout << empty << endl;
	cout << mx << endl;

	return 0;
}

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

int main(){
	
	int mp[10][10]={0};
	int dx[13]={0,0,1,0,-1,1,1,-1,-1,0,2,0,-2};
	int dy[13]={0,1,0,-1,0,1,-1,-1,1,2,0,-2,0};
	int x,y,s;
	int ans1=100,ans2=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		s=s*4+1;
		for(int i=0;i<s;i++){
			int X=x+dx[i];
			int Y=y+dy[i];
			if(0<=X && X<=9 && 0<=Y && Y<=9){
				if(mp[X][Y]==0)ans1--;
				mp[X][Y]++;
				ans2=max(ans2,mp[X][Y]);
			}
		}
	}
	cout<<ans1<<endl;
	cout<<ans2<<endl;
	
	return 0;
}

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

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 };
int map[10][10];

inline bool out_of_range(int x, int y) {
	if (x<0||x>9||y<0||y>9) return false;
	return true;
}

inline void drop(int x, int y, int s) {
	for (int i=0; i<4*s; i++)
		if (out_of_range(x+dx[i], y+dy[i]))
			map[y+dy[i]][x+dx[i]]++;
}

int main() {
	memset(map, 0, sizeof(map));
	int x, y, s;
	char c;
	while (cin >> x >> c >> y >> c >> s) {
		drop(x, y, s);
	}

	int cnt=0,dep=0;
	for (int i=0; i<10; i++)
	for (int j=0; j<10; j++) {
		if (map[j][i]==0) cnt++;
		if (map[j][i] > dep) dep=map[j][i];
	}
	cout << cnt << endl << dep << endl;
	return 0;
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  if (v.size() == 0) {
    os << "(empty)";
    return os;
  }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

int dx[] = { -1, 0, 1, 0 };
int dy[] = {  0, -1, 0, 1 };

int d(int x0, int y0,
      int x, int y) {
  int dx = abs(x - x0);
  int dy = abs(y - y0);
  if (dx + dy == 0) return 0;
  if (dx + dy == 1) return 1;
  if (max(dx, dy) == 1) return 2;
  if (dx + dy == 2) return 3;
  else return 100;
}

int main() {

  const int N = 10 + 2 + 2;
  int f[N][N];
  rep (i, N) rep (j, N) f[i][j] = 0;

  char comma;
  loop {
    int x, y, s;
    cin >> x >> comma >> y >> comma >> s;
    if (!cin) break;

    for (int xx = x - 2; xx < x + 3; ++xx) {
      for (int yy = y -  2; yy < y + 3; ++yy) {
        if (d(x,y,xx,yy) <= s) f[xx+2][yy+2]++;
      }
    }
  }

  int cx = 0,
      ac = -INF;
  for (int x = 2; x < N - 2; ++x) {
    for (int y = 2; y < N - 2; ++y) {
      if (!f[x][y]) ++cx;
      ac = max(ac, f[x][y]);
    }
  }

  cout << cx << endl;
  cout << ac << endl;


  return 0;
}