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++: #include<iostream>
using namespace std;

int main() {
	int pap[10][10] = {};
	int x, y, s;
	int ca = 0;
	int p = 0;
	while (scanf("%d,%d,%d", &x, &y, &s)+1) {

		if (s == 1) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }

			if (s == 2) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }

			if (s == 3) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }
			if (x + 2 < 10) { pap[x + 2][y] += 1; }
			if (x - 2 > -1) { pap[x - 2][y] += 1; }
			if (y + 2 < 10) { pap[x][y + 2] += 1; }
			if (y - 2 > -1) { pap[x][y - 2] += 1; }
		
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 10; j++) {
					if (pap[i][j] == 0) { ca++; }
					if (p < pap[i][j]) { p = pap[i][j]; }
				}
			}
	}
	cout << ca << endl << p << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int field[30][30] = {0};
  int x,y,c;
  while(scanf("%d,%d,%d",&x,&y,&c)!=EOF){
    field[x+10][y+10]++;
    field[x+10][y+9]++;
    field[x+10][y+11]++;
    field[x+9][y+10]++;
    field[x+11][y+10]++;
    if(c>1){
      field[x+11][y+9]++;
      field[x+11][y+11]++;
      field[x+9][y+9]++;
      field[x+9][y+11]++;
    }
    if(c>2){
      field[x+8][y+10]++;
      field[x+12][y+10]++;
      field[x+10][y+8]++;
      field[x+10][y+12]++;
    }
  }
  int a = 0,b = 0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(field[i+10][j+10] == 0) a++;
      if(field[i+10][j+10] > b) b = field[i+10][j+10];
    }
  }
  cout <<a<<endl<<b<<endl;
  return 0;
}

C++: #include <iostream>

using namespace std;
int Field[14][14];
int move_x[] = {-1, 0, 1,  0, -1,  1,  1, -1, -2, 0, 2,  0};
int move_y[] = { 0, 1, 0, -1,  1,  1, -1, -1,  0, 2, 0, -2};


void solve()
{
	int ax, ay, at;
	while(~scanf("%d%*c%d%*c%d", &ax, &ay, &at))
	{
		int size = at * 4;
		Field[ax + 2][ay + 2]++;
		for(int i = 0; i < size; ++i)
		{
			int X = ax + move_x[i] + 2;
			int Y = ay + move_y[i] + 2;
			Field[X][Y]++;
		}
	}
	int count = 0;
	int deepest = 0;
	for(int i = 2; i < 12; ++i)
	{
		for(int j = 2; j < 12; ++j)
		{
			if(Field[i][j] > 0)
			{
				if(deepest < Field[i][j])
				{
					deepest = Field[i][j];
				}
			}
			else
			{
				count++;
			}
		}
	}
	cout << count << endl << deepest << endl;
}

int main()
{
	solve();
	return(0);
}

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

int main()
{
  int x, y, size;
  int canvas[10][10];
  int emp, max;
  char comma;
  int i, j;

  for(i=0; i<10; i++){
    for(j=0; j<10; j++) canvas[i][j]=0;
  }
  while(cin >> x >> comma >> y >> comma >> size){
    if(x>0) canvas[x-1][y]++;
    if(x<9) canvas[x+1][y]++;
    if(y>0) canvas[x][y-1]++;
    if(y<9) canvas[x][y+1]++;
    if(size>1){
      for(i=-1; i<=1; i+=2){
        for(j=-1; j<=1; j+=2){
          if(x+i>=0 && x+i<=9 && y+j>=0 && y+j<=9) canvas[x+i][y+j]++;
        }
      }
    }
    if(size>2){
      if(x>1) canvas[x-2][y]++;
      if(x<8) canvas[x+2][y]++;
      if(y>1) canvas[x][y-2]++;
      if(y<8) canvas[x][y+2]++;
    }
  }
  emp=0; max=0;
  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(canvas[i][j]==0) emp++;
      if(max<canvas[i][j]) max=canvas[i][j];
    }
  }
  printf("%d\n%d\n", emp, max);

  return 0;
}

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

int main(){
	int area[14][14];
	int x, y;
	char a, b;
	int size;
	for(int i = 0; i < 14; i++){
		for(int j = 0; j < 14; j++){
			area[i][j] = 0;
		}
	}
	while(cin >> x >> a >> y >> b >> size){
		x += 2;
		y += 2;
		area[x][y]++;
		area[x+1][y]++;
		area[x-1][y]++;
		area[x][y+1]++;
		area[x][y-1]++;
		if(size >= 2){
			area[x+1][y+1]++;
			area[x+1][y-1]++;
			area[x-1][y-1]++;
			area[x-1][y+1]++;
			if(size == 3){
				area[x+2][y]++;
				area[x-2][y]++;
				area[x][y+2]++;
				area[x][y-2]++;
			}
		}
	}
	int count = 0;
	int kmax = 0;
	for(int i = 2; i < 12; i++){
		for(int j = 2; j < 12; j++){
			if(area[i][j] == 0) count++;
			kmax = max(kmax, area[i][j]);
		}
	}
	cout << count << endl;
	cout << kmax << endl;
	return 0;
}

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

int main(){

  int a[1000][1000] = {0};
  int x,y,z;
  int count = 0,kosa = 0;
  char s,t;

  while(cin >> x >> s >> y >> t >> z){

    if(z == 1){
      for(int i=x-1;i<x+2;i++) a[i][y]++;
      a[x][y+1]++;
      a[x][y-1]++;
    }

    if(z == 2){
      for(int i=x-1;i<x+2;i++){
	for(int j=y-1;j<y+2;j++) a[i][j]++;
      }
    }

    if(z == 3){
      for(int i=x-1;i<x+2;i++){
	a[i][y+1]++;
	a[i][y-1]++;
      }

      for(int i=x-2;i<x+3;i++) a[i][y]++;
      a[x][y+2]++;
      a[x][y-2]++;
    }

  }

  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(a[i][j] == 0) count++;
      if(kosa < a[i][j]) kosa = a[i][j];
    }
  }

  cout << count << endl << kosa << endl;

}