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\n", count, max)
}

C++: #include "bits/stdc++.h"
using namespace std;

int main(){
	int x,y,s;
	char b;
	int n=10;
	int x1[]={1,0,-1,0};
	int y1[]={0,1,0,-1};
	int x2[]={1,1,-1,-1};
	int y2[]={1,-1,1,-1};
	int x3[]={2,0,-2,0};
	int y3[]={0,2,0,-2};
	
	vector<vector<int> > a(n,vector<int>(n,0));
	while(cin>>x>>b>>y>>b>>s){
		//if(x==-1)break;
		a[x][y]++;
		for(int i=0;i<4;i++){
			if(x+x1[i]>-1&&y+y1[i]>-1&&x+x1[i]<10&&y+y1[i]<10){
				a[x+x1[i]][y+y1[i]]++;
			}
		}
		
		if(s>1){
				for(int i=0;i<4;i++){
				if(x+x2[i]>-1&&y+y2[i]>-1&&x+x2[i]<10&&y+y2[i]<10){
					a[x+x2[i]][y+y2[i]]++;
				}
			}
		}
		
		if(s>2){
				for(int i=0;i<4;i++){
				if(x+x3[i]>-1&&y+y3[i]>-1&&x+x3[i]<10&&y+y3[i]<10){
					a[x+x3[i]][y+y3[i]]++;
				}
			}
		}
	}
	int ans=0;
	int ans2=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)ans++;
			ans2=max(ans2,a[i][j]);
		}
	}
	
	cout<<ans<<" "<<ans2<<endl;
	return 0;
}

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