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>
using namespace std;

int small[3][3] = {0, 1, 0,
		   1, 1, 1,
		   0, 1, 0};
int normal[3][3] = {1, 1, 1,
		    1, 1, 1,
		    1, 1, 1};
int big[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 map[10][10];
int x, y, size;
int white = 0;
int black = 0;

int main(){
	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		switch(size){
			case 1:
				for(int i = 0; i < 3; i++){
					for(int j = 0; j < 3; j++){
						map[x-1+i][y-1+j] += small[i][j];
					}
				}
				break;
			case 2:
				for(int i =0; i < 3; i++){
					for(int j=0; j < 3; j++){
						map[x-1+i][y-1+j] += normal[i][j];
					}
				}
				break;
			case 3:
				for(int i=0; i < 5; i++){
					for(int j=0; j < 5; j++){
						map[x-2+i][y-2+j] += big[i][j];
					}
				}
				break;
		}
	}
	for(int i=0; i < 10; i++){
		for(int j=0; j < 10; j++){
			if(map[i][j] == 0) white++;
			black = max(black, map[i][j]);
		}
	}

	cout << white << endl;
	cout << black << endl;

}

C++: #include <iostream>
#include<algorithm>
using namespace std;
int map[11][11];
int dx[] = { 0, 0, 0, 1, -1, 1, 1, -1, -1, 0, 0, 2, -2 };
int dy[] = { 0, 1, -1, 0, 0, -1, 1, 1, -1, 2, -2, 0, 0 };
int ma;

int main(){
	int x, y, size;
	char c;
	while (cin >> x >> c >> y >> c >> size){
		for (int i = 0; i < size * 4 + 1; i++){
			int xx = x + dx[i];
			int yy = y + dy[i];
			if (xx < 0 || xx >= 10 || yy < 0 || yy >= 10) continue;
			map[yy][xx]++;
			ma = max(ma, map[yy][xx]);
		}
	}
	int cnt = 0;
	for (int i = 1; i <= 10; i++){
		for (int i2 = 1; i2 <= 10; i2++){
			if (map[i][i2] == 0){
				cnt++;
			}
		}
	}
	cout << cnt << endl;
	cout <<ma << endl;
	return 0;
}

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

int dx[12] = { 1,0,-1,0,1,-1,-1,1,2,0,-2,0 };
int dy[12] = { 0,-1,0,1,-1,-1,1,1,0,-2,0,2 };

int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	vector<vector<int>> paper(10, vector<int>(10, 0));
	int x, y, s; char c;
	int b = 100, m = 0;
	while (cin >> x >> c >> y >> c >> s) {
		if (paper[x][y] == 0) b--;
		//paper[x][y]++;
		m = max(++paper[x][y], m);
		int l;
		if (s == 1) l = 4;
		else if (s == 2)l = 8;
		else l = 12;

		for (int i = 0; i < l;i++) {
			if (x + dx[i] < 0 || x + dx[i] > 9 || y + dy[i] < 0 || y + dy[i] > 9) continue;
			if (paper[x + dx[i]][y + dy[i]] == 0)b--;
			m = max(++paper[x + dx[i]][y + dy[i]],m);
		}
	}
	cout << b << endl << m << endl;
}

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

int main(){
	int x,y,size;
	int map[10][10] = {};
	char a,b;
	while(cin >> x >> a >> y >> b >> size){
		map[x][y] += 1;
		if(size == 1){
			for(int i=-1;i<=1;i++){
				if(i==0) continue;
				else{
					if(x+i > -1 && x+i < 10) map[x+i][y]++;
					else if(y+i > -1 && y+i < 10) map[x][y+i]++;
				}
			}
		}
		else if(size == 2){
			for(int i=-1;i<=1;i++){
				for(int j=-1;j<=1;j++){
					if(i==0&&j==0) continue;
					else {
						if(x+i > -1 && x+i < 10 && y+i > -1 && y+i < 10) map[x+i][y+j]++;
					}
				}
			}
		}
		else if(size == 3){
			for(int i=-1;i<=1;i++){
				for(int j=-1;j<=1;j++){
					if(i==0&&j==0) continue;
					else if(x+i < 0 && x+i > 10 && y+j < 0 && y+j > 10) continue;
					else {
						map[x+i][y+j] += 1;
						if(i == -1 && j == 0){
							if(x+i+i > -1 && y+j+j > -1){
								map[x+i+i][y+j+j]++;
							}
						}
						else if(i == 0 && j == -1){
							if(y+j+j > -1){
								map[x][y+j+j]++;
							}
						}
						else if(i==0 && j == 1){
							if(y+j+j < 10){
								map[x][y+j+j]++;
							}
						}
						else if(i==1 && j==0){
							if(x+i+i < 10 && y+j+j < 10){
								map[x+i+i][y+j+j]++;
							}
						}

					}
				}
			}
		}
	}
	int ecount = 0,tmp = 0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(map[i][j] == 0) ecount++;
			else if(map[i][j] > 0){
				if(map[i][j] > tmp){
					tmp = map[i][j];
				}
			}
		}
	}
	cout << ecount << endl;
	cout << tmp << endl;
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>

