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<stdio.h>
#include<math.h>
#include<vector>
using namespace std;
int main() {
	int i,j,k,l,m,n,o,x,y,z;
	int max = 0;
	int count = 0;
	vector< vector<int> > s;
	s.resize(10);
	for (i = 0; i < 14; i++) {
		s[i].resize(14);
	}
	for (j = 0; j < 14; j++) {
		for (k = 0; k < 14; k++) {
			s[j][k] = 0;
		}
	}
	while (scanf("%d,%d,%d", &x, &y, &z)!=EOF) {
		if (z == 1) {
			s[x + 2][y + 2] += 1;
			s[x + 1][y + 2] += 1;
			s[x + 3][y + 2] += 1;
			s[x + 2][y + 1] += 1;
			s[x + 2][y + 3] += 1;
		}
		else if (z == 2) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
				}
			}
		}
		else if (z == 3) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
					s[x][y + 2] += 1;
					s[x + 4][y + 2] += 1;
					s[x + 2][y] += 1;
					s[x + 2][y + 4] += 1;
				}
			}
		}
	}
	for (n = 2; n < 12; n++) {
		for (o = 2; o < 12; o++) {
			if (max < s[n][o]) {
				max = s[n][o];
			}
			if (s[n][o] == 0) {
				count += 1;
			}
		}
	}
	cout << count << endl;
	cout << max << endl;
	return 0;
}

C++: #include<cstdio>
int p[10][10];
void drop(int x,int y){
    if(0<=x && x<10 && 0<=y && y<10) p[x][y]++;
}
int main(){
    int x,y,s;
    int a=0,b=0;
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            p[i][j]=0;
        }
    }
    while(~scanf("%d,%d,%d",&x,&y,&s)){
        if(s==1){
            drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
        }else if(s==2){
            drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
            drop(x+1,y+1);
            drop(x+1,y-1);
            drop(x-1,y+1);
            drop(x-1,y-1);
        }else if(s==3){
            drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
            drop(x+1,y+1);
            drop(x+1,y-1);
            drop(x-1,y+1);
            drop(x-1,y-1);
            drop(x+2,y);
            drop(x-2,y);
            drop(x,y+2);
            drop(x,y-2);
        }
    }
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(p[i][j]==0) a++;
            else if(b<p[i][j]) b=p[i][j];
        }
    }
    printf("%d\n%d\n",a,b);
}

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

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

	int paper[15][15] = {};
	// (0, 0) -> (2, 2)
	// (9, 9) -> (11, 11) ??¨??????

	int x, y, size;
	char c1, c2;
	while(cin >> x >> c1 >> y >> c2 >> size){
		x += 2;
		y += 2;

		if(size >= 1){
			paper[x][y] ++;
			paper[x + 1][y] ++;
			paper[x - 1][y] ++;
			paper[x][y + 1] ++;
			paper[x][y - 1] ++;
		}

		if(size >= 2){
			paper[x + 1][y + 1] ++;
			paper[x + 1][y - 1] ++;
			paper[x - 1][y + 1] ++;
			paper[x - 1][y - 1] ++;
		}

		if(size >= 3){
			paper[x + 2][y] ++;
			paper[x - 2][y] ++;
			paper[x][y + 2] ++;
			paper[x][y - 2] ++;
		}
	}

	int ans1 = 0;
	int ans2 = 0;
	for(int i = 2; i < 10 + 2; ++i){
		for(int j = 2; j < 10 + 2; ++j){
			if(paper[i][j] == 0){
				ans1++;
			}

			ans2 = max(ans2, paper[i][j]);
		}
	}

	cout << ans1 << endl;
	cout << ans2 << endl;

	return 0;
}