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

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int field[10][10];
int sx[]={-1,0,0,0,1},sy[]={0,-1,0,1,0};
int bx[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2},by[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
bool f(int x,int y){
	return x>=0 && x<10 && y>=0 && y<10;
}
void small(int x,int y){
	for(int i=0;i<5;i++){
		if(f(x+sx[i],y+sy[i]))field[x+sx[i]][y+sy[i]]++;
	}
}
void middle(int x,int y){
	for(int i=-1;i<=1;i++){
		for(int j=-1;j<=1;j++){
			if(f(x+i,y+j))field[x+i][y+j]++;
		}
	}
}
void big(int x,int y){
	for(int i=0;i<13;i++){
		if(f(x+bx[i],y+by[i]))field[x+bx[i]][y+by[i]]++;
	}
} 
int main(){
	int x,y,size,ans=0,count=0;
	char com;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			field[i][j]=0;
		}
	}
	while(cin>>x>>com>>y>>com>>size){
		if(size==1)small(x,y);
		else if(size==2)middle(x,y);
		else big(x,y);
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(field[i][j]==0)count++;
			else ans=max(ans,field[i][j]);
		}
	}
	cout<<count<<endl<<ans<<endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define int long long
signed main(){
	int x,y,t;
	int m[14][14];
	while( scanf("%lld,%lld,%lld", &x, &y, &t) != EOF ){
		x+=2;
		y+=2;
		switch(t){
			case 3:
				m[y-2][x]++;
				m[y+2][x]++;
				m[y][x-2]++;
				m[y][x+2]++;
			case 2:
				m[y-1][x-1]++;
				m[y-1][x+1]++;
				m[y+1][x-1]++;
				m[y+1][x+1]++;
			case 1:
				m[y-1][x]++;
				m[y+1][x]++;
				m[y][x-1]++;
				m[y][x+1]++;
				m[y][x]++;
				break;
			default:
				break;
		}
	}
	int z=0;
	int max = -1;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(m[i][j]==0) z++;
			if(m[i][j]>max) max = m[i][j];
		}
	}
	cout << z << endl;
	cout << max << endl;
	return 0;
}

C++: #include <stdio.h>
 
int field[15][15];
 
int main(void)
{
    int x, y;
    int size;
    int sum = 0, max = 0;
     
    while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
         y += 2;
		 x += 2;
		 
        if (size > 0){
            field[y][x]++;
            field[y - 1][x]++;
			field[y + 1][x]++;
            field[y][x + 1]++;
            field[y][x - 1]++;
            
        }
        if (size > 1){
            field[y - 1][x - 1]++;
            field[y + 1][x + 1]++;
            field[y - 1][x + 1]++;
            field[y + 1][x - 1]++;
        }
        if (size > 2){
            field[y - 2][x]++;
            field[y + 2][x]++;
            field[y][x - 2]++;
            field[y][x + 2]++;
        }
    }
     
    for (int i = 2; i < 12; i++){
        for (int j = 2; j < 12; j++){
			
			if (field[i][j] == 0){
                sum++;
            }
            if (field[i][j] > max){
                max = field[i][j];
            }
        }
    }
	
	printf("%d\n%d\n", sum, max);
	
    return (0);
}