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>
#include <string>
using namespace std;
#define FOR(i, s, e) for(int i = s; i < e; ++i)
#define GRID_SIZE 10
struct Grid
{
	Grid() : maxDeep(0){
		FOR(i, 0, GRID_SIZE){
			FOR(j, 0, GRID_SIZE)
				d[i][j] = 0;
		}
		emptyCount = GRID_SIZE*GRID_SIZE;
	}
	void addInk(int i, int j){
		if (i < 0 || GRID_SIZE <= i || j < 0 || GRID_SIZE <= j)
			return;
		if (d[i][j] == 0) --emptyCount;
		++d[i][j];
		if (d[i][j] > maxDeep) maxDeep = d[i][j];
	}
	void dropS(int i, int j){
		addInk(i, j);
		addInk(i - 1, j);
		addInk(i + 1, j);
		addInk(i, j - 1);
		addInk(i, j + 1);
	}
	void dropM(int i, int j){
		dropS(i, j);
		addInk(i - 1, j - 1);
		addInk(i - 1, j + 1);
		addInk(i + 1, j - 1);
		addInk(i + 1, j + 1);
	}
	void dropL(int i, int j){
		dropM(i, j);
		addInk(i, j - 2);
		addInk(i, j + 2);
		addInk(i - 2, j);
		addInk(i + 2, j);
	}
	void drop(int i, int j, int s){
		if (s == 1) dropS(i, j);
		else if (s == 2) dropM(i, j);
		else if (s == 3) dropL(i, j);
	}
	int emptyCount;
	int maxDeep;
	int d[GRID_SIZE][GRID_SIZE];
};
void getValue(string& line, int& i, int& j, int& s){
	string::size_type p1 = line.find(',');
	string::size_type p2 = line.find(',', p1 + 1);
	i = atoi(line.substr(0, p1).c_str());
	j = atoi(line.substr(p1 + 1, p2 - p1 - 1).c_str());
	s = atoi(line.substr(p2 + 1).c_str());
}
int main()
{
	Grid grid;
	string line;
	int i, j, s;
	while (cin >> line){
		getValue(line, i, j, s);
		grid.drop(i, j, s);
	}
	cout << grid.emptyCount << "\n" << grid.maxDeep << "\n";
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int a[15][15]={0},b=0,c=0,x,y,t;
  string s[50];
  while(scanf("%d,%d,%d",&x,&y,&t)!=EOF){
    if(t==3){a[x+2][y+2]++;a[x+1][y+2]++;a[x][y+2]++;a[x+3][y+2]++;a[x+4][y+2]++;a[x+2][y+1]++;a[x+2][y]++;a[x+2][y+3]++;a[x+2][y+4]++;a[x+3][y+3]++;a[x+3][y+1]++;a[x+1][y+3]++;a[x+1][y+1]++;}
    else if(t==2){a[x+2][y+2]++;a[x+1][y+2]++;a[x+3][y+2]++;a[x+2][y+1]++;a[x+2][y+3]++;a[x+3][y+3]++;a[x+3][y+1]++;a[x+1][y+3]++;a[x+1][y+1]++;}
    else {a[x+2][y+2]++;a[x+1][y+2]++;a[x+3][y+2]++;a[x+2][y+1]++;a[x+2][y+3]++;}
  }
  for(int i=2;i<12;i++){
    for(int j=2;j<12;j++){
      if(!a[i][j])c++;
      b=max(b,a[i][j]);
    }
  }
  cout<<c<<endl<<b<<endl;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <functional>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
//#define scanf scanf_s

int i, j, s;
int p[15][15];

void nuri(int i, int j)
{
	if (i >= 0 && i < 10 && j >= 0 && j < 10) p[i][j]++;
}

void shou(int i, int j)
{
	nuri(i, j);
	nuri(i - 1, j);
	nuri(i, j - 1);
	nuri(i, j + 1);
	nuri(i + 1, j);
}

void chu(int i, int j)
{
	shou(i, j);
	nuri(i - 1, j - 1);
	nuri(i - 1, j + 1);
	nuri(i + 1, j - 1);
	nuri(i + 1, j + 1);
}

void dai(int i, int j)
{
	chu(i, j);
	nuri(i - 2, j);
	nuri(i, j - 2);
	nuri(i, j + 2);
	nuri(i + 2, j);
}

int main()
{
	REP(i, 15)REP(j, 15) p[i][j] = 0;
	while (scanf("%d,%d,%d", &i, &j, &s) != EOF)
	{
		if (s == 1) shou(i, j);
		if (s == 2) chu(i, j);
		if (s == 3) dai(i, j);
	}
	int cnt = 0; int mx = 0;
	REP(i, 10)REP(j, 10)
	{
		if (p[i][j] == 0) cnt++;
		mx = max(p[i][j], mx);
	}
	cout << cnt << endl << mx << endl;
	return 0;
}

C++: #include<iostream>
int main()
{
????????int density[10][10] = {};
????????int x, y, size;
????????char comma;
????????while (std::cin >> x >> comma >> y >> comma >> size) {
????????????????switch (size) {
????????????????case 3:
????????????????????????if (x - 2 >= 0) ++density[x - 2][y];
????????????????????????if (y - 2 >= 0) ++density[x][y - 2];
????????????????????????if (x + 2 < 10) ++density[x + 2][y];
????????????????????????if (y + 2 < 10) ++density[x][y + 2];
????????????????????????// fall through
????????????????case 2:
????????????????????????if (x - 1 >= 0 && y - 1 >= 0) ++density[x - 1][y - 1];
????????????????????????if (x - 1 >= 0 && y + 1 < 10) ++density[x - 1][y + 1];
????????????????????????if (x + 1 < 10 && y - 1 >= 0) ++density[x + 1][y - 1];
????????????????????????if (x + 1 < 10 && y + 1 < 10) ++density[x + 1][y + 1];
????????????????????????// fall through
????????????????case 1:
????????????????????????if (x - 1 >= 0) ++density[x - 1][y];
????????????????????????if (y - 1 >= 0) ++density[x][y - 1];
????????????????????????if (x + 1 < 10) ++density[x + 1][y];
????????????????????????if (y + 1 < 10) ++density[x][y + 1];
????????????????}
????????????????++density[x][y];
????????}
??
????????int cnt = 0, max = 0;
????????for (int i = 0; i < 10; ++i) {
????????????????for (int j = 0; j < 10; ++j) {
????????????????????????if (density[i][j] == 0) ++cnt;
????????????????????????if (max < density[i][j]) max = density[i][j];
????????????????}
????????}
????????std::cout << cnt << std::endl << max << std::endl;
}