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

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