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 <stdio.h>

int field[15][15];

int main(void)
{
	int x, y;
	int size;
	int sum = 0, max = 0;
	
	while (scanf("%d %d %d", &x, &y, &size) != EOF){
		
		if (size > 0){
			field[y + 2][x + 2]++;
			field[y + 3][x + 2]++;
			field[y + 2][x + 3]++;
			field[y + 2][x + 1]++;
			field[y + 2][x + 2]++;
		}
		if (size > 1){
			field[y + 1][x + 1]++;
			field[y + 3][x + 3]++;
			field[y + 1][x + 3]++;
			field[y + 3][x + 1]++;
		}
		if (size > 2){
			field[y][x + 2]++;
			field[y + 4][x + 2]++;
			field[y + 2][x]++;
			field[y + 2][x + 4]++;
		}
	}
	
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (field[i][j] == 0){
				sum++;
			}
			if (field[i][j] > max){
				max = field[i][j];
			}
		}
	}
	return (0);
}

C++: #include <iostream>
#include <algorithm>
#include<cstdio>
using namespace std;

//4方向ベクトル→↑←↓
const int px[4] ={1,0,-1,0};
const int py[4] ={0,-1,0,1};

int board[15][15];
int x,y,size;
int ans1,ans2;
int main()
{
  ans1 = 0;
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      board[i][j] = 0;
    }
  }
  while(scanf("%d,%d,%d",&x,&y,&size) !=EOF){
    if(x <0||y < 0||x >10 ||y >10){
      continue;
    }
    if(size ==1){
      board[y][x] +=1;
      for(int j = 0;j < 4;j++){
	int nx = x + px[j];
	int ny = y + py[j];
	if(nx <0 ||ny < 0||nx > 10||ny >10)
	  continue;
	board[ny][nx] = 1;
      }
    }else if(size ==2){
      for(int i = -1;i <=1;i++){
	for(int j = -1;j <=1;j++){
	 int nx = x +j;
	 int ny = y +i;
	  if(nx <0 ||nx >=10||ny <0||ny >=10)
	    continue;
	  board[ny][nx] +=1;
	}
      }
    }else if(size ==3){
      for(int i = -2;i <=2;i++){
	for(int j = -2;j <=2;j++){
	  if(i == -2&&j ==0){
	    board[y+i][x] +=1;
	  }else if(i == -1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i == 0){
	    board[y+i][x+j] +=1;
	  }else if(i == 1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i ==2&&j ==0){
	    board[y+i][x] +=1;
	  }
	}
      }
    }
  }
  ans2 = 0; 
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      if(board[i][j] == 0){
	ans1++;
      }
      if(board[i][j] > ans2){
	ans2 = board[i][j];
      }
    }
  }
  for(int i = 0;i < 10;i++){
    for(int j = 0;j < 10;j++){
      cout <<board[i][j];
    }
    cout <<endl;
  }
  cout <<ans1<<endl;
  cout <<ans2<<endl;
  return 0;
}

C++: #include<cstdio>

using namespace std;

int main(){
 int pa[14][14];
 int i,j;
 int x,y,size;
 int da;
 int not;
 da=not=0;
 for(i=0;i<14;i++){
  for(j=0;j<14;j++)
   pa[i][j]=0;
 }

 while(scanf("%d,%d,%d",&x,&y,&size)!=-1){
  x=x+2;
  y=y+2;
  switch(size){
   case 1:
    pa[y][x]++;
    pa[y-1][x]++;
    pa[y+1][x]++;
    pa[y][x-1]++;
    pa[y][x+1]++;
    break;
   case 2:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++){
      pa[y+i][x+j]++;
		}
    }
    break;
   case 3:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++){
      pa[y+i][x+j]++;
		}
    }
    pa[y-2][x]++;
    pa[y+2][x]++;
    pa[y][x-2]++;
    pa[y][x+2]++;
    break;
   default:break;
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]==0){
    not++;
	}
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]>da){
    da=pa[i][j];
	}
  }
 }
 printf("%d\n%d\n",not,da);
 return 0;
}

C++: //累積和したほうが簡単。最後に配列を上から下に舐める。
//(配列を舐めるときに累積和の挙動をして、元のデータが復元される)
#include<stdio.h>
#include<iostream>
using namespace std;

int data[10][10];
char str[6];
int ink[3][5] = { {-1,0,1,0,-1},{-1,1,1,1,-1},{0,1,2,1,0} };
int abs(int x){return (x>0?x:-x);}

void drop( int y,int x,int size )
{
	size--;
	
	int i;
	for( i = 0;i < 5;i++ ){
		if( ink[size][i] == -1 || x+i-2 < 0 || x+i-2 > 9 )
			continue;
			
		data[max(0,y-ink[size][i])][x+i-2]++;
		if( y+ink[size][i]+1 > 9 )
			continue;
		
		data[y+ink[size][i]+1][x+i-2]--;
	}
}

int main()
{
	int x,y,size;
	int i,j;
	while( scanf("%s",str) != -1 )
	{
		if( str[0] == '\n' || str[0] == '\r' )
			continue;
		x = 	str[0]-'0';
		y = 	str[2]-'0';
		size = 	str[4]-'0';
		
		drop( y,x,size );
	}
	
	//iが横,jが縦
	for( i = 0;i < 10;i++ ){
		int rui = 0;
		for( j = 0;j < 10;j++ ){
			rui += data[j][i];
			data[j][i] = rui;
		}
	}
	
	int ans1 = 0,ans2 = 0;
	
	for( i = 0;i < 10;i++ ){
		for( j = 0;j < 10;j++ ){
			if( data[i][j] == 0 )
				ans1++;
			else
				ans2 = max(ans2, data[i][j]);
		}
	}
	printf("%d\n%d\n",ans1,ans2);
	return 0;
}