Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

C++: #include<iostream>
#include<string>
#include<stdlib.h>
using namespace std;
bool in(int x,int y){
  if(x<0||x>9||y<0||y>9) return false;
  return true;
}
int main(){
  int pa[10][10]={{}};
  string str;
  int i,j;
  while(cin >> str){
    int x=str[0]-'0',y=str[2]-'0',s=str[4]-'0';
    if(s==1){
      for(i=-1;i<=1;i++){
	for(j=-1+abs(i);j<=1-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==2){
      for(i=-1;i<=1;i++){
	for(j=-1;j<=1;j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==3){
      for(i=-2;i<=2;i++){
	for(j=-2+abs(i);j<=2-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }
  }
  int o=0,m=0;
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      //cout << pa[i][j];
      m=max(m,pa[i][j]);
      if(pa[i][j]==0) o++;
    }
    //cout << endl;
  }
  cout << o << endl << m << endl;
  return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	while(scanf("%d",&x)!=EOF){
		scanf(",%d,%d",&y,&n);
		
		if(n==0)break;
		
		if(n==1){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==2){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==3){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			
			if(y-2>=0)paper[y-2][x]++;
			if(y+2<10)paper[y+2][x]++;
			if(x+2<10)paper[y][x+2]++;
			if(x-2>=0)paper[y][x-2]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
	}
	
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(paper[i][j]==0)c++;
			if(paper[i][j]>=max)max=paper[i][j];
		}
	}
	printf("%d\n%d\n",c,max);
	return 0;
}

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;
}