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 d[512];
#define N 10
#define M 20
int main( void )
{
  int x,y,s,a,mx=0,n=0;
  char c1,c2;
  int *p = d+256;
  while( 1 ){
    cin>>x>>c1>>y>>c2>>s;
    if( cin.eof() ) break;
    a = y*M+x;
    p[a]++; p[a-1]++; p[a+1]++; p[a+M]++; p[a-M]++;
    if( s > 1 ){ p[a+1+M]++; p[a-1+M]++; p[a+1-M]++; p[a-1-M]++; }
    if( s > 2 ){ p[a+2]++; p[a-2]++; p[a+2*M]++; p[a-2*M]++; }
  }
  for( y=0; y<N; y++ ) for( x=0; x<N; x++ ){
    a = p[y*M+x];
    if( mx < a ) mx = a;
    if( a == 0 ) n++;
  }
  cout << n << endl;
  cout << mx << endl;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool o(int a, int b){
  if(-1 < a && a < 10 && -1 < b && b < 10)
    return true;
  return false;
}

int main(){

  int paper[10][10];
  char a;
  int x,y,size;
  int num=0,most=0;

  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      paper[i][j] = 0;

  while(cin >> x >> a >> y >> a >> size){
    switch(size){
    case 1:
      if(o(x,y))paper[x][y]++;
      if(o(x+1,y))paper[x+1][y]++;
      if(o(x-1,y))paper[x-1][y]++;
      if(o(x,y+1))paper[x][y+1]++;
      if(o(x,y-1))paper[x][y-1]++;
      break;
    case 2:
      if(o(x,y))paper[x][y]++;
      if(o(x+1,y))paper[x+1][y]++;
      if(o(x-1,y))paper[x-1][y]++;
      if(o(x,y+1))paper[x][y+1]++;
      if(o(x,y-1))paper[x][y-1]++;
      if(o(x+1,y+1))paper[x+1][y+1]++;
      if(o(x-1,y-1))paper[x-1][y-1]++;
      if(o(x-1,y+1))paper[x-1][y+1]++;
      if(o(x+1,y-1))paper[x+1][y-1]++;
      break;
    case 3:
      if(o(x,y))paper[x][y]++;
      if(o(x+1,y))paper[x+1][y]++;
      if(o(x-1,y))paper[x-1][y]++;
      if(o(x,y+1))paper[x][y+1]++;
      if(o(x,y-1))paper[x][y-1]++;
      if(o(x+1,y+1))paper[x+1][y+1]++;
      if(o(x-1,y-1))paper[x-1][y-1]++;
      if(o(x-1,y+1))paper[x-1][y+1]++;
      if(o(x+1,y-1))paper[x+1][y-1]++;
      if(o(x+2,y))paper[x+2][y]++;
      if(o(x-2,y))paper[x-2][y]++;
      if(o(x,y+2))paper[x][y+2]++;
      if(o(x,y-2))paper[x][y-2]++;
      break;
    }
  }
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++){
      if(paper[i][j] == 0)
	num++;
      if(paper[i][j] > most)
	most = paper[i][j];
    }
  cout << num << endl << most << endl;

  return 0;
}

C++: #include <cstdio>

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size;
	int dx[] = { 0, 0,-1, 1,-1,-1, 1, 1, 0, 0,-2, 2};
	int dy[] = {-1, 1, 0, 0,-1, 1,-1, 1,-2, 2, 0, 0};
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		for (int i=0; i<size*4; i++) {
			int mx=x+dx[i];
			int my=x+dy[i];
			if (mx>=0&&mx<10&&my>=0&&my<10) {
				p[mx][my]++;
			}
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) {
				c++;
			} else if (p[i][j]>m) {
				m=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",c,m);
	return 0;
}

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

int main(){
	int x1[4] = {-1,0,0,1}, y1[4] = {0,1,-1,0};
	int x2[4] = {-1,-1,1,1}, y2[4] = {-1,1,-1,1};
	int x3[4] = {-2,0,0,2}, y3[4] = {0,-2,2,0};
	int p[10][10], x, y, s, nx, ny, maxl = 0, count = 0;
	for(int i = 0;i < 10;i++)
		for(int j = 0;j < 10;j++)p[i][j] = 0;
	char c;
	while(cin >> x >> c >> y >> c >> s){
		p[y][x]++;
		for(int i = 0;i < 4;i++){
			nx = x + x1[i];ny = y + y1[i];
			if(nx>=0&&nx<10&&ny>=0&&ny<10)p[ny][nx]++;
		}
		if(s > 1){
			for(int i = 0;i < 4;i++){
				nx = x + x2[i];ny = y + y2[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)p[ny][nx]++;
			}
			if(s == 3){
				for(int i = 0;i < 4;i++){
					nx = x + x3[i];ny = y + y3[i];
					if(nx>=0&&nx<10&&ny>=0&&ny<10)p[ny][nx]++;
				}
			}
		}
	}
	for(int i = 0;i < 10;i++){
		for(int j = 0;j < 10;j++){
			maxl = max(maxl, p[i][j]);
			if(!p[i][j])count++;
		}
	}
	cout << count << endl << maxl << endl;
	return 0; 
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)

int pa[10][10]={0};
int x,y,s;
char t;
int d=0,wh=0;

void foo(int x,int y){
	if(x>=0&&x<10&&y<10&&y>=0){
		pa[x][y]++;
	}
}


int main(){
	while(cin>>x>>t>>y>>t>>s){
		foo(x,y-1);
		foo(x,y+1);
		foo(x,y);
		foo(x+1,y);
		foo(x-1,y);
		if(s>1){
			foo(x+1,y+1);
			foo(x+1,y-1);
			foo(x-1,y-1);
			foo(x-1,y+1);
		}
		if(s>2){
			foo(x+2,y);
			foo(x-2,y);
			foo(x,y+2);
			foo(x,y-2);
		}
	}
	rep(i,10){
		rep(j,10){
			if(d<pa[i][j]){
				d = pa[i][j];
			}
			if(pa[i][j] ==0){
				wh++;
			}
		}
	}
	cout<<wh<<endl<<d<<endl;
	return 0;
	
}