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<iostream>
using namespace std;
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
int main(){
	int map[11][11]={0};
	char c;
	int a,b,s;
	while(cin>>a>>c>>b>>c>>s){
		switch(s){
			case 3:
				map[a][b+2]++;
				map[a][b-2]++;
				map[a+2][b]++;
				map[a-2][b]++;
			case 2:
				map[a+1][b+1]++;
				map[a+1][b-1]++;
				map[a-1][b+1]++;
				map[a-1][b-1]++;
			case 1:
				map[a][b]++;
				map[a][b+1]++;
				map[a][b-1]++;
				map[a+1][b]++;
				map[a-1][b]++;
		}
	}
	
	int max=0;
	int count=0;
	rep(i,10){
		rep(j,10){
			if(max<map[i][j])max=map[i][j];
			if(0==map[i][j])count++;
		}
	}
	cout<<count<<endl;
	cout<<max<<endl;
	
}

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

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

int const MOD = 1000000007;
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int dx[8] = {1, 0, -1, 0, 1, -1, 1, -1};

int main() {
    int a[10][10];
    memset(a, 0, sizeof(a));
    int x,y,s;
    while(~scanf("%d,%d,%d", &x, &y, &s)) {
        if(s == 1) {
            if(x + 1 <= 9) a[x + 1][y]++;
            if(x - 1 >= 0) a[x - 1][y]++;
            if(y + 1 <= 9) a[x][y + 1]++;
            if(y - 1 >= 0) a[x][y - 1]++;
        }
        else if(s == 2) {
            rep(i,0,8) {
                if(x + dx[i] < 0) continue;
                else if(x + dx[i] > 9) continue;
                else if(y + dy[i] < 0) continue;
                else if(y + dy[i] > 9) continue;
                else a[x + dx[i]][y + dy[i]]++;
            }
        }
        else {
            rep(i,0,8) {
                if(x + dx[i] < 0) continue;
                else if(x + dx[i] > 9) continue;
                else if(y + dy[i] < 0) continue;
                else if(y + dy[i] > 9) continue;
                else a[x + dx[i]][y + dy[i]]++;
            }
            if(x + 2 <= 9) a[x + 2][y]++;
            if(x - 2 >= 0) a[x - 2][y]++;
            if(y + 2 <= 9) a[x][y + 2]++;
            if(y - 2 >= 0) a[x][y - 2]++;
        }
    }

    int m_point = 0;
    int max_num = 0;
    rep(i,0,10) rep(j,0,10) {
        if(a[i][j] == 0) m_point++;
        max_num = max(max_num, a[i][j]);
    }
    cout << m_point << endl;
    cout << max_num << endl;

    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

vector< vector<int> > v[3] = {
	{
		{0,1,0},
		{1,1,1},
		{0,1,0},
	},
	{
		{1,1,1},
		{1,1,1},
		{1,1,1},
	},
	{
		{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() {
//	std::ios::sync_with_stdio(false);
//	std::cin.tie(0);
	int x, y, sz;
	const int W = 10, H = 10;
	vector< vector<int> > m(H, vector<int>(W, 0));
	while ( scanf("%d,%d,%d", &x, &y, &sz) != EOF ) {
		--sz;
		x -= v[sz].size()/2;
		y -= v[sz].size()/2;
		REP(dy, v[sz].size()) {
			REP(dx, v[sz][dy].size()) {
				int nx = x + dx, ny = y + dy;
				if (nx < 0 || nx >= W || ny < 0 || ny >= H) continue;
				m[ny][nx] += v[sz][dy][dx];
			}
		}
	}
//	cout << m << endl;
	int ans = 0, cnt = 0;
	REP(i, H) REP(j, W) {
		if (m[i][j] == 0) ++cnt;
		ans = max(ans, m[i][j]);
	}
	cout << cnt << endl;
	cout << ans << endl;
}