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++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int main()
{
	const int N = 10;
	vector<vector<int>> map(N, vector<int>(N));

	vector<vector<int>> s1 =
	{
		{ 0, 1, 0 },
		{ 1, 1, 1 },
		{ 0, 1, 0 } ,
	};
	vector<vector<int>> s2 =
	{
		{ 1, 1, 1 },
		{ 1, 1, 1 },
		{ 1, 1, 1 },
	};
	vector<vector<int>> s3 =
	{
		{ 0, 0, 1, 0, 0},
		{ 0, 1, 1, 1, 0 },
		{ 1, 1, 1, 1, 1 },
		{ 0, 1, 1, 1, 0 },
		{ 0, 0, 1, 0, 0 },
	};


	string s;
	for (; getline(cin, s);)
	{
		stringstream ss;
		ss << s;

		int x;
		ss >> x;
		ss.ignore();
		int y;
		ss >> y;
		ss.ignore();
		int s;
		ss >> s;

		vector<vector<int>> sn;
		switch (s)
		{
			case 1:
				sn = s1;
				break;
			case 2:
				sn = s2;
				break;
			case 3:
				sn = s3;
				break;
		}

		for (int i = 0; i < sn.size(); i++)
		{
			int y0 = i + y - sn.size() / 2;
			if (y0 < 0 || y0 >= N)
			{
				continue;
			}
			for (int j = 0; j < sn.size(); j++)
			{
				int x0 = j + x - sn.size() / 2;
				if (x0 < 0 || x0 >= N)
				{
					continue;
				}
				map.at(y0).at(x0) += sn.at(i).at(j);
			}
		}
	}

	int maxd = 0;
	int dr = 0;
	for (int i = 0; i < N; i++)
	{
		for (int j = 0; j < N; j++)
		{
			if (map.at(i).at(j) > 0)
			{
				dr++;
				maxd = max(maxd, map.at(i).at(j));
			}
		
		}
	}

	cout << 100 - dr << endl;
	cout << maxd << endl;
}

C++: #include <cstdio>
#include <cstdlib>
#define rep(i, n) for(int i = 0; i < (n); ++i)

int p[11][11];
int main()
{
	int dx[] = { -1, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2 };
	int dy[] = { 0, -1, 1, 0, -1, 1, -1, 1, 0, -2, 2, 0 };
	int x, y, s;
	rep(i, 10) rep(j, 10) p[i][j] = 0;
	while (scanf("%d,%d,%d", &x, &y, &s) == 3) {
		p[y][x]++;
		rep(i, 4 * s) {
			int r = y + dy[i];
			int c = x + dx[i];
			if (r < 0 || r > 11 || c < 0 || c > 11) continue;
			p[r][c]++;
		}
	}
	int c = 0, best = 0;
	rep(i, 10) rep(j, 10) {
		if (p[i][j] == 0) c++;
		if (best < p[i][j]) best = p[i][j];
	}
	printf("%d\n%d\n", c, best);
	return 0;
}

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

int main(){
	int x, y, p, pt;
	string str;
	int field[10][10];
	int res_M, res_zero;
	
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			field[i][j] = 0;
		}
	}
	
	while(getline(cin, str)){
		x = 0; y = 0; p = 0;
		pt = 0;
		
		while(pt < str.size() && str[pt] != ','){
			x = x * 10 + (str[pt] - 48);
			pt++;
		}
		pt++;
		while(pt < str.size() && str[pt] != ','){
			y = y * 10 + (str[pt] - 48);
			pt++;
		}
		pt++;
		while(pt < str.size() && str[pt] != ','){
			p = p * 10 + (str[pt] - 48);
			pt++;
		}
		
		//1st
		field[y][x]++;
		if(y > 0) field[y - 1][x]++;
		if(x > 0) field[y][x - 1]++;
		if(y + 1 < 10) field[y + 1][x]++;
		if(x + 1 < 10) field[y][x + 1]++;
		p--;
		if(p > 0){
			//2nd
			if(x > 0 && y > 0) field[y - 1][x - 1]++;
			if(x + 1 < 10 && y > 0) field[y - 1][x + 1]++;
			if(x > 0 && y + 1 < 10) field[y + 1][x - 1]++;
			if(x + 1 < 10 && y + 1 < 10) field[y + 1][x + 1]++;
			p--;
		}
		if(p > 0){
			//3rd
			if(x - 2 >= 0) field[y][x - 2]++;
			if(x + 2 < 10) field[y][x + 2]++;
			if(y + 2 < 10) field[y + 2][x]++;
			if(y - 2 >= 0) field[y - 2][x]++;
		}
	}
	
	res_M = 0; res_zero = 0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(field[i][j] == 0) res_zero++;
			else res_M = max(res_M, field[i][j]);
		}
	}
	
	cout << res_zero << endl << res_M << endl;
	
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int field[15][15] = {0};
  for(;;){
    int x,y,s;
    if(scanf("%d,%d,%d",&x,&y,&s) == EOF) break;
    field[x+2][y+2]++;
    field[x+1][y+2]++;
    field[x+2][y+1]++;
    field[x+3][y+2]++;
    field[x+2][y+3]++;
    if(s>1){
      field[x+1][y+1]++;
      field[x+3][y+3]++;
      field[x+1][y+3]++;
      field[x+3][y+1]++;
    }
    if(s>2){
      field[x][y+2]++;
      field[x+2][y]++;
      field[x+4][y+2]++;
      field[x+2][y+4]++;
    }
  }
  int ans[2] = {0};
  for(int i=2; i<12; i++){
    for(int j=2; j<12;j++){
      if(field[i][j] == 0) ans[0]++;
      if(ans[1]<field[i][j]) ans[1] = field[i][j];
    }
  }
  cout <<ans[0]<<endl<<ans[1]<<endl;
  return 0;
}