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 <string>
#include <cctype>
#include <vector>
#include <complex>
#include <cstdio>
using namespace std;

#define loop(i,a,b) for(int i=(a); i<int(b); i++)
#define rep(i,b) loop(i,0,b)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef complex<double> vec;

double cross(const vec& a, const vec& b) {
    return imag(conj(a)*b);
}

int dx1[] = {1,0,0,-1}; // tateyoko
int dy1[] = {0,1,-1,0};
int dx2[] = {1,1,-1,-1}; // naname
int dy2[] = {-1,1,-1,1};
inline bool in(int x, int y){
    return 0<=x && 0<=y && x<10 && y<10;
}

int main(){
    vvi g(10,vi(10));
    int x,y,s;
    while(scanf("%d,%d,%d", &x,&y,&s)!=EOF){
        g[y][x]++;
        if(s==3){
            rep(d,4){
                for(int t=1; t<=2; t++){
                    int px=x+dx1[d]*t;
                    int py=y+dy1[d]*t;
                    if(in(px,py)) g[py][px]++;
                }
                int px=x+dx2[d];
                int py=y+dy2[d];
                if(in(px,py)) g[py][px]++;
            }
        }else if(s==2){
            rep(d,4){
                int px=x+dx1[d];
                int py=y+dy1[d];
                if(in(px,py)) g[py][px]++;
                px=x+dx2[d];
                py=y+dy2[d];
                if(in(px,py)) g[py][px]++;

            }
        }else if(s==1){
            rep(d,4){
                for(int t=1; t<=1; t++){
                    int px=x+dx1[d]*t;
                    int py=y+dy1[d]*t;
                    if(in(px,py)) g[py][px]++;
                }
            }
        }
    }
    int z=0;
    int ans=-1;
    rep(i,10)rep(j,10){
        if(g[i][j]==0)z++;
        ans=max(ans,g[i][j]);
    }
    cout << z << "\n" << ans << endl;
}

C++: #include<iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int paper[14][14];
int white=0,mdro=0;
int main(){int a,c,e;char b,d;
while(cin>>a>>b>>c>>d>>e){
	if(e==3){
    paper[a][c+2]++;
	paper[a+1][c+1]++;
	paper[a+1][c+2]++;
	paper[a+1][c+3]++;
	paper[a+2][c]++;
	paper[a+2][c+1]++;
	paper[a+2][c+2]++;
	paper[a+2][c+3]++;
	paper[a+2][c+4]++;
	paper[a+3][c+1]++;
	paper[a+3][c+2]++;
	paper[a+3][c+3]++;
	paper[a+4][c+2]++;}else
	if(e==2){
	paper[a+1][c+1]++;
	paper[a+1][c+2]++;
	paper[a+1][c+3]++;
	paper[a+2][c+1]++;
	paper[a+2][c+2]++;
	paper[a+2][c+3]++;
	paper[a+3][c+1]++;
	paper[a+3][c+2]++;
	paper[a+3][c+3]++;}else{
	paper[a+1][c+2]++;
	paper[a+2][c+1]++;
	paper[a+2][c+2]++;
	paper[a+2][c+3]++;
	paper[a+3][c+2]++;}}
for(int i=0;i<10;i++){
for(int ii=0;ii<10;ii++){
	if(paper[i+2][ii+2]==0){
	white++;}else
		if(paper[i+2][ii+2]>mdro){mdro=paper[i+2][ii+2];}}}
cout<<white<<endl<<mdro<<endl;
	return 0;}

C++: #include<iostream>
#include<string>
int mem[14][14] = {}, i = 0, X[50], Y[50], S[50];
int main() {
	int x;
	char b;
	while (1) {
		int y, s;
		std::cin >>x>> b >> y >> b >> s;
		Y[i] = y, S[i] = s;
		X[i] = x;
		if (s == 0)
			break;
		i += 1;
	}
	for(int a=0;a<i;a+=1)
	if (S[a] == 1) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
	}
	else if (S[a] == 2) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
		mem[X[a] + 1][Y[a] + 1] += 1;
		mem[X[a] + 1][Y[a] + 3] += 1;
		mem[X[a] + 3][Y[a] + 1] += 1;
		mem[X[a] + 3][Y[a] + 3] += 1;
	}
	else if (S[a] == 3) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
		mem[X[a] + 1][Y[a] + 1] += 1;
		mem[X[a] + 1][Y[a] + 3] += 1;
		mem[X[a] + 3][Y[a] + 1] += 1;
		mem[X[a] + 3][Y[a] + 3] += 1;
		mem[X[a]][Y[a] + 2] += 1;
		mem[X[a] + 4][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 4] += 1;
		mem[X[a] + 2][Y[a]] += 1;
	}
	int flag = 0, max = 0;
	for (int i = 0; i < 10; i += 1)
		for (int j = 0; j < 10; j += 1) {
			if (0 == mem[i + 2][j + 2])
				flag += 1;
			if (max < mem[i + 2][j + 2])
				max = mem[i + 2][j + 2];
		}
	std::cout << flag+1 << std::endl;
	std::cout << max << std::endl;
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <functional>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
#define scanf scanf_s

int i, j, s;
int p[15][15];

void nuri(int i, int j)
{
	if (i >= 0 && i < 10 && j >= 0 && j < 10) p[i][j]++;
}

void shou(int i, int j)
{
	nuri(i, j);
	nuri(i - 1, j);
	nuri(i, j - 1);
	nuri(i, j + 1);
	nuri(i + 1, j);
}

void chu(int i, int j)
{
	shou(i, j);
	nuri(i - 1, j - 1);
	nuri(i - 1, j + 1);
	nuri(i + 1, j - 1);
	nuri(i + 1, j + 1);
}

void dai(int i, int j)
{
	chu(i, j);
	nuri(i - 2, j);
	nuri(i, j - 2);
	nuri(i, j + 2);
	nuri(i + 2, j);
}

int main()
{
	REP(i, 15)REP(j, 15) p[i][j] = 0;
	while (scanf("%d,%d,%d", &i, &j, &s))
	{
		if (s == 1) shou(i, j);
		if (s == 2) chu(i, j);
		if (s == 3) dai(i, j);
	}
	int cnt = 0; int mx = 0;
	REP(i, 10)REP(j, 10)
	{
		if (p[i][j] == 0) cnt++;
		mx = max(p[i][j], mx);
	}
	cout << cnt << endl << mx << endl;
	return 0;
}