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<algorithm>
using namespace std;
int main()
{
	int dx[12] = { 1, 0, -1, 0, 1, -1, 1, -1, 2, 0, -2, 0 };
	int dy[12] = { 0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2 };
	int map[10][10] = { 0 };
	int cnt = 100;
	int x, y, size;
	char s, d;
	int ma = 0;
	int c = 0;

	while (cin >> x >> s >> y >> d >> size){
		
		if (size == 1){
			map[y][x]++;
			for (int i = 0; i < 4; i++){
				
				int xx = dx[i] + x;
				int yy = dy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if (size == 2){
			map[y][x]++;
			for (int i = 0; i < 8; i++){
				int xx = dx[i] + x;
				int yy = dy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if(size==3) {
			map[y][x]++;
			for (int i = 0; i < 12; i++){
				int xx = dx[i] + x;
				int yy = dy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}
		/*for (int i = 0; i < 10; i++){
			for (int i2 = 0; i2 < 10; i2++){
				cout << map[i][i2] << " ";
			}cout << endl;
		}*/
	}

	for (int i = 0; i < 10; i++){
		for (int i2 = 0; i2 < 10; i2++){
			if (map[i][i2] != 0){
				cnt--;
			}
			ma = max(ma, map[i][i2]);
		}
	}
	
	cout << cnt << endl;
	cout << ma << endl;
}

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

int main(){
	int x, y, p, pt;
	string str;
	int field[10][10];
	int res_M, res_zero;
	
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			field[i][j] = 0;
		}
	}
	
	while(getline(cin, str)){
		x = 0; y = 0; p = 0;
		pt = 0;
		
		while(pt < str.size() && str[pt] != ','){
			x = x * 10 + (str[pt] - 48);
			pt++;
		}
		pt++;
		while(pt < str.size() && str[pt] != ','){
			y = y * 10 + (str[pt] - 48);
			pt++;
		}
		pt++;
		while(pt < str.size() && str[pt] != ','){
			p = p * 10 + (str[pt] - 48);
			pt++;
		}
		
		//1st
		field[y][x]++;
		if(y > 0) field[y - 1][x]++;
		if(x > 0) field[y][x - 1]++;
		if(y + 1 < 10) field[y + 1][x]++;
		if(x + 1 < 10) field[y][x + 1]++;
		p--;
		if(p > 0){
			//2nd
			if(x > 0 && y > 0) field[y - 1][x - 1]++;
			if(x + 1 < 10 && y > 0) field[y - 1][x + 1]++;
			if(x > 0 && y + 1 < 10) field[y + 1][x - 1]++;
			if(x + 1 < 10 && y + 1 < 10) field[y + 1][x + 1]++;
			p--;
		}
		if(p > 0){
			//3rd
			if(x - 2 >= 0) field[y][x - 2]++;
			if(x + 2 < 10) field[y][x + 2]++;
			if(y + 2 < 10) field[y + 2][x]++;
			if(y - 2 >= 0) field[y - 2][x]++;
		}
	}
	
	res_M = 0; res_zero = 0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(field[i][j] == 0) res_zero++;
			else res_M = max(res_M, field[i][j]);
		}
	}
	
	printf("%d\n%d\n", res_zero, res_M);
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;

void small(int paper[][14], int x, int y){
    paper[x][y]++;
    paper[x-1][y]++;
    paper[x+1][y]++;
    paper[x][y-1]++;
    paper[x][y+1]++;
}

void middle(int paper[][14], int x, int y){
    small(paper, x, y);
    paper[x-1][y-1]++;
    paper[x-1][y+1]++;
    paper[x+1][y-1]++;
    paper[x+1][y+1]++;
}

void large(int paper[][14], int x, int y){
    small(paper, x, y);
    paper[x-1][y-1]++;
    paper[x-1][y+1]++;
    paper[x+1][y-1]++;
    paper[x+1][y+1]++;
    paper[x-2][y]++;
    paper[x+2][y]++;
    paper[x][y-2]++;
    paper[x][y+2]++;
}

int main(){
    int paper[14][14]={};
    int x, y, Size;
    while(scanf("%d,%d,%d", &x, &y, &Size) != EOF){
        x += 2;
        y += 2;
        switch(Size){
            case 1 : small(paper, x, y); break;
            case 2 : middle(paper, x, y); break;
            case 3 : large(paper, x, y); break;
        }
    }
    int mx=0, plain=0;
    for(int i=2; i<12; i++){
        for(int j=2; j<12; j++){
            if(paper[i][j] > mx) mx = paper[i][j];
            if(paper[i][j] == 0) plain++;
        }
    }
    cout << plain << endl << mx << endl;
    return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

#define M 2+10+2

int main() {
	int A[M][M] = {};

	for (int x, y, size; scanf("%d,%d,%d", &x, &y, &size) != EOF&&x;) {
		x += 2; y += 2;
		A[x + 1][y]++;
		A[x][y + 1]++;
		A[x - 1][y]++;
		A[x][y - 1]++;
		if (size == 1)continue;
		A[x + 1][y + 1]++;
		A[x + 1][y - 1]++;
		A[x - 1][y + 1]++;
		A[x - 1][y - 1]++;
		if (size == 2)continue;
		A[x + 2][y]++;
		A[x][y + 2]++;
		A[x - 2][y]++;
		A[x][y - 2]++;
	}

	int cnt = 100, MAX = 0;

	for (int x = 0; x < 10; x++) {
		for (int y = 0; y < 10; y++) {
			if (A[x + 2][y + 2]) {
				cnt--;
				MAX = max(MAX, A[x + 2][y + 2]);
			}
		}
	}
	cout << cnt << endl;
	cout << MAX << endl;
	return 0;
}