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++: #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 (!cin.eof()){
		scanf("%d,%d,%d", &x, &y, &size);
		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;
}
//14*14????????????????????§?¨???????2??????11 size?????¢??°?????????

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=10000009;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };
int dx2[4] = { 0,-2,0,2 };
int dy2[4] = { -2,0,2,0 };
int m[15][15];
int main() {
	int x[10000],y[10000],z[10000];
	char s,t;
	int count=0,M=0;
	int n=0;
	while(true){
		cin>>x[n]>>s>>y[n]>>t>>z[n];
		if (cin.eof())break;
		n++;
	}
	n--;
	//cout<<n<<endl;
	for(int i=0;i<=n;i++){
		if(z[i]==1){
			m[y[i]][x[i]]++;
			for(int j=0;j<4;j++){
				if(value(y[i]+dy[j],x[i]+dx[j],10,10)){
					m[y[i]+dy[j]][x[i]+dx[j]]++;
				}
			}
		}
		else if(z[i]==2){
			for(int j=-1;j<=1;j++){
				for(int k=-1;k<=1;k++){
					if(value(y[i]+k,x[i]+j,10,10)){
						m[y[i]+k][x[i]+j]++;
					}
				}
			}
		}
		else{
			for(int j=-1;j<=1;j++){
				for(int k=-1;k<=1;k++){
					if(value(y[i]+k,x[i]+j,10,10)){
						m[y[i]+k][x[i]+j]++;
					}
				}
			}
			for(int j=0;j<4;j++){
				if(value(y[i]+dy2[j],x[i]+dx2[j],10,10)){
					m[y[i]+dy2[j]][x[i]+dx2[j]]++;
				}
			}
		}
		/*for(int i=0;i<10;i++){
			for(int j=0;j<10;j++){
				cout<<m[i][j]<<" ";
			}
			cout<<endl;
		}*/
	}
	for(int i=0;i<=9;i++){
		for(int j=0;j<=9;j++){
			if(m[i][j]==0) count++;
			if(m[i][j]>M) M=m[i][j];
		}
	}
	cout<<count<<endl;
	cout<<M<<endl;
}

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

void drop(int x,int y){
  if(x<0&&x>9&&y<0&&y>9)map[x][y]++;
  return;
}

int main(){
  int x,y,s;
 
  while(scanf("%d,%d,%d",&x,&y,&s)){
    // if(x==-1)break;
    drop(x,y);
    drop(x+1,y);
    drop(x-1,y);
    drop(x,y+1);
    drop(x,y-1);
    if(s==2||s==3){
      drop(x+1,y+1);
      drop(x+1,y-1);
      drop(x-1,y+1);
      drop(x-1,y-1);
    }
    if(s==3){
      drop(x+2,y);
      drop(x-2,y);
      drop(x,y+2);
      drop(x,y-2);
    }
  }
  int max=0;
  int white=0;
  for(int i=0;i<10;i++){
    for(int j=0;i<10;j++){
      if(map[i][j]==0)white++;
      if(map[i][j]>max)max=map[i][j];
    }
  }
  cout<<white<<endl<<max;
}

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




int main()
{
	int area[10][10] = {0};
	int x,nx,ny,y,size;
	int count = 0;
	int max = 0;
	char ch1,ch2;
	while(cin >> x >>ch1>> y >>ch2>> size){
		nx=x+2;
		ny=y+2;
		switch (size){
		case 3:
			area[nx-2][ny]++;
			area[nx+2][ny]++;
			area[nx][ny-2]++;
			area[nx][ny+2]++;
		case 2:
			area[nx-1][ny-1]++;
			area[nx+1][ny-1]++;
			area[nx-1][ny+1]++;
			area[nx+1][ny+1]++;
		case 1:
			area[nx-1][ny]++;
			area[nx+1][ny]++;
			area[nx][ny-1]++;
			area[nx][ny+1]++;
		}
		area[nx][ny]++;
	}

	for (int i=2;i<12;i++){
		for (int j=2;j<12;j++){
			if (area[i][j]==0){
				count++;
			}
			if(max<area[i][j]){
				max=area[i][j];
			}
		}
	}
	
	cout << count <<endl;
	cout << max << endl;


	return 0;
}

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

int main() {
	int paper[10][10] = {0};
	int paint[][2] = { {0,-1}, {-1,0},{0,0},{1,0},{0,1},{-1,-1},{1,-1},{-1,1},{1,1},{0,-2},{-2,0},{2,0},{0,2}};
	int size[]={ 0,5,9,13 };
	int x, y, z;
	char dommy;
	int time;
	while (cin >> x >> dommy >> y >> dommy >> z) {
		for (int i = 0; i < size[z]; ++i) {
			if (x + paint[i][0] >= 0 && x + paint[i][0] < 10 && y + paint[i][1] >= 0 && y + paint[i][1] < 10) {
				++paper[x + paint[i][0]][y + paint[i][1]];
			}
		}
	}
	int answer=0, max=0;
	for (int i = 0; i < 10; ++i) {
		for (int i2 = 0; i2 < 10; ++i2) {
			if (paper[i][i2] == 0)++answer;
			else if (max < paper[i][i2]) {
				max = paper[i][i2];
			}
		}
	}
	cout << answer << endl << max << endl;
	return 0;
}