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<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
#define bv vector<bool>
using namespace std;
typedef pair<int, int>PA;
using namespace std;
#define MAX 1e7
int sx[] = {0,0,-1,1};
int sy[] = {1,-1,0,0};
int my[] = {0,0,1,1,1,-1,-1,-1};
int mx[] = {1,-1,0,1,-1,0,1,-1};
int lx[] = {0,0,0,0,1,1,1,2,-1,-1,-1,-2};
int ly[] = {1,-1,2,-2,0,1,-1,0,0,-1,1,0};
int  main(){
    
    vvi v(12,vi(12,0));
    vi x(100,0); vi y(100,0); vi ink(100,0);
    int i =0; char c,d;
    while(cin >> x[i] >>c>>y[i] >>d >> ink[i]){
        v[y[i]][x[i]]+=1;
        if(ink[i] == 1){
            rep(j,4){
                int tx =x[i]+sx[j]; int ty = y[i]+sy[j];
                if(0<=tx && tx<10 && 0<=ty && ty<10)
                    v[ty][tx]+=1;
            }
        }else if(ink[i] == 2){
            rep(j,8){
                int tx =x[i]+mx[j]; int ty = y[i]+my[j];
                if(0<=tx && tx<10 && 0<=ty && ty<10)
                    v[ty][tx]+=1;
                }
        }else if(ink[i] == 3){
                rep(j,12){
                    int tx =x[i]+lx[j]; int ty = y[i]+ly[j];
                    if(0<=tx && tx<10 && 0<=ty && ty<10)
                        v[ty][tx]+=1;
                }
        }
        i++;
    }
        int ans1 = -INF; int ans2 = 0;
        rep(i,10) rep(j,10){
            ans1 = max(ans1,v[i][j]);
            if(v[i][j]  == 0)
                ans2++;
        }
    cout << ans2<< endl;
    cout << ans1<< endl;
        
    return 0;

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int masu[13][13],x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		if(s==1){
			for(int i=x-1;i<=x+1;i++)masu[i+2][y+2]++;
			masu[x+2][y+1]++;
			masu[x+2][y+3]++;
		}else if(s==2){
			for(int i=x-1;i<=x+1;i++){
				for(int j=y-1;j<=y+1;j++){
					masu[i+2][j+2]++;
				}
			}
		}else{
			for(int i=x-1;i<=x+1;i++){
				for(int j=y-1;j<=y+1;j++){
					masu[i+2][j+2]++;
				}
			}
			masu[x][y+2]++,masu[x+4][y+2]++;
			masu[x+2][y]++,masu[x+2][y+4]++;
		}
	}
	int siro=0,koi=0;
	for(int i=2;i<=11;i++){
		for(int j=2;j<=11;j++){
			if(masu[i][j]==0)siro++;
			if(koi<masu[i][j])koi=masu[i][j];
		}
	}
	cout<<siro<<endl<<koi<<endl;
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string.h>
#include <queue>
#include <stack>
#include <utility>
#include <queue>
#include <cmath>
#define mp make_pair
#define pii pair<int,int> 
#define ff first
#define ss second
#define ll long long 
#define vi vector<int>

using namespace std;

int paper[12][12];

int x,y,d,hasil,maxs;

/*int small()
{
	printf("small ");
	if(x-1>=0)
	paper[x-1][y]++;
	if(x+1<10)
	paper[x+1][y]++;
	if(y-1>=0)
	paper[x][y-1]++;
	if(y+1<10)
	paper[x][y-1]++;
}
int medium()
{
	printf("medium ");
	if(x-1>=0&&y-1>=0)
	paper[x-1][y-1]++;
	if(x+1<10&&y+1<10)
	paper[x+1][y+1]++;
	if(x-1>=0&&y+1<10)
	paper[x-1][y+1]++;
	if(x+1<10&&y-1>10)
	paper[x+1][y-1]++;
}
int large()
{
	printf("large ");
	if(x-2>=0)
	paper[x-2][y]++;
	if(x+2<10)
	paper[x+2][y]++;
	if(y-2>=0)
	paper[x][y-2]++;
	if(y+2<10)
	paper[x][y-2]++;
}*/

int main()
{
	memset(paper, 0, sizeof(paper[0][0]) *12 *12);
	hasil=0;
	maxs=0;
	while(scanf("%d,%d,%d",&x,&y,&d)!=EOF)
	{
		/*if(x==0&&y==0&&d==0)
		{
			break;
		}*/
		if(d==1)
		{
			//printf("s");
			//small;
			paper[x][y]++;
			if(x-1>=0)
			paper[x-1][y]++;
			if(x+1<10)
			paper[x+1][y]++;
			if(y-1>=0)
			paper[x][y-1]++;
			if(y+1<10)
			paper[x][y+1]++;
		}
		else if(d==2)
		{
			//printf("m");
			//small;
			//medium;	
			paper[x][y]++;
			if(x-1>=0)
			paper[x-1][y]++;
			if(x+1<10)
			paper[x+1][y]++;
			if(y-1>=0)
			paper[x][y-1]++;
			if(y+1<10)
			paper[x][y+1]++;
			if(x-1>=0&&y-1>=0)
			paper[x-1][y-1]++;
			if(x+1<10&&y+1<10)
			paper[x+1][y+1]++;
			if(x-1>=0&&y+1<10)
			paper[x-1][y+1]++;
			if(x+1<10&&y-1>=0)
			paper[x+1][y-1]++;
		}
		else if(d==3)
		{
			//printf("l");
			//small;
			//medium;
			//large;
			paper[x][y]++;
			if(x-1>=0)
			paper[x-1][y]++;
			if(x+1<10)
			paper[x+1][y]++;
			if(y-1>=0)
			paper[x][y-1]++;
			if(y+1<10)
			paper[x][y+1]++;
			if(x-1>=0&&y-1>=0)
			paper[x-1][y-1]++;
			if(x+1<10&&y+1<10)
			paper[x+1][y+1]++;
			if(x-1>=0&&y+1<10)
			paper[x-1][y+1]++;
			if(x+1<10&&y-1>=0)
			paper[x+1][y-1]++;
			if(x-2>=0)
			paper[x-2][y]++;
			if(x+2<10)
			paper[x+2][y]++;
			if(y-2>=0)
			paper[x][y-2]++;
			if(y+2<10)
			paper[x][y+2]++;
		}
		/*for(int b=0;b<10;b++)
		{
		for(int k=0;k<10;k++)
		{
			printf("%d ",paper[k][b]);
		}
		printf("\n");
		}*/
	}
	for(int b=0;b<10;b++)
	{
		for(int k=0;k<10;k++)
		{
			if(paper[k][b]==0)
			{
				hasil++;	
			}
			maxs=max(maxs,paper[k][b]);
			//printf("%d ",paper[k][b]);
		}
		//printf("\n");
	}
	printf("%d\n%d\n",hasil,maxs);
	return 0;
}