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 <vector>
#include <algorithm>
#include <cstring>

using namespace std;

int sdy[]={-1,0,0,1,0};
int sdx[]={0,-1,1,0,0};
int mdy[]={0,0,0,-1,-1,-1,1,1,1};
int mdx[]={-1,0,1,-1,0,1,-1,0,1};
int ldy[]={0,0,0,-1,-1,-1,1,1,1,2,0,0,-2};
int ldx[]={-1,0,1,-1,0,1,-1,0,1,0,-2,2,0};


int main(){

	int field[10][10];
	memset(field,0,sizeof(field));

	int x,y,size;
	char cm;
	while(cin>>x>>cm>>y>>cm>>size){
		//field[y][x]++;
		if(size==1){
			for(int i = 0; i < 4; i++){
				int py=y+sdy[i];
				int px=x+sdx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
		else if(size==2){
			for(int i = 0; i < 9; i++){
				int py=y+mdy[i];
				int px=x+mdx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
		else{
			for(int i = 0; i < 13; i++){
				int py=y+ldy[i];
				int px=x+ldx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
	}

	int maxConcentration=0;
	int cnt=0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(field[i][j]==0)
				cnt++;
			maxConcentration=max(maxConcentration,field[i][j]);
		}
	}
	cout<<cnt<<endl;
	cout<<maxConcentration<<endl;

	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
int masu[10][10]={};
int x,y;
void sho(int i,int j){
  if(abs(i)+abs(j)<2) masu[i+y][j+x]++;
}
void chu(int i,int j){
  if(abs(i)<2&&abs(j)<2) masu[i+y][j+x]++;
}
void dai(int i,int j){
  if(abs(i)+abs(j)<=2) masu[i+y][j+x]++;
}
int main(){
  int s;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    for(int i=-2;i<=2;i++){
      for(int j=-2;j<=2;j++){
	if(i+y<0||j+x<0||i+y>=10||j+x>=10) continue;
	if(s == 1) sho(i,j);
	if(s == 2) chu(i,j);
	if(s == 3) dai(i,j);
      }
    }
  }
  int a=0,b=0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      a+=masu[i][j]==0;
      b = max(b,masu[i][j]);
    }
  }
  printf("%d\n%d\n",a,b);
  return(0);
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>

using namespace std;

static const int dx4[]={-1, 0, 1, 0}, dy4[]={0, -1, 0, 1};
static const int dx8[]={-1, -1, -1, 0, 0, 1, 1, 1};
static const int dy8[]={-1, 0, 1, -1, 1, -1, 0, 1};

int main() {
    vector<vector<int>> g(10, vector<int>(10));

    while (true) {
        size_t x, y;
        int s;
        if (scanf("%zu, %zu, %d", &x, &y, &s) == EOF)
            break;

        if (s == 1) {
            for (size_t k=0; k<4; ++k) {
                int X=x+dx4[k], Y=y+dy4[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
        } else if (s == 2) {
            for (size_t k=0; k<8; ++k) {
                int X=x+dx8[k], Y=y+dy8[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
        } else if (s == 3) {
            for (size_t k=0; k<8; ++k) {
                int X=x+dx8[k], Y=y+dy8[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
            for (size_t k=0; k<4; ++k) {
                int X=x+2*dx4[k], Y=y+2*dy4[k];
                if (!(0<=X && X<10 && 0<=Y && Y<10))
                    continue;

                ++g[Y][X];
            }
        }
    }

    pair<size_t, int> res;  // <0, max>
    for (vector<int> &col: g)
        for (int d: col) {
            if (d == 0)
                ++res.first;

            if (res.second < d)
                res.second = d;
        }

    printf("%zu\n", res.first);
    printf("%d\n", res.second);
    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;
}