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 "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() {

	vvi m(14, vi(14));

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

		m[y][x]++;
		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<cstdio>
using namespace std;

int main() {
	int x,y,s;
	int p[14][14]={};
	while(~scanf("%d,%d,%d",&x,&y,&s))
	{
		x+=2;y+=2;
		p[x][y]++;
		p[x-1][y]++;
		p[x+1][y]++;
		p[x][y-1]++;
		p[x][y+1]++;
		if(s!=1)
		{
			p[x-1][y-1]++;
			p[x-1][y+1]++;
			p[x+1][y-1]++;
			p[x+1][y+1]++;
		}
		if(s==3)
		{
			p[x-2][y]++;
			p[x+2][y]++;
			p[x][y-2]++;
			p[x][y+2]++;
		}
	}
	int white=0,max=0;
	for(int i=2;i<12;i++)
	{
		for(int j=2;j<12;j++)
		{
			if(p[i][j]==0)white++;
			else max=max<p[i][j]?p[i][j]:max;
		}
	}
	cout<<white<<endl<<max<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int x, y, s;
	vector<int> X, Y, S, m;
	vector<int> L1 = { -1,1 }, L2 = { -1,0,1 }, L3 = { -2,2 };
	while (scanf("%d,%d,%d",&x,&y,&s)) {
		X.push_back(x);
		Y.push_back(y);
		S.push_back(s);
	}
	vector<vector<int>> matrix;
	for (int i = 0; i < 30; i++) {
		for (int j = 0; i < 30; i++) {
			m.push_back(0);
		}
		matrix.push_back(m);
	}
	for (int i = 0; i < X.size(); i++) {
		if (S[i] == 1) {
			matrix[X[i] + 10][Y[i] + 10] += 1;
			for (int j = 0; j < L1.size(); j++) {
				matrix[X[i] + 10 + L1[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L1[j]] += 1;
			}
		}
		else if (S[i] == 2) {
			for (int j = 0; j < L2.size(); j++) {
				for (int k = 0; k < L2.size(); k++) {
					matrix[X[i] + 10 + L2[j]][Y[i] + 10 + L2[k]] += 1;
				}
			}
		}
		else {
			for (int k = 0; k < L2.size(); k++) {
				for (int j = 0; j < L2.size(); i++) {
					matrix[X[i] + 10 + L2[k]][Y[i] + 10 + L2[j]] += 1;
				}
			}
			for (int j = 0; j < L3.size(); j++) {
				matrix[X[i] + 10 + L3[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L3[j]] += 1;
			}
		}
	}
	int ctr1 = 0, max = INT_MAX;
	for (int i = 10; i < 20; i++) {
		for (int j = 10; j < 20; j++) {
			if (matrix[i][j] == 0) {
				ctr1++;
			}
			else {
				if (max < matrix[i][j])max = matrix[i][j];
			}
		}
	}
	cout << ctr1 << endl;
	cout << max << endl;
	return 0;
}

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

#define Vint vector<int>
#define VVint vector<Vint>
#define Fsize() front().size()

int VVint_zero(VVint vv) {
	int num = 0;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] == 0) num++;
		}
	}
	return num;
}

int VVint_max(VVint vv) {
	int max = 0;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] > max) max = vv[i][j];
		}
	}
	return max;
}

int main() {
	int x, y, s;
	char cha;
	VVint vec(10, Vint(10, 0));
	while (cin >> x >> cha >> y >> cha >> s) {
		vec[y][x] += 1;
		if (y - 1 >= 0) vec[y - 1][x]++;
		if (y + 1 < 10) vec[y + 1][x]++;
		if (x - 1 >= 0) vec[y][x - 1]++;
		if (x + 1 < 10) vec[y][x + 1]++;
		if (s >= 2) {
			if (y - 1 >= 0 && x - 1 >= 0) vec[y - 1][x - 1]++;
			if (y - 1 >= 0 && x + 1 < 10) vec[y - 1][x + 1]++;
			if (y + 1 < 10 && x - 1 >= 0) vec[y + 1][x - 1]++;
			if (y + 1 < 10 && x + 1 < 10) vec[y + 1][x + 1]++;
		}
		if (s == 3) {
			if (y - 2 >= 0) vec[y - 2][x]++;
			if (y + 2 < 10) vec[y + 2][x]++;
			if (x - 2 >= 0) vec[y][x - 2]++;
			if (x + 2 < 10) vec[y][x + 2]++;
		}
	}
	cout << VVint_zero(vec) << endl;
	cout << VVint_max(vec) << endl;
	return 0;
}