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>

#define SIZE 10

using namespace std;

int map[SIZE][SIZE];

void drop(int x, int y) {
	if (x < 0 || y < 0 || x >= SIZE || y >= SIZE) return;

	map[x][y]++;
	return;
}

int main() {
	int x, y, s, count = 0, most = 0;
	char e;
	while (cin>>x>>e>>y>>e>>s) {
		x--;
		y--;
		drop(x, y);
		drop(x, y + 1);
		drop(x + 1, y);
		drop(x, y - 1);
		drop(x - 1, y);

		if (s > 1) {
			drop(x + 1, y + 1);
			drop(x + 1, y - 1);
			drop(x - 1, y - 1);
			drop(x - 1, y + 1);

			if (s > 2) {
				drop(x, y + 2);
				drop(x, y - 2);
				drop(x + 2, y);
				drop(x - 2, y);
			}
		}
	}

	for (int i = 0; i < SIZE; i++) {
		for (int j = 0; j < SIZE; j++) {
			if (map[i][j] > most) {
				most = map[i][j];
			}

			if (map[i][j] == 0) {
				count++;
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
bool in(int x,int y){
  if(x<0||x>9||y<0||y>9) return false;
  return true;
}
int main(){
  int pa[10][10]={{}};
  string str;
  int i,j;
  while(cin >> str){
    int x=str[0]-'0',y=str[2]-'0',s=str[4]-'0';
    if(s==1){
      for(i=-1;i<=1;i++){
	for(j=-1+abs(i);j<=1-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==2){
      for(i=-1;i<=1;i++){
	for(j=-1;j<=1;j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==3){
      for(i=-2;i<=2;i++){
	for(j=-2+abs(i);j<=2-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }
  }
  int o=0,m=0;
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      //cout << pa[i][j];
      m=max(m,pa[i][j]);
      if(pa[i][j]==0) o++;
    }
    //cout << endl;
  }
  cout << o << endl << m << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <sstream>
using namespace std;
int G[10][10],mx;
bool in(int x,int y){
  if(0<=x && x < 10 && 0<=y && y < 10)return true;
  else return false;
}
void m(int x,int y,int size)
{
  G[x][y]++;
  if(size == 1){
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
  } else if(size == 2){
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
    if(in(x-1,y-1))G[x-1][y-1]++;
    if(in(x+1,y+1))G[x+1][y+1]++;
    if(in(x-1,y+1))G[x-1][y+1]++;
    if(in(x+1,y-1))G[x+1][y-1]++;
  } else {
    if(in(x,y+1))G[x][y+1]++;
    if(in(x,y-1))G[x][y-1]++;
    if(in(x+1,y))G[x+1][y]++;
    if(in(x-1,y))G[x-1][y]++;
    if(in(x-1,y-1))G[x-1][y-1]++;
    if(in(x+1,y+1))G[x+1][y+1]++;
    if(in(x-1,y+1))G[x-1][y+1]++;
    if(in(x+1,y-1))G[x+1][y-1]++;
    if(in(x+2,y))G[x+2][y]++;
    if(in(x-2,y))G[x-2][y]++;
    if(in(x,y+2))G[x][y+2]++;
    if(in(x,y-2))G[x][y-2]++;
  }
}
int main(){
  char d;
  int a,b,c;
  mx = 0;
  fill(G[0],G[10],0);
  while(cin >> a >> d >> b >> d >>c  ){
    m(a,b,c);
  }
  int cnt = 0;
  for(int i = 0 ; i < 10 ; i++ ){
    for(int j = 0 ; j < 10 ; j++ ){
      if(G[j][i] > mx)mx = G[j][i];
      if(G[j][i] == 0)cnt++;
    }
  }
  cout << cnt << endl;
  cout << mx << endl;
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>

int main()
{
	int table[10][10] = { { 0 } };
	int x, y, size;
	while (scanf("%d,%d,%d", &x,&y, &size) != EOF)
	{
		switch (size)
		{
		case 1:
		{
			table[y][x]++;
			if (x - 1 >= 0)table[y][x - 1]++;
			if (x + 1 <= 9)table[y][x + 1]++;
			if (y - 1 >= 0)table[y - 1][x]++;
			if (y + 1 <= 9)table[y + 1][x]++;
		}break;
		case 2:
		{
			table[y][x]++;
			if (x - 1 >= 0)
			{
				table[y][x - 1]++;
				if (y - 1 >= 0)table[y - 1][x - 1]++;
				if (y + 1 <= 9)table[y + 1][x - 1]++;

			}
			if (x + 1 <= 9)
			{
				table[y][x + 1]++;
				if (y - 1 >= 0)table[y - 1][x + 1]++;
				if (y + 1 <= 9)table[y + 1][x + 1]++;
			}
			if (y - 1 >= 0)table[y - 1][x]++;
			if (y + 1 <= 9)table[y + 1][x]++;
		}break;
		default:
		{
			table[y][x]++;
			if (x - 1 >= 0)
			{
				table[y][x - 1]++;
				if (y - 1 >= 0)table[y - 1][x - 1]++;
				if (y + 1 <= 9)table[y + 1][x - 1]++;
				if (x - 2 >= 0)table[y][x - 2]++;
			}
			if (x + 1 <= 9)
			{
				table[y][x + 1]++;
				if (y - 1 >= 0)table[y - 1][x + 1]++;
				if (y + 1 <= 9)table[y + 1][x + 1]++;
				if (x + 2 <= 9)table[y][x + 2]++;
			}
			if (y - 1 >= 0)
			{
				table[y - 1][x]++;
				if (y - 2 >= 0)table[y - 2][x]++;
			}
			if (y + 1 <= 9)
			{
				table[y + 1][x]++;
				if (y + 2 <= 9)table[y + 2][x]++;
			}
		}break;
		}
	}
	int cnt=0, i, j, max = 0;
	for (j = 0; j < 10; j++)
	{
		for (i = 0; i < 10; i++)
		{
			if (table[j][i] > max)max = table[j][i];
			if (table[j][i] == 0)cnt++;
		}
	}
	printf("%d\n%d\n", max, cnt);
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int x,y,a;
  char d;
  int in[10][10]={0};
  while(cin>>x>>d>>y>>d>>a){
    if(a==1){
      loop(i,-1,2){
	loop(j,-1,2){
	  if(i&&j)continue;
	  if(y+i>=0 &&y+i<10 && x+j>=0&&x+j<10)in[y+i][x+j]++;
	}
      }
    }else if(a==2){
      loop(i,-1,2){
	loop(j,-1,2){
	  if(y+i>=0 &&y+i<10 && x+j>=0&&x+j<10)in[y+i][x+j]++;
	}
      }
    }else if(a==3){
      loop(i,-2,3){
	loop(j,-2,3){
	  if(abs(i)+abs(j)>2)continue;
	  if(y+i>=0 &&y+i<10 && x+j>=0&&x+j<10)in[y+i][x+j]++;
	}
      }
    }
  }
  int co=0;
  int max=0;
  rep(i,10){
    rep(j,10){
      if(!in[i][j])co++;
      if(max<in[i][j])max=in[i][j];
    }
  }
  cout<<co<<endl<<max<<endl;
}