Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

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.first + 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.first + 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.first + 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;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int x,y,size,maxm,cnt;
int t[10][10];
char ch;
void pl(int y,int x){
  if(y<0||y>=10||x<0||x>=10)return;
  t[y][x]++;
  maxm=max(maxm,t[y][x]);
}

int main(){
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      t[i][j]=0;
  maxm=0;
  while(cin>>x>>ch>>y>>ch>>size){
    if(size==1){
      pl(y,x);
      pl(y+1,x);
      pl(y-1,x);
      pl(y,x+1);
      pl(y,x-1);
    }else if(size==2){
      for(int i=y-1;i<y+2;i++){
	for(int j=x-1;j<x+2;j++){
	  pl(i,j);
	}
      }
    }else{
      for(int i=y-1;i<y+2;i++){
	for(int j=x-1;j<x+2;j++){
	  pl(i,j);
	}
      }
      pl(y+2,x);pl(y-2,x);pl(y,x+2);pl(y,x-2);
    }
  }
  cnt=0;
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      if(t[i][j]==0)cnt++;
  cout<<cnt<<endl;
  cout<<maxm<<endl;
  return 0;
}

C++: #include <cstdio>
#include <algorithm>
#include <functional>
#include <stack>
#include <cmath>
#include <map>
using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define llong long long

int main() {
  map<int,map<int,int> > cell;
  FOR(i,-2,12) {
    FOR(j,-2,12) {
      cell[i][j] = 0;
    }
  }
  int x,y,s;
  while(scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    if(s == 1) {
      cell[x][y-1]++;
      cell[x-1][y]++;
      cell[x][y]++;
      cell[x+1][y]++;
      cell[x][y+1]++;
    }
    else if(s == 2) {
      FOR(i,-1,2) {
	FOR(j,-1,2) {
	  cell[x+i][y+j]++;
	}
      }
    }
    else if(s == 3) {
      cell[x][y-2]++;
      cell[x-2][y]++;
      cell[x+2][y]++;
      cell[x][y+2]++;
      FOR(i,-1,2) {
	FOR(j,-1,2) {
	  cell[x+i][y+j]++;
	}
      }
    }
  }

  int numzero = 0;
  int maxvalue = 0;
  REP(i,10) {
    REP(j,10) {
      if(cell[i][j] == 0) numzero++;
      if(cell[i][j] > maxvalue) maxvalue = cell[i][j];
    }
  }
  printf("%d\n%d\n",numzero,maxvalue);
  return 0;
}