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<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", cnt, max);
	return 0;
}

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

int main() {
	int pap[10][10];
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			pap[i][j] = 0;
		}
	}
	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 <cstdio>
#include <vector>
using namespace std;

int main(int argc, char *argv[]) {
	vector<vector<int> > cell_list(10, vector<int>(10, 0));
	const int small_x[4] = {0, 1, 0, -1};
	const int small_y[4] = {-1, 0, 1, 0};
	const int middle_x[4] = {1, 1, -1, -1};
	const int middle_y[4] = {-1, 1, 1, -1};
	const int large_x[4] = {0, 2, 0, -2};
	const int large_y[4] = {2, 0, -2, 0};
	
	while (true) {
		int x, y, size;
		if (EOF == fscanf(stdin, "%d,%d,%d\n", &x, &y, &size)) {
			break;
		}
		// small
		for (int i = 0; i < 4; i++) {
			if (x+small_x[i] >= 0 && y+small_y[i] >= 0 &&
				x+small_x[i] < 10 && y+small_y[i] < 10) {
				cell_list[y+small_y[i]][x+small_x[i]]++;
			}
		}
		// middle
		if (size > 1) {
			for (int i = 0; i < 4; i++) {
				if (x+middle_x[i] >= 0 && y+middle_y[i] >= 0 &&
					x+middle_x[i] < 10 && y+middle_y[i] < 10) {
					cell_list[y+middle_y[i]][x+middle_x[i]]++;
				}
			}
			// large
			if (size > 2) {
				for (int i = 0; i < 4; i++) {
					if (x+large_x[i] >= 0 && y+large_y[i] >= 0 &&
						x+large_x[i] < 10 && y+large_y[i] < 10) {
						cell_list[y+large_y[i]][x+large_x[i]]++;
					}
				}
			}
		}
	}
	
	// calc empty cell and max
	int sum_empty = 0, max = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (cell_list[i][j] == 0) sum_empty++;
			if (cell_list[i][j] > max) max = cell_list[i][j];
		}
	}
	
	// print result
	printf("%d\n%d\n", sum_empty, max);
	return 0;
}

C++: #include<stdio.h>

int main(void){
  int xs[] = {-1,0,0,1},ys[] = {0,-1,1,0};
  int xm[] = {-1,-1,-1,0,0,1,1,1}, ym[] = {-1,0,1,-1,1,-1,0,1};
  int xl[] = {-2,-1,-1,-1,0,0,0,0,1,1,1,2};
  int yl[] = {0,-1,0,1,-2,-1,1,2,-1,0,1,0};

  int x,y,n;
  int max = 0, cnt = 0;

  int map[14][14] = {0};

  while(scanf("%d,%d,%d",&x,&y,&n) != EOF){
    x += 2;
    y += 2;
    switch(n){
    case 1:
      map[x][y]++;
      for(int i = 0; i < 4; i++){
	map[x + xs[i]][y + ys[i]]++;
      }
      break;

    case 2:
      map[x][y]++;
      for(int i = 0; i < 8; i++){
	map[x + xm[i]][y + ym[i]]++;
      }
      break;

    case 3:
      map[x][y]++;
      for(int i = 0; i < 12; i++){
	map[x + xl[i]][y + yl[i]]++;
      }
      break;
    }
  }

  for(int i = 2; i < 12; i++){
    for(int j = 2; j < 12; j++){
      if(map[i][j] == 0)
	cnt++;
      if(max < map[i][j])
	max = map[i][j];
    }
  }
    
  printf("%d\n%d",cnt,max);

  return 0;
}