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 <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) != EOF)
	{
		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;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;

int paper[10][10];

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

void dropMedium(int x, int y)
{
	for (int dy = -1; dy <= 1; ++dy)
	{
		for (int dx = -1; dx <= 1; ++dx)
		{
			int xx = x+dx;
			int yy = x+dy;
			if (range(xx, yy))
				++paper[yy][xx];
		}
	}
}
void dropSmall(int x, int y, int d = 1)
{
	int dx[] = { 0, 1, 0, -1 };
	int dy[] = { 1, 0, -1, 0 };
	for (int i = 0; i < 4; ++i)
	{
		int xx = x+d*dx[i];
		int yy = y+d*dy[i];
		if (range(xx, yy))
			++paper[yy][xx];
	}
}
void dropLarge(int x, int y)
{
	dropSmall(x, y, 2);
	dropMedium(x, y);
}


int main()
{
	int x, y, s;
	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		switch (s)
		{
			case 1: dropSmall(x, y); break;
			case 2: dropMedium(x, y); break;
			case 3: dropLarge(x, y); break;
		}
	}
	int empties = 0;
	int m = 0;
	for (int y = 0; y < 10; ++y)
	{
		for (int x = 0; x < 10; ++x)
		{
			if (!paper[y][x])
				++empties;
			else if (paper[y][x] > m)
				m = paper[y][x];
		}
	}
	printf("%d\n%d\n", empties, m);

	return 0;
}

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

using namespace std;

int sx[] = { 0, 0, 1, 0, -1 };
int sy[] = { 0, -1, 0, 1, 0 };
int mx[] = { 0, -1, 0, 1, 1, 1, 0, -1, -1 };
int my[] = { 0, -1, -1, -1, 0, 1, 1, 1, 0 };
int lx[] = { 0, -1, 0, 1, 1, 1, 0, -1, -1, 0, 2, 0, -2 };
int ly[] = { 0, -1, -1, -1, 0, 1, 1, 1, 0, -2, 0, 2, 0 };

int main() {
    int paper[10][10] = { 0 };
    int x, y, s, nx, ny;
    while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
        if (s == 1) {
            for (int i = 0; i < 5; i++) {
                nx = x + sx[i];
                ny = y + sy[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
        else if (s == 2) {
            for (int i = 0; i < 9; i++) {
                nx = x + mx[i];
                ny = y + my[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
        else {
            for (int i = 0; i < 13; i++) {
                nx = x + lx[i];
                ny = y + ly[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
    }
    
    int none = 0, maxc = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (paper[i][j] == 0) {
                none++;
            }
            maxc = max(maxc, paper[i][j]);
        }
    }
    cout << none << endl << maxc << endl;
    
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
using namespace std;

int main(){
	int paper[14][14] = {};
	int x,y,s;
	char s1,s2;
	while(cin >> x >> s1 >> y >> s2 >> s){
		x += 2;
		y += 2;
		if(s == 1){
			paper[x][y - 1]++;
			paper[x - 1][y]++;
			paper[x][y]++;
			paper[x + 1][y]++;
			paper[x][y + 1]++;
		}else if(s == 2){
			for(int i = - 1; i <= 1; i++){
				for(int j = - 1; j <= 1; j++){
					paper[x + i][y + j]++;
				}
			}
		}else if(s == 3){
			for(int i = - 1; i <= 1; i++){
				for(int j = - 1; j <= 1; j++){
					paper[x + i][y + j]++;
				}
			}
			paper[x][y - 2]++;
			paper[x - 2][y]++;
			paper[x + 2][y]++;
			paper[x][y + 2]++;
		}
	}
	int white = 0, max = 0;
	for(int i = 2; i < 12; i++){
		for(int j = 2; j < 12; j++){
			if(paper[i][j] == 0){
				white++;
			}
			if(paper[i][j] > max){
				max = paper[i][j];
			}
		}
	}
	cout << white << endl << max << endl;
}