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

using namespace std;

int main() {
    vector<vector<int>> paper(10, vector<int>(10));
    while (true) {
        string str;
        getline(cin, str);
        if (str.empty())break;

        char c[10];
        for (int i = 0; i < str.size(); i++)c[i] = str[i];
        int x = stoi(strtok(c, ","));
        int y = stoi(strtok(NULL, ","));
        int s = stoi(strtok(NULL, ","));

        switch (s) {
            case 1: {
                for (int i = 0; i < 10; i++) {
                    for (int j = 0; j < 10; j++) {
                        if (abs(x - i) + abs(y - j) <= 1)paper[i][j]++;
                    }
                }
                break;
            }
            case 2: {
                for (int i = -1; i <= 1; i++) {
                    for (int j = -1; j <= 1; j++) {
                        int nx = x + i, ny = y + j;
                        if (0 <= nx && nx < 10 && 0 <= ny && ny < 10)paper[nx][ny]++;
                    }
                }
                break;
            }
            case 3: {
                for (int i = 0; i < 10; i++) {
                    for (int j = 0; j < 10; j++) {
                        if (abs(x - i) + abs(y - j) <= 2)paper[i][j]++;
                    }
                }
                break;
            }
        }
    }

    int zero = 0, strong = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (paper[i][j] == 0)zero++;
            strong = max(strong, paper[i][j]);
        }
    }
    cout << zero << endl << strong << endl;
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

vector<vector<int>> vv;

void ink(int x, int y) {
    if (x >= 0 && x < 10 && y >= 0 && y < 10) {
        vv[x][y]++;
    }
}

void big(int x, int y) {
    ink(x-2,y);
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x+2,y);
    ink(x-1,y-1);
    ink(x,y-1);
    ink(x+1,y-1);
    ink(x-1,y+1);
    ink(x,y+1);
    ink(x+1,y+1);
    ink(x,y-2);
    ink(x,y+2);
}

void mid(int x, int y) {
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x-1,y-1);
    ink(x,y-1);
    ink(x+1,y-1);
    ink(x-1,y+1);
    ink(x,y+1);
    ink(x+1,y+1);
}

void small(int x, int y) {
    ink(x-1,y);
    ink(x,y);
    ink(x+1,y);
    ink(x,y-1);
    ink(x,y+1);
}

int countBlank() {
    int cnt = 0;
    REP(i,10) REP(j,10) if (vv[i][j] == 0) cnt++;
    return cnt;
}

int getThickest() {
    int t = 0;
    REP(i,10) REP(j,10) if (vv[i][j] > t) t = vv[i][j];
    return t;
}

int main() {
    REP(i,10) {
        vector<int> v(10,0);
        vv.push_back(v);
    }
    
    int x, y, s;
    string t;
    while(cin >> t) {
        x = t[0] - '0';
        y = t[2] - '0';
        s = t[4] - '0';
        switch (s) {
            case 1:
                small(x,y);
                break;
            case 2:
                mid(x,y);
                break;
            case 3:
                big(x,y);
                break;
                
            default:
                break;
        }
    }
    
    cout << countBlank() << endl << getThickest() << endl;
    
    return 0;
}

C++: #include <stdio.h>
#define B 13
#define M 8
#define S 4
void drop(int x,int y,int xy[][10]){
	if(x>-1&&x<10&&y>-1&&y<10) xy[y][x]++;
}


int main(){
	int x,y,size,max,num;
	int i,j;
	int xy[10][10];
	max=num=0;
	for(i=0;i<10;i++){
		for(j=0;j<10;j++) xy[i][j]=0;
	}
	int b[B][2] = {{0,-2},{-1,-1},{0,-1},{1,-1},{-2,0},{-1,0},{1,0},{2,0},{-1,1},{0,1},{1,1},{0,2}};
	int m[M][2] = {{-1,-1},{0,-1},{1,-1},{-1,0},{1,0},{-1,1},{0,1},{1,1}};
	int s[S][2] = {{0,-1},{-1,0},{0,1},{1,0}};

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
		case 1:
			for(int i=0;i<S;i++) drop(x+s[i][0],y+s[i][1],xy);
			break;
		case 2:
			for(int i=0;i<M;i++) drop(x+m[i][0],y+m[i][1],xy);
			break;
		case 3:
			for(int i=0;i<B;i++) drop(x+b[i][0],y+b[i][1],xy);
			break;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(!xy[i][j]) num++;
			else if(xy[i][j]>max) max = xy[i][j];
		}
	}
	printf("%d\n%d\n",num,max);
	return 0;
}