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 drop(int x, int y, int s, int p[14][14]){
	p[x][y]+=1;
	for(int i1=-1;i1<2;i1+=2){
		p[x][y+i1]+=1;
		p[x+i1][y]+=1;
	}
	if(s==1) return 0;
	for(int i2=-1;i2<2;i2+=2){
		p[x+i2][y-i2]+=1;
		p[x-i2][y+i2]+=1;
	}
	if(s==2) return 0;
	for(int i3=-2;i3<=2;i3+=4){
		p[x+i3][y]+=1;
		p[x][y+i3]+=1;
	}
}

int main() {
	int p[14][14]={0};
	int x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)>0){
		 int a=drop(x+2,y+2,s,p);
	}
	int cnt=1,max=0;
	for(int a=2;a<12;a++){
		for(int b=2;b<12;b++){
			if(p[a][b]==0) cnt++;
			if(p[a][b]>max) max=p[a][b];
		}
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

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

using namespace std;

int p[10][10];
int cnt = 0,Max = 0;
void ink(int x,int y){
  if(0<=x && x < 10&& 0<=y && y<10)p[x][y]++;
}

int main(){

    rep(i,10)rep(j,10){
      p[i][j] = 0;
    }
    int x,y,size;
  while(~scanf("%d,%d,%d",&x,&y,&size)){

    if(size == 1){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
    }else  if(size == 2){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
    }else  if(size == 3){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
      ink(x+2,y);
      ink(x-2,y);
      ink(x,y+2);
      ink(x,y-2);
    }
    cnt =0;
    Max = -10000000;
    rep(i,10)rep(j,10){
      if(p[i][j]==0)cnt++;
      Max = max(Max,p[i][j]);
    }
    
  }
  cout << cnt <<"\n" << Max << endl;
  
  return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
class Point{
public:
   int x,y;
   Point(){}
   Point(int _x,int _y){
      x = _x; y = _y;
   }
}ink[13] = {Point(0,-1),Point(-1,0),Point(0,0),Point(1,0),Point(0,1),
            Point(-1,-1),Point(1,-1),Point(-1,1),Point(1,1),
            Point(0,-2),Point(-2,0),Point(2,0),Point(0,2)
            };

int main(void){
   int x,y,sz;
   int field[11][11] = {0};
   while(scanf("%d,%d,%d",&x,&y,&sz) != EOF){
      for(int i = 0;i < 13;i++){
         if(sz == 1 && i >= 5) break;
         if(sz == 2 && i >= 9) break;
         int _x = x + ink[i].x,_y = y + ink[i].y;
         if(0 <= _x&&_x < 10 && 0 <= _y&&_y < 10) field[_x][_y]++;
      }
   }
   int blank = 0,ma = 0;
   for(int i = 0;i < 10;i++)
      for(int j = 0;j < 10;j++){
         if(field[i][j] == 0) blank++;
         ma = max(field[i][j],ma);
      }

   printf("%d\n%d\n",blank,ma);
   return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#define N 13
#define N1 3
#define N2 2
using namespace std;
void Drop(int,int,int);
int data[N][N];
int dy[N1]={-1,0,1};int dx[N1]={-1,0,1};
int dy2[N2]={-1,1};int dx2[N2]={-1,1};
int dy3[N1+1]={-2,0,2,0};int dx3[N1+1]={0,2,0,-2};
int main(){
  int x,y,size,maxv=0,cnt=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    Drop(y+2,x+2,size);
  }
  for(int i=2;i<N-1;i++){
    for(int j=2;j<N-1;j++){
      maxv=max(maxv,data[i][j]);
      if(data[i][j]==0) cnt++;
    }
  }
  cout << cnt << endl << maxv << endl;
  return 0;
}
void Drop(int y,int x,int size){
  for(int i=0;i<N1;i++)
    for(int j=0;j<N1;j++)
      data[y+dy[i]][x+dx[j]]++;
  if(size==1)
    for(int i=0;i<N2;i++)
      for(int j=0;j<N2;j++)
	data[y+dy2[i]][x+dx2[j]]--;
  if(size==3)
    for(int i=0;i<N1+1;i++)
      data[y+dy3[i]][x+dx3[i]]++;
}

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 ) {
    if ( size == 1 ) {
      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]++;

    } else if ( size == 2 ) {
      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 ( 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 ) {
      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 ( 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;
}