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

int pa[20][20];

int main(void)
{
	int x,y,c;

	while(true){
		cin >> x;
		if(cin.eof())
			break;
		cin.get();
		cin >> y;
		cin.get();
		cin >> c;

		if(c == 1){
			for(int i = -1; i <= 1; i++){
				pa[y][x-i]++;
				pa[y-i][x]++;

			}
			pa[y][x]--;
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
		}
		else if(c == 3){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
			pa[y+2][x+2]++;
			pa[y+2][x-2]++;
			pa[y-2][x-2]++;
			pa[y-2][x+2]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 1; i <= 10; i++){
		for(int j = 1; j <= 10; j++){
			if(pa[i][j])
				count++;
			if(max < pa[i][j])
				max = pa[i][j];
		}
	}
	count = 100 - count;
	cout << count << endl << max << endl;


	return 0;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>
#include <string>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/
int field[10][10];
/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	int x_ax;
	int y_ax;
	int size;
	int s_y_table[] = {-1,0,1,0};
	int s_x_table[] = {0,1,0,-1};
	int m_y_table[] = {-1,-1,0,1,1,1,0,-1};
	int m_x_table[] = {0,1,1,1,0,-1,-1,-1};
	int l_y_table[] = {-2,-1,-1,0,0,1,2,1,1,0,0,-1};
	int l_x_table[] = {0,0,1,2,1,1,0,0,-1,-2,-1,-1};
	int max;
	int white;
	/*****処理部*****/
	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++)
			field[i][j] = 0;
	while(1){
		if(cin.eof())	break;
		scanf("%d,%d,%d",&x_ax,&y_ax,&size);
		switch(size){
		case 1:
			for(int i=0;i<4;i++)
				if((y_ax + s_y_table[i] < 0 || y_ax + s_y_table[i] > 9) && (x_ax + s_x_table[i] < 0 || x_ax + s_x_table[i] > 9))
					field[y_ax + s_y_table[i]][x_ax + s_x_table[i]] += 1;
			break;
		case 2:
			for(int i=0;i<8;i++)
				if((y_ax + s_y_table[i] < 0 || y_ax + s_y_table[i] > 9) && (x_ax + s_x_table[i] < 0 || x_ax + s_x_table[i] > 9))
					field[y_ax + s_y_table[i]][x_ax + s_x_table[i]] += 1;
			break;
		case 3:
			for(int i=0;i<11;i++)
				if((y_ax + s_y_table[i] < 0 || y_ax + s_y_table[i] > 9) && (x_ax + s_x_table[i] < 0 || x_ax + s_x_table[i] > 9))
					field[y_ax + s_y_table[i]][x_ax + s_x_table[i]] += 1;
			break;
		}
	}
	max = 0;
	white = 0;
	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++){
			if(field[i][j] > max)
				max = field[i][j];
			if(field[i][j] == 0)
				white += 1;
		}
	cout << white << endl;
	cout << max << endl;
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}