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 main(void){
	int map[10][10];
	int x,y,s;
	int n=0,m=0;
	memset(map,0,sizeof(map));
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s>=1){
			map[x][y]+=1;
			if(x-1>=0 && x-1<10)map[x-1][y]+=1;
			if(x+1>=0 && x+1<10)map[x+1][y]+=1;
			if(y-1>=0 && y-1<10)map[x][y-1]+=1;
			if(y+1>=0 && y+1<10)map[x][y+1]+=1;
		}
		if(s>=2){
			if(x-1>=0 && x-1<10 && y-1>=0 && y-1<10)map[x-1][y-1]+=1;
			if(x+1>=0 && x+1<10 && y-1>=0 && y-1<10)map[x+1][y-1]+=1;
			if(x-1>=0 && x-1<10 && y+1>=0 && y+1<10)map[x-1][y+1]+=1;
			if(x+1>=0 && x+1<10 && y+1>=0 && y+1<10)map[x+1][y+1]+=1;
		}
		if(s>=3){
			if(y-2>=0 && y-2<10)map[x][y-2]+=1;
			if(y+2>=0 && y+2<10)map[x][y+2]+=1;
			if(x-2>=0 && x-2<10)map[x-2][y]+=1;
			if(x+2>=0 && x+2<10)map[x+2][y]+=1;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(map[i][j]==0)n++;
			if(map[i][j]>m)m=map[i][j];
		}
	}
	printf("%d\n",n);
	printf("%d\n",m);
    return 0;
}

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    int p[13][13] = {};
    int x, y, s;
    char c;
    int w = 0, dens = 0;

    while (cin >> x >> c >> y >> c >> s)
    {
        switch (s)
        {
        case 1:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            break;
        case 2:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            p[x + 1][y + 1]++;
            p[x - 1][y + 1]++;
            p[x - 1][y - 1]++;
            p[x + 1][y - 1]++;
            break;
        case 3:
            p[x][y]++;
            p[x + 1][y]++;
            p[x - 1][y]++;
            p[x][y + 1]++;
            p[x][y - 1]++;
            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]++;
            break;
        }
    }

    rep(i, 10)
    {
        rep(j, 10)
        {
            if (p[i][j] == 0)
            {
                w++;
            }
            if (p[i][j] >= dens)
            {
                dens = p[i][j];
            }
        }
    }
    OP(w)
    OP(dens)

    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
 
#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <queue>
#include <cmath>
#include <stack>
#include <map>
 
#define int64 long long int 
 
using namespace std;
typedef pair<int, int> P;
 
void ink(P, int, int map[10][10]);
 
int main()
{
    int map[10][10] = {0};
    int x, y, s, count, max;
    while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
        P p(x, y);
        ink(p, s, map);
    }
    count = max = 0;
    for(int i=0; i<10; i++){
        for(int j=0; j<10; j++){
            if(!map[i][j]) count++;
            if(max < map[i][j]) max = map[i][j];
        }
    }
    cout << count << '\n' << max << '\n';
    return 0;
}
 
void ink(P p, int s, int map[10][10])
{
    int dx1[4] = {1, 0, -1, 0};
    int dy1[4] = {0, 1, 0, -1};
    int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1};
    int dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
    int dx3[12] = {1, 1, 0, -1, -1, -1, 0, 1, 2, 0, -2, 0};
    int dy3[12] = {0, 1, 1, 1, 0, -1, -1, -1, 0, 2, 0, -2};
    int nx, ny;
 
    if(s == 1){
        map[p.first][p.second]++;
        for(int i=0; i<4; i++){
            nx = p.first + dx1[i], ny = p.second + dy1[i];
            if(0 <= nx && nx < 10 && 0 <= ny && ny < 10)
                map[nx][ny]++;
        }
    }
    if(s == 2){
        map[p.first][p.second]++;
        for(int i=0; i<8; i++){
            nx = p.first + dx2[i], ny = p.second + dy2[i];
            if(0 <= nx && nx < 10 && 0 <= ny && ny < 10)
                map[nx][ny]++;
        }
    }
    if(s == 3){
        map[p.first][p.second]++;
        for(int i=0; i<12; i++){
            nx = p.first + dx3[i], ny = p.second + dy3[i];
            if(0 <= nx && nx < 10 && 0 <= ny && ny < 10)
                map[nx][ny]++;
        }
    }
    return;
}

C++: #include <iostream>

#define SIZE 10

using namespace std;

int map[SIZE][SIZE] = {0};

void drop(int x, int y) {
	if (0 <= x && x < SIZE && 0 <= y && y < SIZE) {
		map[x][y]++;
	}
}

int main() {
	int x, y, s, count = 0, most = 0;
	char e;
	while (cin>>x>>e>>y>>e>>s) {
		x--;
		y--;
		drop(x, y);
		drop(x, y + 1);
		drop(x + 1, y);
		drop(x, y - 1);
		drop(x - 1, y);

		if (s > 1) {
			drop(x + 1, y + 1);
			drop(x + 1, y - 1);
			drop(x - 1, y - 1);
			drop(x - 1, y + 1);

			if (s > 2) {
				drop(x, y + 2);
				drop(x, y - 2);
				drop(x + 2, y);
				drop(x - 2, y);
			}
		}
	}

	for (int i = 0; i < SIZE; i++) {
		for (int j = 0; j < SIZE; j++) {
			if (map[i][j] > most) {
				most = map[i][j];
			}

			if (map[i][j] == 0) {
				count++;
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}