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 <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <array>
#include <stack>
#include <queue>
#include <chrono>
#include <numeric>
#include <memory.h>
#include <map>
#include <math.h>
#include <utility>
#include <set>

#pragma warning(disable:4996)
using namespace std;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
typedef long long Int;
const double PI = 3.141592653589793238;
const Int INF = 999999999999;
typedef pair<int, int> P;

int S[3][3] = {
		{ 0, 1, 0 },
		{ 1, 1, 1 },
		{ 0, 1, 0 },
};
int M[3][3] = {
		{ 1, 1, 1 },
		{ 1, 1, 1 },
		{ 1, 1, 1 },
};
int L[5][5] = {
		{ 0, 0, 1, 0, 0 },
		{ 0, 1, 1, 1, 0 },
		{ 1, 1, 1, 1, 1 },
		{ 0, 1, 1, 1, 0 },
		{ 0, 0, 1, 0, 0 },
};

int tile[10][10];

int main()
{
	int x, y, size;
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		int a = 0;
		int b = 0;
		int a_ = 0;
		int b_ = 0;
		if (size == 1){
			while (x + a - 1 < 0)++a;
			while (y + b - 1 < 0)++b;
			while (x + 2 + a_ > 10)--a_;
			while (y + 2 + b_ > 10)--b_;

			for (int i = y - 1 + b; i < y + 2 + b_; ++i){
				for (int j = x - 1 + a; j < x + 2 + a_; ++j){
					tile[i][j] += S[i + 1 - y][j + 1 - x];
				}
			}
		}
		if (size == 2){
			while (x + a - 1 < 0)++a;
			while (y + b - 1 < 0)++b;
			while (x + 2 + a_ > 10)--a_;
			while (y + 2 + b_ > 10)--b_;

			for (int i = y - 1 + b; i < y + 2 + b_; ++i){
				for (int j = x - 1 + a; j < x + 2 + a_; ++j){
					tile[i][j] += M[i + 1 - y][j + 1 - x];
				}
			}
		}
		if (size == 3){
			while (x + a - 2 < 0)++a;
			while (y + b - 2 < 0)++b;
			while (x + 3 + a_ > 10)--a_;
			while (y + 3 + b_ > 10)--b_;

			for (int i = y - 2 + b; i < y + 3 + b_; ++i){
				for (int j = x - 2 + a; j < x + 3 + a_; ++j){
					tile[i][j] += L[i + 2 - y][j + 2 - x];
				}
			}
		}
	}
	int white = 0;
	int max_ = -1;

	REP(i, 10){
		REP(j, 10){
			if (!tile[i][j])
				++white;
			max_ = max(tile[i][j], max_);
		}
	}

	cout << white << endl << max_ << endl;

	return 0;

}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define F first
#define S second
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl

int main(){
	li dx[13]={ 0, -1,  1,  0,  0,  1,  1, -1, -1,  2, -2,  0,  0};
	li dy[13]={ 0,  0,  0, -1,  1,  1, -1,  1, -1,  0,  0,  2, -2};
	li lim[3]={ 5, 9, 13};
	
	li kami[10][10];
	rep(i,10)rep(j,10)kami[i][j]=0;
	
	int x,y,s;
	while(scanf("%d,%d,%d", &x, &y, &s)){
		rep(i,lim[s-1]){
			li nx=x+dx[i];
			li ny=y+dy[i];
			if(min(nx,ny)>=0 && max(nx,ny)<10)kami[nx][ny]++;
		}
		
	}
	
	li siro=0;
	li ma=0;
	
	rep(i,10){
		rep(j,10){
			ma=max(ma,kami[i][j]);
			if(kami[i][j]==0)siro++;
		}
	}
	cout<<siro<<endl<<ma<<endl;
	
	return 0;
}

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

typedef struct {
	int x, y;
}P;
vector<P> vs = {
	{0, -1}, { -1,0 }, { 0,0 }, { 0,1 }, { 1,0 }
};
vector<P> vm = {
	{-1,-1},{-1,0},{-1,1},{0,-1},{0,0},{0,1},{1,-1},{1,0},{1,1}
};
vector<P> vl = {
	{-2,0},{-1,-1},{-1,0},{-1,1},{0,-2},{0,-1},{0,0},{0,1},{0,2},{1,-1},{1,0},{1,1},{2,0}
};

bool ok(P p1, P p2) {
	int x = p1.x + p2.y;
	int y = p1.y + p2.y;
	return x >= 0 && x < 10 && y >= 0 && y < 10;
}

int s, p[10][10] = { 0 };
P c;

int main(){
	while (scanf("%d,%d,%d",&c.x, &c.y, &s) != EOF) {
		vector<P>::iterator itr = s == 1 ? vs.begin() : s == 2 ? vm.begin() : vl.begin();
		vector<P>::iterator e = s == 1 ? vs.end() : s == 2 ? vm.end() : vl.end();
		while (itr != e) {
			if (ok(c, *itr)) {
				p[c.x + itr->x][c.y + itr->y]++;
			}
			itr++;
		}
	}
	int sum = 0, b = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (p[i][j] > 0) {
				sum++;
				if (p[i][j] > b) {
					b = p[i][j];
				}
			}
		}
	}
	printf("%d\n%d\n", sum, b);

	return 0;
}

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

int main(){
    int grid[14][14];
    int s[4][2]={{0,-1},{0,1},{-1,0},{1,0}};
    int m[4][2]={{-1,-1},{-1,1},{1,-1},{1,1}};
    int l[4][2]={{0,-2},{0,2},{-2,0},{2,0}};
    int x, y, size;
    int i, j;
    int max=0;
    int blank=0;
    char comma;
    for(i=0;i<14;i++){
        for(j=0;j<14;j++){
            grid[i][j] = 0;
        }
    }
    while(cin >> x >> comma >> y >> comma >> size){
        x += 2;
        y += 2;
        grid[x][y] += 1;
        for(i=0;i<4;i++){
            grid[x+s[i][0]][y+s[i][1]] += 1;
        }
        if(size > 1){
            for(i=0;i<4;i++){
                grid[x+m[i][0]][y+m[i][1]] += 1;
            }
            if(size > 2){
                for(i=0;i<4;i++){
                    grid[x+l[i][0]][y+l[i][1]] += 1;
                }
            }
        }
    }
    for(i=2;i<12;i++){
        for(j=2;j<12;j++){
            if(grid[i][j] > max){
                max = grid[i][j];
            }else if(grid[i][j] == 0){
                blank += 1;
            }
        }
    }
    cout << blank << endl;
    cout << max << endl;
    return 0;
}