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>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int in[14][14]={0};
	char d;
	int a,b,c;
	while(cin>>b>>d>>a>>d>>c){
		a+=2;b+=2;
		if(c==2)
			loop(i,-1,2)loop(j,-1,2)in[a+i][b+j]++;
		else if(c==1){
			loop(i,-1,2)loop(j,-1,2)if(i*j==0)in[a+i][b+j]++;
		}else{
			loop(i,-2,3)loop(j,-2,3)if(i*j==0||(abs(i)!=2&&abs(j)!=2))in[a+i][b+j]++;
		}
	}
	int co=0,ma=0;
	loop(i,2,12)loop(j,2,12){
		if(!in[i][j])co++;
		ma=max(ma,in[i][j]);
	}
	cout<<co<<endl;
	cout<<ma<<endl;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
	int field[30][30];
	for(int i=0; i<30; i++){
		for(int l=0; l<30; l++){
			field[i][l] = 0;
		}
	}
	for(;;){
		int x,y,size;
		if(scanf("%d,%d,%d",&x,&y,&size) == EOF){break;}
		field[x+10][y+10]++;
		field[x+10][y+9]++;
		field[x+9][y+10]++;
		field[x+10][y+11]++;
		field[x+11][y+10]++;
		if(size>1){
			field[x+9][y+9]++;
			field[x+9][y+11]++;
			field[x+11][y+9]++;
			field[x+11][y+11]++;
		}
		if(size>2){
			field[x+10][y+8]++;
			field[x+10][y+12]++;
			field[x+12][y+10]++;
			field[x+8][y+10]++;
		}
	}
	int max = 0, white = 0;
	for(int i=10; i<20; i++){
		for(int l=10; l<20; l++){
			if(field[i][l] == 0){white++;}
			if(max<field[i][l]){max = field[i][l];}
		}
	}
	cout <<white<<endl<<max<<endl;
}

C++: #include<stdio.h>
 
int table[14][14];
 
int main(){
    int a,b,c;
    while(~scanf("%d,%d,%d",&a,&b,&c)){
        a+=2;
        b+=2;
        switch(c){
            case 3:
                table[a-2][b]++;
                table[a+2][b]++;
                table[a][b-2]++;
                table[a][b+2]++;
            case 2:
                table[a+1][b+1]++;
                table[a-1][b-1]++;
                table[a+1][b-1]++;
                table[a-1][b+1]++;
            case 1:
                table[a][b+1]++;
                table[a][b-1]++;
                table[a-1][b]++;
                table[a+1][b]++;
                table[a][b]++;
        }
    }
    int max=0;
    int ans=0;
    for(int i=2;i<12;i++){
        for(int j=2;j<12;j++){
            if(table[i][j]>0)ans++;
            if(table[i][j]>max)max=table[i][j];
        }
    }
    printf("%d\n%d\n",100-ans,max);
}

C++: #include <iostream>
#include<algorithm>
using namespace std;
int map[11][11];
int dx[] = { 0, 0, 0, 1, -1, 1, 1, -1, -1, 0, 0, 2, -2 };
int dy[] = { 0, 1, -1, 0, 0, -1, 1, 1, -1, 2, -2, 0, 0 };
int ans;
int total;
void map_make(int x, int y, int size){
	for (int i = 0; i < size * 4 + 1; i++){
		int xx = x + dx[i];
		int yy = y + dy[i];
		if (xx < 0 || xx >= 10 || yy < 0 || yy >= 10) continue;
		map[yy][xx]++;
		ans = max(ans, map[yy][xx]);
		if (map[yy][xx] == 1)total--;
	}
}
int main(){
	int x, y, size;
	char c;
	total = 10 * 10;
	while (cin >> x >> c >> y >> c >> size){
		map_make(x, y, size);
	}
	cout << total << endl;
	cout << ans << endl;
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
void sink(vector<vector<int>> &v, int x, int y, int size) {
	v[x][y]++;
	if (x + 1 < 10)v[x + 1][y]++;
	if (0 <= x - 1)v[x - 1][y]++;
	if (y + 1 < 10)v[x][y + 1]++;
	if (0 <= y - 1)v[x][y - 1]++;

	if (size >= 2) {
		if (x + 1 < 10) {
			if (y + 1 < 10)v[x + 1][y + 1]++;
			if (y - 1 >= 0)v[x + 1][y - 1]++;
		}
		if (x - 1 >= 0) {
			if (y + 1 < 10)v[x - 1][y + 1]++;
			if (y - 1 >= 0)v[x - 1][y - 1]++;
		}
	}

	if (size >= 3) {
		if (x + 2 < 10)v[x + 2][y]++;
		if (x - 2 >= 0)v[x - 2][y]++;
		if (y + 2 < 10)v[x][y + 2]++;
		if (y - 2 >= 0)v[x][y - 2]++;
	}
}
signed main() {
	char c; int x, y, s;
	vector<vector<int>>v(10, vector<int>(10, 0));
	while (cin >> x >> c >> y >> c >> s) {
		sink(v, x, y, s);
	}
	int cnt(0);
	int m(0);
	rep(i, 0, 10) {
		rep(j, 0, 10) {
			m = max(m, v[i][j]);
			if (v[i][j] == 0)cnt++;
		}
	}
	cout << cnt << endl << m << endl;
	return 0;
}