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++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  int x, y, s;
  char gomi;
  vvi t(10, vi(10));
  while (cin >> x >> gomi >> y >> gomi >> s) {
    t[x][y]++;
    switch (s) {
      case 3:
        if (x > 1) t[x - 2][y]++;
        if (x < 8) t[x + 2][y]++;
        if (y > 1) t[x][y - 2]++;
        if (y < 8) t[x][y + 2]++;
      case 2:
        if (x > 0 && y > 0) t[x - 1][y - 1]++;
        if (x > 0 && y < 9) t[x - 1][y + 1]++;
        if (x < 9 && y > 0) t[x + 1][y - 1]++;
        if (x < 9 && y < 9) t[x + 1][y + 1]++;
      case 1:
        if (x > 0) t[x - 1][y]++;
        if (x < 9) t[x + 1][y]++;
        if (y > 0) t[x][y - 1]++;
        if (y < 9) t[x][y + 1]++;
    }
  }
  int c = 0, maxi = 0;
  rep(i, 10) rep(j, 10) {
    c += !t[i][j];
    cmax(maxi, t[i][j]);
  }
  cout << c << endl
       << maxi << endl;
}

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 <iostream>
using namespace std;

int main(){
	int kosuu = 0, kosa = 0;
	int x, y, sizuku;
	int masu[20][20];
	char trash1, trash2;
	for(int i = 0; i < 20; i++){
		for(int j = 0; j < 20; j++){
			masu[i][j] = 0;
		}
	}
	while(cin >> x >> trash1 >> y >> trash2 >> sizuku){
		if(sizuku == 1){
			masu[x+4][y+5]++;
			for(int i = 0; i < 3; i++){
				masu[x+5][y+4+i]++;
			}
			masu[x+6][y+5]++;
		}
		else if(sizuku == 2){
			for(int i = 0; i < 3; i++){
				for(int j = 0; j < 3; j++){
					masu[x+4+i][y+4+j]++;
				}
			}
		}
		else{
			masu[x+3][y+5]++;
			masu[x+7][y+5]++;
			for(int i = 0; i < 3; i++){
				masu[x+4][y+4+i]++;
				masu[x+6][y+4+i]++;
			}
			for(int i = 0; i < 5; i++){
				masu[x+5][y+3+i]++;
			}
		}
	}
	for(int i = 5; i < 15; i++){
		for(int j = 5; j < 15; j++){
			if(kosa < masu[i][j]){
				kosa = masu[i][j];
			}
			if(masu[i][j] == 0){
				kosuu++;
			}
		}
	}
	cout << kosuu << endl << kosa << endl;
}

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

int main(){
  int x,y,size;
  int canvas[10][10];
  int empty_num, max_val;
  int i, j;

  for(i=0; i<10; i++)
    for(j=0; j<10; j++) canvas[i][j]=0;
  while(cin>>x){
    cin>>y; cin>>size;

    for(i=-1; i<=1; i+=2)
      if(x+i>=0 && x+i<10) canvas[x+i][y]++;
    for(i=-1; i<=1; i+=2)
      if(y+i>=0 && y+i<10) canvas[x][y+i]++;
    if(size>1){
      for(i=-1; i<=1; i+=2){
        for(j=-1; j<=1; j+=2)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }
    if(size>2){
      for(i=-2; i<=2; i+=4){
        for(j=-2; j<=2; j+=4)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }

    empty_num=0; max_val=0;
    for(i=0; i<10; i++){
      for(j=0; j<10; j++){
        if(canvas[i][j]>max_val) max_val=canvas[i][j];
        else if(canvas[i][j]==0) empty_num++;
      }
    }

    printf("%d\n%d\n", empty_num, max_val);
  }
  return 0;
}