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 <iostream>
#include <stdio.h>
using namespace std;
int m[14][14];

void small(int x,int y,int r) {
	m[x][y-r]++;
	m[x-r][y]++; m[x][y]++; m[x+r][y]++;
	m[x][y+r]++;
}
void middle(int x,int y) {
	for (int i=-1; i<2; i++) for (int j=-1; j<2; j++) m[x+i][y+j]++;
}
void large(int x,int y) {
	middle(x,y);
	small(x,y,2);
    m[x][y]--;
}

int main() {
	int x,y,n,i,j,h,k;
	while(scanf("%d,%d,%d",&x,&y,&n)) {
		x+=2; y+=2;
		if (n==1) small(x,y,1); 
		if (n==2) middle(x,y);
		if (n==3) large(x,y);
	}
    n=0; h=0; k=0;
	for (i=2;i<12;i++) for (j=2;j<12;j++) {
		if (m[i][j]==0) k++; else h=h<m[i][j] ? m[i][j] : h;
	}
    cout << k << endl << h << endl;
	return 0;
	}

C++: #include <bits/stdc++.h>
using namespace std;
int cnt[10][10];
int sx[]={-1,0,0,0,1},mx[]={-1,-1,-1,0,0,0,1,1,1},lx[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2};
int sy[]={0,1,0,-1,0},my[]={1,0,-1,1,0,-1,1,0,-1},ly[]={0,1,0,-1,2,1,0,-1,-2,1,0,-1,0};
bool isInside(int y,int x){
	if(y<0||10<=y)	return false;
	if(x<0||10<=x)	return false;
	return true;
}
int main(){
	memset(cnt,0,sizeof(cnt));
	int x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		switch(s){
			case 1:
				for(int i=0;i<5;i++){
					if(isInside(y+sy[i],x+sx[i]))	cnt[y+sy[i]][x+sx[i]]++;
				}
				break;
			case 2:
				for(int i=0;i<9;i++){
					if(isInside(y+my[i],x+mx[i]))	cnt[y+my[i]][x+mx[i]]++;
				}
				break;
			case 3:
				for(int i=0;i<13;i++){
					if(isInside(y+ly[i],x+lx[i]))	cnt[y+ly[i]][x+lx[i]]++;
				}
				break;
			case -1:
				goto end;
		}
	}
	end:;
	int big=0,blank=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(cnt[i][j]==0)	blank++;
			big=max(big,cnt[i][j]);
		}
	}
	cout<<blank<<endl;
	cout<<big<<endl;
	return 0;
}

C++: #include <cstdio>

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size;
	int dx[] = { 0, 0,-1, 1,-1,-1, 1, 1, 0, 0,-2, 2};
	int dy[] = {-1, 1, 0, 0,-1, 1,-1, 1,-2, 2, 0, 0};
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		for (int i=0; i<size*4; i++) {
			int mx=x+dx[i];
			int my=x+dy[i];
			if (mx>=0&&mx<10&&my>=0&&my<10) p[mx][my]++;
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) c++;
			else if (p[i][j]>m) m=p[i][j];
		}
	}
	scanf("%d\n%d\n",c,m);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int x[2000][2000], a, b, c, sum, maxn;
int main() {
	while (cin >> a >> b >> c) {
		for (int i = -c; i <= c; i++) {
			for (int j = -c; j <= c; j++) {
				if (a + i >= 0 && b + j >= 0) {
					if (i + j >= -c && i + j <= c) {
						x[a + i][b + j]++;
					}
				}
			}
		}
	}
	sum = 0;
	maxn = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (x[i][j] == 0) { sum++; }
			maxn = max(maxn, x[i][j]);
		}
	}
	cout << sum << endl << maxn << endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int bigx[4] = { 0, 2, 0, -2 };
	int bigy[4] = { 2, 0, -2, 0 };
	int smx[4] = {0,1,0,-1};
	int smy[4] = {1,0,-1,0};
	int midx[9] = { -1, -1, 0, 1, 1,  1,  0, -1 };
	int midy[9] = {  0,  1, 1, 1, 0, -1, -1, -1 };
	int map[10][10] = { 0 };
	int cnt = 100;
	int x, y, size;
	char s, d;
	int ma = 0;
	int c = 0;

	while (cin >> x >> s >> y >> d >> size){
		
		if (size == 1){
			map[y][x]++;
			for (int i = 0; i < 4; i++){
				
				int xx = smx[i] + x;
				int yy = smy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if (size == 2){
			map[y][x]++;
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}

		else if(size==3) {
			map[y][x]++;
			for (int i = 0; i < 4; i++){
				int xx = bigx[i] + x;
				int yy = bigy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[yy][xx]++;
				}
			}
		}
		/*for (int i = 0; i < 10; i++){
			for (int i2 = 0; i2 < 10; i2++){
				cout << map[i][i2] << " ";
			}cout << endl;
		}*/
	}
	for (int i = 0; i < 10; i++){
		for (int i2 = 0; i2 < 10; i2++){
			//cout << map[i][i2] << " ";
			if (map[i][i2] != 0){
				cnt--;
			}
			ma = max(ma, map[i][i2]);
		}//cout << endl;
	}
	cout << ma << endl;
	cout << cnt << endl;
}

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

int x,y,s;
int paper[10][10] = {0};

int sml[5][2] = { {0,0},{0,-1},{0,1},{-1,0},{1,0} };
int mid[9][2] = { {0,0},{-1,-1},{-1,0},{-1,1},{0,1},{1,1},{1,0},{1,-1},{0,-1} };
int big[13][2] = { {-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(int t){
	return t >= 0 && t < 10;
}

int main(){
	int deep = 0;
	int white = 100;
	while(scanf("%d,%d,%d",&x,&y,&s) == 3){
		if(s == 1){
			for(int i = 0; i < 5; i++){
				int tx = x + sml[i][0];
				int ty = y + sml[i][1];
				if(ok(tx) && ok(ty)){
					if(paper[tx][ty] == 0){
						white--;
					}
					paper[tx][ty]++;
					deep = max(deep,paper[tx][ty]);
				}
			}
		}
		else if(s == 2){
			for(int i = 0; i < 9; i++){
				int tx = x + mid[i][0];
				int ty = y + mid[i][1];
				if(ok(tx) && ok(ty)){
					if(paper[tx][ty] == 0){
						white--;
					}
					paper[tx][ty]++;
					deep = max(deep,paper[tx][ty]);
				}
			}
		}
		else if(s == 3){
			for(int i = 0; i < 13; i++){
				int tx = x + big[i][0];
				int ty = y + big[i][1];
				if(ok(tx) && ok(ty)){
					if(paper[tx][ty] == 0){
						white--;
					}
					paper[tx][ty]++;
					deep = max(deep,paper[tx][ty]);
				}
			}
		}
	}
	printf("%d\n%d\n",white,deep);

	return 0;
}