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>
#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("%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 "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

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

	vector<vector<int>> P(10,vector<int>(10,0));
	vector<vector<pair<int,int>>> F(3);
	F[0] = {make_pair(0,-1),make_pair(-1,0),make_pair(0,0),make_pair(1,0),make_pair(0,1)};
	F[1] = {make_pair(-1,-1),make_pair(0,-1),make_pair(1,-1),make_pair(-1,0),make_pair(0,0),
		    make_pair(1,0),make_pair(-1,1),make_pair(0,1),make_pair(1,1)};
	F[2] = {make_pair(0,-2),make_pair(-1,-1),make_pair(0,-1),make_pair(1,-1),
		    make_pair(-2,0),make_pair(-1,0),make_pair(0,0),make_pair(1,0),make_pair(2,0),
		    make_pair(-1,1),make_pair(0,1),make_pair(1,1),make_pair(0,2)};
	string S;
	while(cin>>S){
		int x,y,s;
		sscanf(S.c_str(),"%d,%d,%d",&x,&y,&s);
		s--;
		for(int i=0,ei=F[s].size();i<ei;i++){
			int nx = x+F[s][i].first,ny = y+F[s][i].second;
			if(0<=nx && nx<10 && 0<=ny && ny<10){
				P[ny][nx]++;
			}
		}
	}
	int num=0,dep=0;
	REP(i,10){
		REP(j,10){
			if(P[i][j]==0) num++;
			dep = max(dep,P[i][j]);
		}
	}
	out(num);
	out(dep);
	return 0;
}

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

bool isValidRange(int y, int x) {
    return 0 <= x && x < 10 && 0 <= y && y < 10;
}

void dropInk(int x, int y, int size, int d[10][10]) {
    switch (size) {
    case 1:
        for (int i = x - 1; i <= x + 1; i++) {
            if (isValidRange(y, i)) {
                d[y][i]++;
            }
        }
        for (int i = y - 1; i <= y + 1; i++) {
            if (isValidRange(i, x)) {
                d[i][x]++;
            }
        }
        d[y][x]--;
        break;
    case 2:
        for (int i = y - 1; i <= y + 1; i++) {
            for (int j = x - 1; j <= x + 1; j++) {
                if (isValidRange(i, j)) {
                    d[i][j]++;
                }
            }
        }
        break;
    case 3:
        for (int i = y - 1; i <= y + 1; i++) {
            for (int j = x - 1; j <= x + 1; j++) {
                if (isValidRange(i, j)) {
                    d[i][j]++;
                }
            }
        }
        if (isValidRange(y - 2, x)) d[y - 2][x]++;
        if (isValidRange(y, x - 2)) d[y][x - 2]++;
        if (isValidRange(y, x + 2)) d[y][x + 2]++;
        if (isValidRange(y + 2, x)) d[y + 2][x]++;
        break;
    }
}

int main() {
    int cells[10][10] = {};
    int x, y, size;
    while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
        dropInk(x, y, size, cells);
    }
    int zeroNum = 0, max = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (cells[i][j] == 0) {
                zeroNum++;
            }
            if (max < cells[i][j]) {
                max = cells[i][j];
            }
        }
    }
    cout << zeroNum << endl
         << max << endl;
}