using namespace std;

int main(){
	int a[14][14];
	int i; int ii; int kosuu = 0; int mol = 0;
	for (i = 0; i <= 13; i++){
		for (ii = 0; ii <= 13; ii++){
			a[i][ii] = 0;
		}
	}
	int x = 0; int y = 0; int size = 0;
	while (scanf("%d,%d,%d", &x, &y, &size) > 0){
		int xx = x + 2; int yy = y + 2;

		if (size == 1){
			a[xx][yy] = a[xx][yy] + 1;
			a[xx+1][yy] = a[xx+1][yy] + 1;			a[xx-1][yy] = a[xx-1][yy] + 1;			a[xx][yy+1] = a[xx][yy+1] + 1;			a[xx][yy-1] = a[xx][yy-1] + 1;
		}

		if (size == 2){
			for (i = 0; i <= 2; i++){
				for (ii = 0; ii <= 2; ii++){
					a[xx + i - 1][yy + ii - 1] = a[xx + i - 1][yy + ii - 1] + 1;
				}
			}
		}

		if (size == 3){
			for (i = 0; i <= 2; i++){
				for (ii = 0; ii <= 2; ii++){
					a[xx + i - 1][yy + ii - 1] = a[xx + i - 1][yy + ii - 1] + 1;
				}
			}
			a[xx + 2][yy] = a[xx + 2][yy] + 1;			a[xx - 2][yy] = a[xx - 2][yy] + 1;			a[xx][yy + 2] = a[xx][yy + 2] + 1;			a[xx][yy - 2] = a[xx][yy - 2] + 1;
		}
		/*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0026&lang=jp */
	}
	for (i = 2; i <= 11; i++){
		for (ii = 2; ii <= 11; ii++){
			if (a[i][ii] == 0){
				kosuu = kosuu + 1;
			}
			if (a[i][ii] > mol){
				mol = a[i][ii];
			}
		}
	}
	cout << kosuu << endl;
	cout << mol << endl;
	return  0;
}

C++: #include<iostream>
using namespace std;
int a[10][10]={0};

void small(int x,int y){
	a[x][y]++;
	if(x!=0)a[x-1][y]++;
	if(x!=9)a[x+1][y]++;
	if(y!=0)a[x][y-1]++;
	if(y!=9)a[x][y+1]++;
}

void middle(int x,int y){
	small(x,y);
	if(x!=0&&y!=0)a[x-1][y-1]++;
	if(x!=9&&y!=0)a[x+1][y-1]++;
	if(x!=0&&y!=9)a[x-1][y+1]++;
	if(x!=9&&y!=9)a[x+1][y+1]++;
}

void large(int x,int y){
	middle(x,y);
	if(x>=2)a[x-2][y]++;
	if(x<=7)a[x+2][y]++;
	if(y>=2)a[x][y-2]++;
	if(y<=7)a[x][y+2]++;
}

int main(){
	
	int x,y,z;
	while(cin>>x>>y>>z){
		if(z==1){small(x,y);}
		if(z==2){middle(x,y);}
		if(z==3){large(x,y);}
	}
	int white=0,koi=0;
	for(int i=0;i<=9;i++){
		for(int j=0;j<=9;j++){
			if(a[i][j]==0)white++;
			if(a[i][j]>koi)koi=a[i][j];
		}
	}
	cout<<white<<endl<<koi;
}