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<cstdio>
#include<cmath>
#include <string> 
using namespace std;

int main(){
	int x,y,board[10][10],c=0,k=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			board[i][j]=0;
		}
	}	
	char input[5];
	while( scanf("%s",&input)!=EOF){
		x=input[0]-'0';
		y=input[2]-'0';
		if(input[4]=='1'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
		}
		if(input[4]=='2'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
			board[x+1][y+1]++;
			board[x-1][y-1]++;
			board[x-1][y+1]++;
			board[x+1][y-1]++;
		}
		if(input[4]=='3'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
			board[x+1][y+1]++;
			board[x-1][y-1]++;
			board[x-1][y+1]++;
			board[x+1][y-1]++;
			board[x+2][y]++;
			board[x-2][y]++;
			board[x][y+2]++;
			board[x][y-2]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(board[i][j]==0){
				c++;
			}
			if(board[i][j]>k){
				k=board[i][j];
				x=i;
				y=j;
			}
		}
	}
	printf("%d\n%d\n",c,k);
	
			
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<stdio.h>
int main(){
	int x,y,size;
	std::vector<std::vector<int> > vec(10,std::vector<int>(10,0));
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
	}
	std::cout<<no<<std::endl;
	sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;
	return 0;
}

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

int main(void){

  int map[10][10] = {{0,0}};

  int x,y,s,white = 0,maxi = 0;
  char c1,c2;

  while(cin >> x >> c1 >> y >> c2 >> s){

    if(s == 1){
      map[x][y]++;
      (x+1 <= 9) ? map[x+1][y]++ : map[x+1][y]+=0;
      (y+1 <= 9) ? map[x][y+1]++ : map[x][y+1]+=0;
      (x-1 >= 0) ? map[x-1][y]++ : map[x-1][y]+=0;
      (y-1 >= 0) ? map[x][y-1]++ : map[x][y-1]+=0;
    }

    if(s == 2){
      map[x][y]++;
      (x+1 <= 9) ? map[x+1][y]++ : map[x+1][y]+=0;
      (y+1 <= 9) ? map[x][y+1]++ : map[x][y+1]+=0;
      (x-1 >= 0) ? map[x-1][y]++ : map[x-1][y]+=0;
      (y-1 >= 0) ? map[x][y-1]++ : map[x][y-1]+=0;
      (x+1 <= 9 && y+1 <= 9) ? map[x+1][y+1]++ : map[x+1][y+1]+=0;
      (x-1 >= 0 && y+1 <= 9) ? map[x-1][y+1]++ : map[x-1][y+1]+=0;
      (x+1 <= 9 && y-1 >= 0) ? map[x+1][y-1]++ : map[x+1][y-1]+=0;
      (x-1 >= 0 && y-1 >= 0) ? map[x-1][y-1]++ : map[x-1][y-1]+=0;

    }

    if(s == 3){
      map[x][y]++;
      (x+1 <= 9) ? map[x+1][y]++ : map[x+1][y]+=0;
      (y+1 <= 9) ? map[x][y+1]++ : map[x][y+1]+=0;
      (x-1 >= 0) ? map[x-1][y]++ : map[x-1][y]+=0;
      (y-1 >= 0) ? map[x][y-1]++ : map[x][y-1]+=0;
      (x+1 <= 9 && y+1 <= 9) ? map[x+1][y+1]++ : map[x+1][y+1]+=0;
      (x-1 >= 0 && y+1 <= 9) ? map[x-1][y+1]++ : map[x-1][y+1]+=0;
      (x+1 <= 9 && y-1 >= 0) ? map[x+1][y-1]++ : map[x+1][y-1]+=0;
      (x-1 >= 0 && y-1 >= 0) ? map[x-1][y-1]++ : map[x-1][y-1]+=0;
      (x+2 <= 9) ? map[x+2][y]++ : map[x+2][y]+=0;
      (y+2 <= 9) ? map[x][y+2]++ : map[x][y+2]+=0;
      (x-2 >= 0) ? map[x-2][y]++ : map[x-2][y]+=0;
      (y-2 >= 0) ? map[x][y-2]++ : map[x][y-2]+=0;
    }    
  }
  maxi = map[0][0];
  for(int i = 0;i < 10;i++){
    for(int j = 0;j < 10;j++){
      if(map[i][j] == 0){
        white++;
      }
      if(maxi < map[i][j]){
        maxi = map[i][j];
      }
    }
  }
  cout << white << endl << maxi << endl;
  return 0;
}

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

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

int main(){
	int x, y, s;
	int board[10][10] = {{0}};
	while( ~scanf("%d,%d,%d", &x, &y, &s) ){
		if( s == 3 ){
			for(int i=-2; i<3; i++){
				for(int j=-2; j<3; j++){
					if( abs(i)+abs(j) < 3 && 0 <= x+j && x+j < 10 && 0 <= y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}else if( s == 2 ){
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( 0 <= x+j && x+j < 10 && 0 <= y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}else{
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( abs(i)+abs(j) < 2 && 0 <= x+j && x+j < 10 && 0 <= y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}
	}
	int max_c = 0, white = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if( board[i][j] == 0 ) white++;
			max_c = max(max_c, board[i][j]);
		}
	}
	cout << white << endl;
	cout << max_c << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)

using namespace std;

int main(void){
	int a[14][14]={};
	int x,y,size;
	int s,m;
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		x+=2;
		y+=2;
		a[x][y]++;
		a[x-1][y]++;
		a[x+1][y]++;
		a[x][y-1]++;
		a[x][y+1]++;
		if (size>1){
			a[x-1][y-1]++;
			a[x+1][y-1]++;
			a[x-1][y+1]++;
			a[x+1][y+1]++;
			if (size>2){
				a[x-2][y]++;
				a[x+2][y]++;
				a[x][y-2]++;
				a[x][y+2]++;
			}
		}
	}

	s=0; m=0;
	FOR(i,2,11){
		FOR(j,2,11){
			if (a[i][j]==0)
				s++;
			if (a[i][j]>m)
				m=a[i][j];
		}
	}
	cout << s << endl << m << endl;



	return 0;
}