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>

using namespace std;

int paper[14][14] = {0};

void drop(int n, int m, int l)
{
    if (l == 3)
    {
        paper[n][m + 2]++;

        paper[n + 1][m + 1]++;
        paper[n + 1][m + 2]++;
        paper[n + 1][m + 3]++;
        
        paper[n + 2][m]++;
        paper[n + 2][m + 1]++;
        paper[n + 2][m + 3]++;
        paper[n + 2][m + 4]++;

        paper[n + 3][m + 1]++;
        paper[n + 3][m + 2]++;
        paper[n + 3][m + 3]++;

        paper[n + 4][m + 2]++;

    }
    else if (l == 2)
    {
        paper[n + 1][m + 1]++;
        paper[n + 1][m + 2]++;
        paper[n + 1][m + 3]++;
        
        paper[n + 2][m + 1]++;
        paper[n + 2][m + 2]++;
        paper[n + 2][m + 3]++;

        paper[n + 3][m + 1]++;
        paper[n + 3][m + 2]++;
        paper[n + 3][m + 3]++;
    }
    else if( l == 1 )
    {
        paper[n + 1][m + 2]++;

        paper[n + 2][m + 1]++;
        paper[n + 2][m + 2]++;
        paper[n + 2][m + 3]++;

        paper[n + 3][m + 2]++;
    }
    
    return;
}

int n, m, l;

int main()
{
    while (scanf("%d,%d,%d\n", &n, &m, &l) != EOF)
    {
        drop(n, m, l);

/*         printf( "%d %d %d\n", n, m, l ); */
/* 
        for (int i = 2; i < 12; i++)
        {
            for (int j = 2; j < 12; j++)
            {
                printf(" %d", paper[i][j]);
            }
            printf("\n");
        } */
        n--;
    }

    int zero = 0, max = 0;
    for (int i = 2; i < 12; i++)
    {
        for (int j = 2; j < 12; j++)
        {
            if (paper[i][j] == 0)
            {
                zero++;
            }
            else if (paper[i][j] > max)
            {
                max = paper[i][j];
            }
        }
    }
    printf("%d\n%d\n", zero, max );
    return 0;
}

C++: #include <cstdio>
#include <algorithm>

void ink(char[][10],int,int,int);
void change(char[][10],int,int,int);

int main(void){
	char paper[10][10]={0};
	int white=0,max_ink=0;

	for(int x,y,size;scanf("%d,%d,%d",&x,&y,&size)!=EOF;)
		ink(paper,x,y,size);

	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++){
			if(paper[i][j]==0)
				white++;
			max_ink=std::max(max_ink,int(paper[i][j]));
		}

	printf("%d\n%d\n",white,max_ink);
	return 0;
}

void ink(char paper[][10],int x,int y,int size){
	switch(size){
		case 1:
			ink(paper,x,y,2);
			for(int i=-1;i<=1;i+=2)
				for(int j=-1;j<=1;j+=2)
					change(paper,x+i,y+j,-1);
			change(paper,x,y,-1);
			break;
		case 2:
			for(int i=-1;i<=1;i++)
				for(int j=-1;j<=1;j++)
					change(paper,x+i,y+j,1);
			break;
		case 3:
			ink(paper,x,y,2);
			change(paper,x-2,y,1);
			change(paper,x+2,y,1);
			change(paper,x,y-2,1);
			change(paper,x,y+2,1);
			break;
	}
}

void change(char paper[][10],int x,int y,int inc){
	if(x>=0&&x<10&&y>=0&&y<10)
		paper[x][y]+=inc;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
 
using namespace std;
 
const double eps=1e-10;
 
int main()
{
	int x,y,s,c[14][14]={0};
	char dummy;
	while(cin>>x>>dummy>>y>>dummy>>s){
		x+=2; y+=2;

		c[y][x]++;
		c[y+1][x]++; c[y-1][x]++;
		c[y][x+1]++; c[y][x-1]++;

		if(s>=2){
			c[y-1][x-1]++; c[y-1][x+1]++;
			c[y+1][x-1]++; c[y+1][x+1]++;
		}

		if(s==3){
			c[y-2][x]++; c[y+2][x]++;
			c[y][x-2]++; c[y][x+2]++;
		}

	}

	int w=0,d=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(c[i][j]==0) w++;
			d=max(d,c[i][j]);
		}
	}

	cout<<w<<endl<<d<<endl;


	return 0;
}

C++: #include "stdio.h"
int main(){
	int i,j;
	int p[14][14],x,y,s;
	for(i=2;i<12;i++)for(j=2;j<12;j++)p[i][j]=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=-1){
		y+=2;x+=2;
		p[y][x]++;
		p[y+1][x]++;
		p[y-1][x]++;
		p[y][x+1]++;
		p[y][x-1]++;
		if(s>=2){
			p[y+1][x+1]++;
			p[y+1][x-1]++;
			p[y-1][x-1]++;
			p[y-1][x+1]++;
			
		}
		if(s>=3){
			p[y+2][x]++;
			p[y-2][x]++;
			p[y][x+2]++;
			p[y][x-2]++;
		}
	}
	int mx=0,no=0;
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(!p[i][j])no++;
			if(p[i][j]>mx)mx=p[i][j];
		}
	}
	printf("%d\n%d\n",no,mx);
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cstdlib>
using namespace std;

int main() {
  int xi,yi,size,xy[10][10] = {0};
  int white,top;
  string str;
  while(cin >> str) {
    xi = atoi(str.substr(0,1).c_str());
    yi = atoi(str.substr(2,1).c_str());
    size = atoi(str.substr(4,1).c_str());
    if((size == 1) ||(size == 2)||(size == 3)) {
      xy[xi][yi]++;
      xy[xi+1][yi]++;
      xy[xi-1][yi]++;
      xy[xi][yi+1]++;
      xy[xi][yi-1]++;
    }
    if((size == 2) || (size == 3)) {
      xy[xi+1][yi+1]++;
      xy[xi+1][yi-1]++;
      xy[xi-1][yi+1]++;
      xy[xi-1][yi-1]++;
    }
    if(size == 3) {
      xy[xi][yi+2]++;
      xy[xi][yi-2]++;
      xy[xi+2][yi]++;
      xy[xi-2][yi]++;
    }
  }
  white = 0;
  top = xy[0][0];
  for(int i=0;i<10;i++) {
    for(int j=0;j<10;j++) {
      if(xy[i][j] == 0)
        white++;
      if(xy[i][j] > top)
        top = xy[i][j];
    }
  }
  cout << white << endl << top << endl;
}