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 <cstring>

using namespace std;

int small_x[4] = {-1,  0, 0, 1};
int small_y[4] = { 0, -1, 1, 0};

int medium_x[8] = {-1, -1, -1,  0, 0,  1, 1, 1};
int medium_y[8] = {-1,  0,  1, -1, 1, -1, 0, 1};

int large_x[12] = {-2, -1, -1, -1,  0,  0, 0, 0,  1, 1, 1, 2};
int large_y[12] = { 0, -1,  0,  1, -2, -1, 1, 2, -1, 0, 1, 0};

void solve()
{
	int Field[14][14];
	memset(Field, 0, sizeof(Field));
	int a, b, c;
	while(scanf("%d,%d,%d", &a, &b, &c))
	{
		++Field[b + 2][a + 2];
		if(c == 1)
		{
			for(int i = 0; i < 4; ++i)
			{
				++Field[b + 2 + small_y[i]][a + 2 + small_x[i]];
			}
		}
		else if(c == 2)
		{
			for(int i = 0; i < 8; ++i)
			{
				++Field[b + 2 + medium_y[i]][a + 2 + medium_x[i]];
			}
		}
		else if(c == 3)
		{
			for(int i = 0; i < 12; ++i)
			{
				++Field[b + 2 + large_y[i]][a + 2 + large_x[i]];
			}
		}
	}
	int count = 0;
	int Max = 0;
	for(int i = 2; i < 12; ++i)
	{
		for(int j = 2; j < 12; ++j)
		{
			if(Field[i][j] == 0)
			{
				++count;
			}
			if(Max < Field[i][j])
			{
				Max = Field[i][j];
			}
		}
	}
	cout << count << endl;
	cout << Max << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include "bits/stdc++.h"

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

using namespace std;

using LL = long long int;
using LD = long double;

using pii = pair<int, int>;
using pll = pair<LL, LL>;
using pdd = pair<double, double>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vl = vector<LL>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;

const int INF = (1 << 30) - 1;
const LL INF64 = ((LL)1 << 62) - 1;
const double PI = 3.1415926535897932384626433832795;

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

int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
LL gcd(LL x, LL y) { return y ? gcd(y, x % y) : x; }

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	vvi m(14, vi(14));

	char chA, chB;
	int x, y, s;
	while (cin >> x >> chA >> y >> chB >> s){
		y += 2;
		x += 2;

		m[y + 1][x]++;
		m[y - 1][x]++;
		m[y][x + 1]++;
		m[y][x - 1]++;

		if (s == 1) {
			continue;
		}

		m[y + 1][x + 1]++;
		m[y + 1][x - 1]++;
		m[y - 1][x + 1]++;
		m[y - 1][x - 1]++;

		if (s == 2) {
			continue;
		}

		m[y + 2][x]++;
		m[y - 2][x]++;
		m[y][x + 2]++;
		m[y][x - 2]++;
	}

	int noInkGrid = 0;
	int maxInc = 0;
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (m[i][j] == 0) {
				noInkGrid++;
			}
			maxInc = max(maxInc, m[i][j]);
		}
	}

	cout << noInkGrid << endl;
	cout << maxInc << endl;
	return 0;
}

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

int parse(string a) {
	int s = 0;
	for (int b = 0; b < a.length(); b++) {
		s *= 10;
		s += a[b] - 48;
	}
	return s;
}
vector<int>split(string a) {
	vector<int>s;
	string b = "";
	for (int c = 0; c < a.length(); c++) {
		if (a[c] == ',') { s.push_back(parse(b)); b = ""; }
		else b += a[c];
	}
	s.push_back(parse(b));
	return s;
}
int main() {
	vector<vector<int>>masu(10,vector<int>(10));
	int xp[4]{ 1,-1,1,-1 };
	int yp[4]{ 1,1,-1,-1 };
	int xq[12]{ -2,-1,-1,-1,0,0,0,0,1,1,1,2 };
	int yq[12]{ 0,-1,0,1,-2,-1,1,2,-1,0,1,0 };
	string a;
	while (cin >> a) {
		vector<int>b;
		b = split(a);
		if (b[2] == 1){
			for (int l = 0; l < 4; l++) {
				if (b[0] + xp[l] < 10 && b[0] + xp[l]>0 && b[1] + yp[l] < 10 && b[1] + yp[l] < 10)masu[b[0] + xp[l]][b[1] + yp[l]]++;
		}
		}
		else if (b[2] == 2) {
			for (int l = b[0] - 1; l < b[0] + 2; l++) {
				for (int r = b[1] - 1; r < b[1] + 2; r++) {
					if (l < 10 && l>-1 && r < 10 && r>-1) masu[l][r]++;
				}
			}
		}
		else {
			for (int l = 0; l < 12; l++) {
				if (b[0] + xq[l] < 10 && b[0] + xq[l]>0 && b[1] + yq[l] < 10 && b[1] + yq[l] < 10)masu[b[0] + xq[l]][b[1] + yq[l]]++;
			}
		}
	}
	int zero, n;
	zero = n = 0;
	for (auto j : masu) {
		for (int i : j) {
			if (i==0) zero++;
			else if (i > n)n = i;
		}
	}
	cout << zero << endl << n << endl;
}

C++: #include<stdio.h>
int main(void)
{
	int p[11][11];
	int x,y,z;
	int i,j;
	int max,cnt;
	max=0;
	cnt=0;
	
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			p[i][j]=0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
		p[x][y]++;
		p[x+1][y]++;
		p[x-1][y]++;
		p[x][y+1]++;
		p[x][y-1]++;
		if(z==2){
			p[x+1][y+1]++;
			p[x+1][y-1]++;
			p[x-1][y+1]++;
			p[x-1][y-1]++;
		}
		else if(z==3){
			p[x+1][y+1]++;
			p[x+1][y-1]++;
			p[x-1][y+1]++;
			p[x-1][y-1]++;
			p[x+2][y]++;
			p[x-2][y]++;
			p[x][y+2]++;
			p[x][y-2]++;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(p[i][j]==0){
				cnt++;
			}
			else if(max<p[i][j]){
				max=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",cnt,max);
	return 0;
}