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 <cmath>
#include <algorithm>
using namespace std;

int G[101][101];

bool inF(int x, int y) { return 0<=x<10 && 0<=y<10; }

void draw(int x, int y) {
  if(inF(x, y)) {
    G[y][x] ++;
  }
}

int main() {
  int a, b, c;
  char d;

  fill(G[0], G[10], 0);
  
  while(cin >> a >> d >> b >> d >> c) {
    draw(a, b);
    switch(c) {
    case 3:
      draw(a-2, b);
      draw(a+2, b);
      draw(a, b-2);
      draw(a, b+2);
    case 2:
      draw(a-1, b-1);
      draw(a+1, b-1);
      draw(a-1, b+1);
      draw(a+1, b+1);
    case 1:
      draw(a-1, b);
      draw(a+1, b);
      draw(a, b-1);
      draw(a, b+1);
      break;
    }
  }
  
  int clrNum = 0, mx=0;  
  
  for(int i=0; i<10; i++) {
    for(int j=0; j<10; j++) {
      mx = max(mx, G[i][j]);
      if(G[i][j]==0) clrNum ++;
    }
  }

  cout << clrNum << endl << mx << endl;
  
  return 0;
}

C++: #include<cstdio>
#define MAX(x,y) ((x>y)? x:y)

int paper[14][14];
class ink {
public: 
	int x,y;
	ink(int X,int Y)
	{
		x=X,y=Y;
	}
};
class ink date_1[]={ink(-1,0),ink(0,-1),ink(1,0),ink(0,1),ink(0,0)};
class ink date_2[]={ink(-1,-1),ink(-1,0),ink(-1,1),ink(0,-1),ink(0,0),ink(0,1),ink(1,-1),ink(1,0),ink(1,1)};
class ink date_3[]={ink(-2,0),ink(0,-2),ink(2,0),ink(0,2),ink(-1,-1),ink(-1,0),ink(-1,1),ink(0,-1),ink(0,0),ink(0,1),ink(1,-1),ink(1,0),ink(1,1)};

void fail(int kind,int x,int y)
{
	if(kind==1)
	{
		for(int i=0;i<5;i++)
		{
			paper[x+date_1[i].x+2][y+date_1[i].y+2]++;
		}
	}
	if(kind==2)
	{
		for(int i=0;i<9;i++)
		{
			paper[x+date_2[i].x+2][y+date_2[i].y+2]++;
		}
	}
	if(kind==3)
	{
		for(int i=0;i<13;i++)
		{
			paper[x+date_3[i].x+2][y+date_3[i].y+2]++;
		}
	}
}

int main()
{
	int x,y,size;
	for(int i=2;i<12;i++)
	{
		for(int j=2;j<12;j++)
		{
			paper[i][j]=0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF)
	{
		if(x==-1)break;
		fail(size,x,y);
	}
	int white=0;
	int maxblack=0;
	for(int i=2;i<12;i++)
	{
		for(int j=2;j<12;j++)
		{
			if(paper[i][j]==0)white++;
			else maxblack=MAX(maxblack,paper[i][j]);
		}
	}
	printf("%d\n%d\n",white,maxblack);
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int field[10][10];

int main() {
  int x,y,size; 
  char ch;
  while ( cin >> x >> ch >> y >> ch >> size ) {
    field[y][x]++;
    if ( x-1 >= 0 ) field[y][x-1]++;
    if ( x+1 < 10 ) field[y][x+1]++;
    if ( y-1 >= 0 ) field[y-1][x]++;
    if ( y+1 < 10 ) field[y+1][x]++;

    if ( size == 2 ) {
      if ( x+1 < 10 && y+1 < 10 ) field[y+1][x+1]++;
      if ( x-1 >= 0 && y+1 < 10 ) field[y-1][x+1]++;
      if ( x+1 < 10 && y-1 >= 0 ) field[y+1][x-1]++;
      if ( x-1 >= 0 && y-1 >= 0 ) field[y-1][x-1]++;
    } 

    if ( size == 3 ) {
      if ( x+1 < 10 && y+1 < 10 ) field[y+1][x+1]++;
      if ( x-1 >= 0 && y+1 < 10 ) field[y-1][x+1]++;
      if ( x+1 < 10 && y-1 >= 0 ) field[y+1][x-1]++;
      if ( x-1 >= 0 && y-1 >= 0 ) field[y-1][x-1]++;
      if ( x+2 < 10 ) field[y][x+2]++;
      if ( x-2 >= 0 ) field[y][x-2]++;
      if ( y+2 < 10 ) field[y+2][x]++;
      if ( y-2 >= 0 ) field[y-2][x]++;
    }

  }

  int cnt = 0,maxv = 0;

  for ( int i = 0; i < 10; i++ ) {
    for ( int j = 0; j < 10; j++ ) {
      if ( field[i][j] == 0 ) cnt++;
      maxv = max(maxv,field[i][j]);
    }
  }

  cout << cnt << endl;
  cout << maxv << endl;
  
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int xy[10][10];

void set(int x, int y)
{
    if(x>=0 && y>=0 && x<=9 && y <= 9)
        xy[x][y]++;
}

int main(void)
{
    int size, x, y, white, deep;
    while(~scanf("%d,%d,%d", &x, &y, &size))
    {
        if(size >= 1)
        {
            set(x,y);
            set(x,y-1);
            set(x,y+1);
            set(x-1,y);
            set(x+1,y);
        }
        if(size >= 2)
        {
            set(x+1,y+1);
            set(x+1,y-1);
            set(x-1,y+1);
            set(x-1,y+1);
        }
        if(size == 3)
        {
            set(x+2,y);
            set(x-2,y);
            set(x,y+2);
            set(x,y-2);
        }
    }
    
    white = 0;
    deep = 0;
    rep(i,10)
    {
        rep(j,10)
        {
            if(xy[i][j] == 0)
                white++;
            if(deep < xy[i][j])
                deep = xy[i][j];
        }
    }
    
    cout << white << "\n" << deep << endl;

    return 0;
}