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>
#include <algorithm>
using namespace std;
int field[10][10];
int sx[]={-1,0,0,0,1},sy[]={0,-1,0,1,0};
int bx[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2},by[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
bool f(int x,int y){
	return x>=0 && x<10 && y>=0 && y<10;
}
void small(int x,int y){
	for(int i=0;i<5;i++){
		if(f(x+sx[i],y+sy[i]))field[x+sx[i]][y+sy[i]]++;
	}
}
void middle(int x,int y){
	for(int i=-1;i<=1;i++){
		for(int j=-1;j<=1;j++){
			if(f(x+i,y+j))field[x+i][y+j]++;
		}
	}
}
void big(int x,int y){
	for(int i=0;i<13;i++){
		if(f(x+bx[i],y+by[i]))field[x+bx[i]][y+by[i]]++;
	}
} 
int main(){
	int x,y,size,ans=0,count=0;
	char com;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			field[i][j]=0;
		}
	}
	while(cin>>x>>com>>y>>com>>size){
		if(size==1)small(x,y);
		else if(size==2)middle(x,y);
		else big(x,y);
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(field[i][j]==0)count++;
			else ans=max(ans,field[i][j]);
		}
	}
	cout<<count<<endl<<ans<<endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define int long long
signed main(){
	int x,y,t;
	int m[14][14];
	while( scanf("%lld,%lld,%lld", &x, &y, &t) != EOF ){
		x+=2;
		y+=2;
		switch(t){
			case 3:
				m[y-2][x]++;
				m[y+2][x]++;
				m[y][x-2]++;
				m[y][x+2]++;
			case 2:
				m[y-1][x-1]++;
				m[y-1][x+1]++;
				m[y+1][x-1]++;
				m[y+1][x+1]++;
			case 1:
				m[y-1][x]++;
				m[y+1][x]++;
				m[y][x-1]++;
				m[y][x+1]++;
				m[y][x]++;
				break;
			default:
				break;
		}
	}
	int z=0;
	int max = -1;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(m[i][j]==0) z++;
			if(m[i][j]>max) max = m[i][j];
		}
	}
	cout << z << endl;
	cout << max << endl;
	return 0;
}

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){
         y += 2;
		 x += 2;
		 
        if (size > 0){
            field[y][x]++;
            field[y - 1][x]++;
			field[y + 1][x]++;
            field[y][x + 1]++;
            field[y][x - 1]++;
            
        }
        if (size > 1){
            field[y - 1][x - 1]++;
            field[y + 1][x + 1]++;
            field[y - 1][x + 1]++;
            field[y + 1][x - 1]++;
        }
        if (size > 2){
            field[y - 2][x]++;
            field[y + 2][x]++;
            field[y][x - 2]++;
            field[y][x + 2]++;
        }
    }
     
    for (int i = 2; i < 12; i++){
        for (int j = 2; j < 12; j++){
			
			if (field[i][j] == 0){
                sum++;
            }
            if (field[i][j] > max){
                max = field[i][j];
            }
        }
    }
	
	printf("%d\n%d\n", sum, max);
	
    return (0);
}

C++: #include<iostream>
using namespace std;
int main(){
  int k[10][10]={0};
  int x,y,s,i,j;
  char c;
  int d=0,w=0;
  int S[4]={0,5,9,13};
  int X[]={0,1,-1,0,0,1,-1,1,-1,2,-2,0,0};
  int Y[]={0,0,0,1,-1,1,-1,-1,1,0,0,2,-2};
  while(cin>>x>>c>>y>>c>>s){
    for(i=0;i<S[s];i++){
      
      if(-1<x&&x<10&&-1<y&&y<10){
	if(-1<x+X[i]&&x+X[i]<10&&-1<y+Y[i]&&y+Y[i]<10){
	  k[x+X[i]][y+Y[i]]++;
	  if(k[x+X[i]][y+Y[i]]>d){
	    d=k[x+X[i]][y+Y[i]];
	  }
	}
      }
    }
  }
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(k[i][j]==0)w++;
    }
  }
  if(d!=0){
    cout<<w<<"\n"<<d<<endl;
  }
  return 0;
}

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

int board[10][10];

void fill(int x, int y){
	if(0<=x && x<10 && 0<=y && y<10){
		board[y][x]++;
	}
}

int main(){
	int x, y, size;
	while(~scanf("%d,%d,%d", &x, &y, &size)){
		if(size >= 1){ // small
			fill(x, y);
			fill(x+1, y);
			fill(x-1, y);
			fill(x, y+1);
			fill(x, y-1);
		}
		if (size >= 2) { // medium
			fill(x+1, y+1);
			fill(x+1, y-1);
			fill(x-1, y+1);
			fill(x-1, y-1);
		}
		if(size >= 3){ // large
			fill(x+2, y);
			fill(x-2, y);
			fill(x, y+2);
			fill(x, y-2);
		}
	}
	int num_zero = 0;
	int deepest = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if(board[j][i] == 0){
				num_zero++;
			}
			if(deepest < board[j][i]){
				deepest = board[j][i];
			}
		}
	}
	cout << num_zero << endl;
	cout << deepest << endl;

	return 0;
}

C++: #include <stdio.h>

static int ink[10][10];

int drop(int x, int y)
{
  if ((0 <= x) && (x <= 9) && (0 <= y) && (y <= 9)) {
    ++ink[x][y];
    return 1;
  } else {
    return 0;
  }
}

int white(void)
{
  int count = 0;
  int i,j;
  for (i=0; i<10; ++i) {
    for (j=0; j<10; ++j) {
      if (ink[i][j] == 0) {
        ++count;
      }
    }
  }
  return count;
}

int depth(void)
{
  int max = 0;
  int i,j;
  for (i=0; i<10; ++i) {
    for (j=0; j<10; ++j) {
      if (max < ink[i][j]) {
        max = ink[i][j];
      }
    }
  }
  return max;
}

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

  printf("%d\n", white());
  printf("%d\n", depth());

  return 0;
}