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

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;k<6;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==1){
			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]++;
			paper[x][y]++;
		}
		if(n==2){
			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>=0 && y+1<10)paper[x-1][y+1]++;
			if(x+1<10 && y-1>=0)paper[x+1][y-1]++;
			if(x+1<10 && y+1<10)paper[x+1][y+1]++;
			paper[x][y]++;
		}
		if(n==3){
			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>=0 && y+1<10)paper[x-1][y+1]++;
			if(x+1<10 && y-1>=0)paper[x+1][y-1]++;
			if(x+1<10 && y+1<10)paper[x+1][y+1]++;
			
			if(x-2>=0)paper[x-2][y]++;
			if(x+2<10)paper[x+2][y]++;
			if(y+2<10)paper[x][y+2]++;
			if(y-2>=0)paper[x][y-2]++;
			paper[x][y]++;
		}
	}
	
	
	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<algorithm>
#include<string>
#include<vector>
using namespace  std;
int table[10][10];
bool range(int x, int y)
{
	if (x < 0 || y < 0 || x >= 10 || y >= 10)return false;
	return true;
}
void draw(int x,int y,int s)
{
	if (s == 1)
	{
		int dx[] = { 0,0, 1, 0, -1 };
		int dy[] = { 0,1, 0, -1, 0 };
		for (int i = 0; i < 5; i++)
		{
			int nx = dx[i] + x;
			int ny = dy[i] + y;
			if (range(nx, ny))
			{
				table[ny][nx]++;
			}
		}
	}
	else if (s == 2)
	{
		int dx[] = { 0, -1, 0, 1, 1, 1, 0, -1, -1 };
		int dy[] = { 0, -1, -1, -1, 0, 1, 1, 1, 0 };
		for (int i = 0; i < 9; i++)
		{
			int nx = dx[i] + x;
			int ny = dy[i] + y;
			if (range(nx, ny))
			{
				table[ny][nx]++;
			}
		}
	}
	else if (s == 3)
	{
		int dx[] = { 0, -1, 0, 1, 1, 1, 0, -1, -1, 0, 2, 0, -2 };
		int dy[] = { 0, -1, -1, -1, 0, 1, 1, 1, 0, -2, 0, 2, 0 };
		for (int i = 0; i < 13; i++)
		{
			int nx = dx[i] + x;
			int ny = dy[i] + y;
			if (range(nx, ny))
			{
				table[ny][nx]++;
			}
		}
	}
}
int main()
{
	int x = 0, y = 0, size = 0;
	int count = 0;
	int Max = 0;
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			table[i][j] = 0;
		}
	}
	string s;
	while (cin >> s)
	{
		x = s[0] - '0';
		y = s[2] - '0';
		size = s[4] - '0';
		draw(x, y, size);
	}
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (table[i][j] == 0)count++;
			Max = max(Max, table[i][j]);
		}
	}
	cout << count << endl;
	cout << Max << endl;
	return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
    int a[30][30]={{0}};
    char str;
    int cnt=0,m;
    int ans=0;
    int x,y,z;
    while(scanf("%d%c%d%c%d",&x,&str,&y,&str,&z)!=EOF){
        x+=10,y+=10;
        if(z==1){
            a[x][y]++;
            a[x+1][y]++;
            a[x-1][y]++;
            a[x][y+1]++;
            a[x][y-1]++;
 
        }
        else if(z==2){
            a[x][y]++;
            a[x+1][y+1]++;
            a[x+1][y-1]++;
            a[x+1][y]++;
            a[x-1][y+1]++;
            a[x-1][y-1]++;
            a[x-1][y]++;
            a[x][y+1]++;
            a[x][y-1]++;
 
 
        }
        else if(z==3){
            a[x+1][y]++;
            a[x+2][y]++;
            a[x][y+1]++;
            a[x][y+2]++;
            a[x-1][y]++;
            a[x-2][y]++;
            a[x][y-1]++;
            a[x][y-2]++;
            a[x+1][y+1]++;
            a[x-1][y-1]++;
            a[x+1][y-1]++;
            a[x-1][y+1]++;
            a[x][y]++;
 
 
 
 
        }
 
 
    }
    for(int i=10;i<20;i++){
            for(int j=10;j<20;j++){
                if(a[i][j]==0)cnt++;
                ans=max(ans,a[i][j]);
            }
        }
        cout<<cnt<<endl<<ans<<endl;
 
 
 
    return 0;
}