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 <cstdio>
#include <algorithm>
using namespace std;
int field[10][10];
int sx[]={-1,0,0,0,1},sy[]={0,-1,0,1,0};
int bx[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2},by[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
void small(int x,int y){
	for(int i=0;i<5;i++){
		field[x+sx][y+sy]++;
	}
}
void middle(int x,int y){
	for(int i=-1;i<=1;i++){
		for(int j=-1;j<=1;j++){
			field[x+i][y+j]++;
}
void big(int x,int y){
	for(int i=0;i<13;i++){
		field[x+bx][y+by]++;
	}
} 
int main(){
	int x,y,size,ans=0,count=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			field[i][j]=0;
		}
	}
	while(cin>>x>>y>>size){
		if(size==1)small(x,y);
		else if(size==2)middle(x,y);
		else big(x,y);
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(field[i][j]==0)count++;
			else ans=max(ans,field[i][j]);
		}
	}
	cout<<count<<endl<<ans<<endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>

class DrawAreaStrategy
{
public:
	DrawAreaStrategy(){}
	virtual ~DrawAreaStrategy(){}

	DrawAreaStrategy(const DrawAreaStrategy&) = delete;
	DrawAreaStrategy& operator=(const DrawAreaStrategy&) = delete;

	DrawAreaStrategy(DrawAreaStrategy&&) = delete;
	DrawAreaStrategy& operator=(DrawAreaStrategy&&) = delete;

	virtual void Draw(std::vector<std::vector<int>>& draw_sheet, int x, int y) = 0;
};

class DrawAreaSmallStrategy
{
public:
	DrawAreaSmallStrategy() {}
	virtual ~DrawAreaSmallStrategy() {}

	DrawAreaSmallStrategy(const DrawAreaSmallStrategy&) = delete;
	DrawAreaSmallStrategy& operator=(const DrawAreaSmallStrategy&) = delete;

	DrawAreaSmallStrategy(DrawAreaSmallStrategy&&) = delete;
	DrawAreaSmallStrategy& operator=(DrawAreaSmallStrategy&&) = delete;

	virtual void Draw(std::vector<std::vector<int>>& draw_sheet, int x, int y)
	{
		static const std::vector<std::pair<int, int>> draw_list
		{
			{ 0,  0 },

			{ -1,  0 },
			{  1,  0 },
			{  0, -1 },
			{  0,  1 }
		};
		for (auto draw_point : draw_list)
		{
			int draw_x = draw_point.first + x;
			if (draw_x < 0 || draw_x >= 10){ continue; }

			int draw_y = draw_point.second + y;
			if (draw_y < 0 || draw_y >= 10) { continue; }

			draw_sheet[x + draw_point.first][y + draw_point.second]++;
		}
	}
};


class DrawAreaMiddleStrategy
{
public:
	DrawAreaMiddleStrategy() {}
	virtual ~DrawAreaMiddleStrategy() {}

	DrawAreaMiddleStrategy(const DrawAreaMiddleStrategy&) = delete;
	DrawAreaMiddleStrategy& operator=(const DrawAreaMiddleStrategy&) = delete;

	DrawAreaMiddleStrategy(DrawAreaMiddleStrategy&&) = delete;
	DrawAreaMiddleStrategy& operator=(DrawAreaMiddleStrategy&&) = delete;

	virtual void Draw(std::vector<std::vector<int>>& draw_sheet, int x, int y)
	{
		static const std::vector<std::pair<int, int>> draw_list
		{
			{ 0,  0 },

			{ -1,  0 },
			{ 1,  0 },
			{ 0, -1 },
			{ 0,  1 },

			{ -1, -1 },
			{ -1,  1 },
			{  1, -1 },
			{  1,  1 }
		};
		for (auto draw_point : draw_list)
		{
			int draw_x = draw_point.first + x;
			if (draw_x < 0 || draw_x >= 10) { continue; }

			int draw_y = draw_point.second + y;
			if (draw_y < 0 || draw_y >= 10) { continue; }

			draw_sheet[x + draw_point.first][y + draw_point.second]++;
		}
	}
};

class DrawAreaLargeStrategy
{
public:
	DrawAreaLargeStrategy() {}
	virtual ~DrawAreaLargeStrategy() {}

	DrawAreaLargeStrategy(const DrawAreaLargeStrategy&) = delete;
	DrawAreaLargeStrategy& operator=(const DrawAreaLargeStrategy&) = delete;

	DrawAreaLargeStrategy(DrawAreaLargeStrategy&&) = delete;
	DrawAreaLargeStrategy& operator=(DrawAreaLargeStrategy&&) = delete;

	virtual void Draw(std::vector<std::vector<int>>& draw_sheet, int x, int y)
	{
		static const std::vector<std::pair<int, int>> draw_list
		{
			{  0,  0 },

			{ -1,  0 },
			{  1,  0 },
			{  0, -1 },
			{  0,  1 },

			{ -1, -1 },
			{ -1,  1 },
			{  1, -1 },
			{  1,  1 },

			{ -2,  0 },
			{  2,  0 },
			{  0, -2 },
			{  0,  2 }
		};
		for (auto draw_point : draw_list)
		{
			int draw_x = draw_point.first + x;
			if (draw_x < 0 || draw_x >= 10) { continue; }

			int draw_y = draw_point.second + y;
			if (draw_y < 0 || draw_y >= 10) { continue; }

			draw_sheet[x + draw_point.first][y + draw_point.second]++;
		}
	}
};

int main()
{
	DrawAreaSmallStrategy small;
	DrawAreaMiddleStrategy middle;
	DrawAreaLargeStrategy large;

	std::vector< std::vector<int> > sheet(10, std::vector<int>(10));

	int x = 0, y = 0, s = 0;
	char a = 0;
	while (std::cin >> x >> a >> y >> a >> s)
	{
		switch (s)
		{
		case 1:
		{
			small.Draw(sheet, x, y);
			break;
		}
		case 2:
		{
			middle.Draw(sheet, x, y);
			break;
		}
		case 3:
		{
			large.Draw(sheet, x, y);
			break;
		}
		default:
			break;
		}
	}

	int empty_num = 0;
	int max_num = 0;

	for (auto line : sheet)
	{
		for (auto cell : line)
		{
			if (0 == cell)
			{
				empty_num++;
				continue;
			}
			if (max_num < cell)
			{
				max_num = cell;
			}
		}
	}
	std::cout << empty_num << "\n" << max_num << std::endl;

	return 0;
}