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<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

void s1(int m[][14], int x, int y){
    x+= 2; y+= 2;
    m[x][y]++;
    m[x+1][y]++;
    m[x-1][y]++;
    m[x][y+1]++;
    m[x][y-1]++;
}
void s2(int m[][14], int x, int y){
    x+= 2; y+= 2;
    m[x][y]++;
    m[x+1][y]++;
    m[x-1][y]++;
    m[x][y+1]++;
    m[x][y-1]++;
    m[x+1][y+1]++;
    m[x+1][y-1]++;
    m[x-1][y+1]++;
    m[x-1][y-1]++;
}
void s3(int m[][14], int x, int y){
    x+= 2; y+= 2;
    m[x][y]++;
    m[x+1][y]++;
    m[x-1][y]++;
    m[x][y+1]++;
    m[x][y-1]++;
    m[x+1][y+1]++;
    m[x+1][y-1]++;
    m[x-1][y+1]++;
    m[x-1][y-1]++;
    m[x+2][y]++;
    m[x-2][y]++;
    m[x][y+2]++;
    m[x][y-2]++;
}

int main(){
    int x,y,s;
    char g;
    int m[14][14] = {{0}};
    int ans[2] = {0};

    while(cin >> x >> g >> y >> g >> s){
        if(s == 1) s1(m,x,y);
        else if(s == 2) s2(m,x,y);
        else if(s == 3) s3(m,x,y);
    }
    range(i,2,12){
        range(j,2,12){
            if(m[i][j] == 0){
                ans[0]++;
            }
            if(ans[1] < m[i][j]){
                ans[1] = m[i][j];
            }
        }
    }
    cout << ans[0] << endl << ans[1] << endl;
}

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

#define W 10
#define H 10

int main()
{
	vector< vector<int> > paper(W, vector<int>(H, 0));
	int x, y, size;
	int i, j;
	int blank, max;

	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		switch (size) {
			case 3:
				if (x-2 >= 0) paper[x-2][y] ++;
				if (x+2 < W) paper[x+2][y] ++;
				if (y-2 >= 0) paper[x][y-2] ++;
				if (y+2 < H) paper[x][y+2] ++;
			case 2:
				if (x-1 >= 0 && y-1 >= 0) paper[x-1][y-1] ++;
				if (x-1 >= 0 && y+1 <= H) paper[x-1][y+1] ++;
				if (x+1 <= W && y-1 >= 0) paper[x+1][y-1] ++;
				if (x+1 <= W && y+1 <= H) paper[x+1][y+1] ++;
			case 1:
				if (x-1 >= 0) paper[x-1][y] ++;
				if (x+1 < W) paper[x+1][y] ++;
				if (y-1 >= 0) paper[x][y-1] ++;
				if (y+1 < H) paper[x][y+1] ++;
				paper[x][y] ++;
				break;
		}
	}

	blank = 0;
	max = 0;
	for (i = 0; i < W; i++) {
		for (j = 0; j < H; j++) {
			if (paper[i][j] == 0) blank++;
			else if (paper[i][j] > max) max = paper[i][j];
		}
	}

	cout<<blank<<endl;
	cout<<max<<endl;

	return 0;
}

C++: #include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
const int MAP_SIZE = 100;
#define drp(y, x) m[(y) + 10][(x) + 10] += 1

int m[MAP_SIZE][MAP_SIZE];

void setMap(int y, int x, int s);
void searchMap();

int main(){
    int x, y, s;
    memset(m, 0, sizeof(m));
    while(scanf("%d,%d,%d", &x, &y, &s) != EOF) setMap(y, x, s);
    searchMap();
    return 0;
}

void setMap(int y, int x, int s){
    drp(y, x);
    int mx[3][4] = {{0, 1, 0, -1}, {-1, 1, 1, -1}, {0, 2, 0, -2}};
    int my[3][4] = {{-1, 0, 1, 0}, {-1, -1, 1, 1}, {-2, 0, 2, 0}};
    for(int i = 0; i < s; i++){
        for(int j = 0; j < 4; j++){
            drp(y + my[i][j], x + mx[i][j]);
        }
    }
}

void searchMap(){
    int blankSum = 0, max = -1;
    for(int i = 10; i < 20; i++){
        for(int j = 10; j < 20; j++){
            if(m[i][j] > max) max = m[i][j];
            if(m[i][j] == 0) blankSum++;
        }
    }
    cout <<blankSum <<endl <<max <<endl;
}

C++: #include<iostream>
#include<stdio.h>
#define DROP(x,y) if(x>=0&&y>=0&&x<10&&y<10)++cloth[x][y]
using namespace std;

int main(){

	int x, y, size;
	int cloth[10][10];
	int count, max;
	
	for (int i = 0; i < 10; ++i)
	for (int j = 0; j < 10; ++j)
		cloth[i][j] = 0;

	while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){
		if (size == 1){
			DROP(x, y);
			DROP(x + 1, y);
			DROP(x, y + 1);
			DROP(x - 1, y);
			DROP(x, y - 1);
		}

		else if (size == 2){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			DROP(x + 1, y + 1);
		}

		else if (size == 3){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			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 (cloth[i][j] == 0)++count;
		if (cloth[i][j] > max)max = cloth[i][j];
	}

	cout << count << endl << max << endl;

	



}

C++: #include <cstdio>
using namespace std;
 
int main()
{
    int xy[10][10] = {'0'};
    int x,y,size;
    xy[0][0] = 0;
     
    while(scanf("%d,%d,%d", &x,&y,&size) != EOF){
         
        xy[y-1][x]++;
        xy[y][x-1]++;
        xy[y][x]++;
        xy[y][x+1]++;
        xy[y+1][x]++;
         
        if(size >= 2){
            xy[y-1][x-1]++;
            xy[y-1][x+1]++;
            xy[y+1][x-1]++;
            xy[y+1][x+1]++;
        }
        if(size == 3){
            xy[y-2][x]++;
            xy[y][x-2]++;
            xy[y][x+2]++;
            xy[y+2][x]++;
        }
    }
     
    int w=0,con = 0;
     
    for(int i=0; i < 10; i++){
        for(int j=0; j < 10; j++){
            if(xy[i][j] == 0)w++;
            if(con < xy[i][j])con = xy[i][j];
        }
    }
     
    printf("%d\n%d\n", w, con);
     
    return (0);
}