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>
#define P_SIZE 10
using namespace std;

int main() {
  int ink1[5][2] = {{0,0},{1,0},{0,1},{-1,0},{0,-1}};
  int ink2[9][2] = {{0,0},{1,0},{0,1},{-1,0},{0,-1},
		    {1,1},{-1,1},{-1,-1},{1,-1}};
  int ink3[13][2] =  {{0,0},{1,0},{0,1},{-1,0},{0,-1},
		      {1,1},{-1,1},{-1,-1},{1,-1},
		      {2,0},{0,2},{-2,0},{0,-2}};

  static int ink_num[3] = {5, 9, 13};
  
  int map[P_SIZE][P_SIZE];
  for(int i = 0; i < P_SIZE; i++) {
    for(int j = 0; j < P_SIZE; j++) {
      map[i][j] = 0;
    }
  }

  int x, y, size;
  while(scanf("%d,%d,%d", &x, &y, &size) != EOF) {
    for(int i = 0; i < ink_num[size-1]; i++) {
      int nx, ny;
      switch(size) {
      case 1:
	nx = x + ink1[i][0];
	ny = y + ink1[i][1];
	break;
      case 2:
	nx = x + ink2[i][0];
	ny = y + ink2[i][1];
	break;
      case 3:
	nx = x + ink3[i][0];
	ny = y + ink3[i][1];
	break;
      }
      if(nx < 0 || nx >= P_SIZE || ny < 0 || ny >= P_SIZE) continue;

      map[ny][nx] += 1;
    }
  }

    int inkMax = 0;
    int space = 0;
    for(int i = 0; i < P_SIZE; i++) {
      for(int j = 0; j < P_SIZE; j++) {
	if(map[i][j] == 0) space++;
	if(map[i][j] > inkMax) inkMax = map[i][j];
      }
    }
    cout << space << endl;
    cout << inkMax << endl;
  return 0;
}

C++: #include<stdio.h>
void tyu(int x,int y,int N[15][15])
{
	int xt,yt;
	xt=x-1;yt=y-1;
	for(int i=yt;i<=yt+2;i++)
		for(int j=xt;j<=xt+2;j++)
			N[i][j]++;
}
void syo(int x,int y,int N[15][15])
{
	N[y][x]++;N[y+1][x]++;N[y-1][x]++;
	N[y][x+1]++;N[y][x-1]++;
}
void dai(int x,int y,int N[15][15])
{
	int xt,yt;
	xt=x-1;yt=y-1;
	for(int i=yt;i<=yt+2;i++)
		for(int j=xt;j<=xt+2;j++)
			N[i][j]++;
	N[y+2][x]++;N[y-2][x]++;
	N[y][x+2]++;N[y][x-2]++;
}

int main()
{
	int x,y,z,PP[15][15]={},xt=0,yt=0;
	while(scanf("%d,%d,%d",&x,&y,&z)!=EOF)
	{
		xt=x+2;yt=y+2;
		if(z==1)syo(xt,yt,PP);
		else if(z==2)tyu(xt,yt,PP);
		else if(z==3)dai(xt,yt,PP);
	}
	int SUM1=0,SUM2=0,max=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(PP[i][j]==0)SUM1++;
			if(PP[i][j]>max){max=PP[i][j];SUM2=1;}
			else if(PP[i][j]==max)SUM2++;
		}
	}
	printf("%d\n%d\n",SUM1,SUM2);

	return 0;
}

C++: #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

#include <array>

using namespace std;

int data[10][11] = {};

int main ()
{
	int a , b , c;
	char d;
	while( cin >> b >> d >> a >> d >> c )
	{
		if( c == 1 )
		{
			if( a - 1 >= 0 )
			{
				data[a - 1][b]++;
				data[a - 1][b + 1]--;
			}
			data[a][max ( b - 1 , 0 )]++;
			data[a][min ( b + 2 , 10 )]--;
			if( a + 1 < 10 )
			{
				data[a + 1][b]++;
				data[a + 1][b + 1]--;
			}
		} else if( c == 2 )
		{
			if( a - 1 >= 0 )
			{
				data[a - 1][max ( b - 1 , 0 )]++;
				data[a - 1][min ( b + 2 , 10 )]--;
			}
			data[a][max ( b - 1 , 0 )]++;
			data[a][min ( b + 2 , 10 )]--;
			if( a + 1 < 10 )
			{
				data[a + 1][max ( b - 1 , 0 )]++;
				data[a + 1][min ( b + 2 , 10 )]--;
			}
		} else
		{
			if( a - 2 >= 0 )
			{
				data[a - 2][b]++;
				data[a - 2][b + 1]--;
			}
			if( a - 1 >= 0 )
			{
				data[a - 1][max ( b - 1 , 0 )]++;
				data[a - 1][min ( b + 2 , 10 )]--;
			}
			data[a][max ( b - 2 , 0 )]++;
			data[a][min ( b + 3 , 10 )]--;
			if( a + 1 < 10 )
			{
				data[a + 1][max ( b - 1 , 0 )]++;
				data[a + 1][min ( b + 2 , 10 )]--;
			}
			if( a + 2 < 10 )
			{
				data[a + 2][b]++;
				data[a + 2][b + 1]--;
			}
		}
	}
	int ans1 = 0 , ans2 = 0;
	for( size_t i = 0; i < 10; i++ )
	{
		for( size_t j = 1; j < 11; j++ )
		{
			data[i][j] += data[i][j - 1];
		}
	}
	for( size_t i = 0; i < 10; i++ )
	{
		for( size_t j = 0; j < 10; j++ )
		{
			if( data[i][j] == 0 )
			{
				ans1++;
			}
			if( ans2 < data[i][j] )
			{
				ans2 = data[i][j];
			}

		}
	}
	cout << ans1 << endl << ans2 << endl;
}