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\n", count, max)
}

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

int main(){
  int x,y,size;
  int canvas[10][10];
  int empty_num, max_val;
  int i, j;

  for(i=0; i<10; i++)
    for(j=0; j<10; j++) canvas[i][j]=0;
  while(cin>>x){
    cin>>y; cin>>size;

    for(i=-1; i<=1; i=i+2)
      if(x+i>=0 && x+i<10) canvas[x+i][y]++;
    for(i=-1; i<=1; i=i+2)
      if(y+i>=0 && y+i<10) canvas[x][y+i]++;
    if(size>1){
      for(i=-1; i<=1; i=i+2){
        for(j=-1; j<=1; j=j+2)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }
    if(size>2){
      for(i=-2; i<=2; i=i+4)
        if(x+i>=0 && x+i<10) canvas[x+i][y]++;
      for(i=-2; i<=2; i=i+4)
        if(y+i>=0 && y+i<10) canvas[x][y+i]++;
      }
    }

    empty_num=0; max_val=0;
    for(i=0; i<10; i++){
      for(j=0; j<10; j++){
        if(canvas[i][j]>max_val) max_val=canvas[i][j];
        else if(canvas[i][j]==0) empty_num++;
      }
    }

    printf("%d\n%d\n", empty_num, max_val);
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <queue>

using namespace std;

int main(void){

	int p[10][10] = {};
	int l[4] = { 0, 5, 9, 13 };
	int d[13][2] = { { 0, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 },		//ここまで小
					{ 1, 1 } , { 1, -1 }, { -1, 1 }, { -1, -1 },	//ここまで中
					{ 2, 0 }, { 0, 2 }, { -2, 0 }, { 0, -2 } };		//ここまで大
	int x, y, s;

	while( scanf("%d,%d,%d", &x, &y, &s) != EOF ) {
		for( int i = 0; i < l[s]; i++ ) {
			int tx = x + d[i][0], ty = y + d[i][1];
			if( tx < 0 || tx >= 9 || ty < 0 || ty >= 9 ) continue;
			p[tx][ty] ++;
		}
	}

	int cnt = 0, max = 0;
	for( int i = 0; i < 100; i++ ) {
		if( p[i%10][i/10] > max ) max = p[i%10][i/10];
		if( p[i%10][i/10] == 0 ) cnt ++;
	}
	cout << cnt << endl;
	cout << max << endl;

    return 0;
}

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

int p[10][10], x, y, s, md;

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

void drop(int x, int y, int s){
    int i, j;
    if( s == 1 ){
        for(i = -1; i <= 1; i++){
            for(j = -1; j <= 1;  j++){
                if( inpaper(x+i, y+j) &&
                    i + j >= -1 && i + j <= 1 &&
                    i - j >= -1 && i - j <= 1 ){
                    p[x+i][y+j]++;
                    if(p[x+i][y+j] > md) md = p[x+i][y+j];
                }
            }
        }
    }else if( s == 2 ){
        for(i = -1; i <= 1; i++){
            for(j = -1; j <= 1; j++){
                if( inpaper(x+i, y+j) ){
                    p[x+i][y+j]++;
                    if(p[x+i][y+j] > md) md = p[x+i][y+j];
                }
            }
        }
    }else{
        for(i = -2; i <= 2; i++){
            for(j = -2; j <= 2; j++){
                if( inpaper(x+i, y+j) && 
                    i+j >= -2 && i+j <= 2 &&
                    i-j >= -2 && i-j <= 2){
                    p[x+i][y+j]++;
                    if(p[x+i][y+j] > md) md = p[x+i][y+j];
                }
            }
        }
    }
}

int main(){
    md = 0;
    for(int i = 0; i < 10; i++){
        for(int j = 0; j < 10;j++){
            p[i][j] = 0;
        }
    }
    while( scanf("%d,%d,%d", &x, &y, &s) != EOF ){
        drop(x, y, s);
    }
    int empt = 0;
    for(int i = 0; i < 10; i++){
        for(int j = 0; j < 10;j++){
            empt += p[i][j]?0:1;
        }
    }
    printf("%d\n%d\n", empt, md);
    
    return 0;
}

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

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

C++: #include <cstdio>

using namespace std;

int main(){
	
	int yx[14][14]={0};
	int x,y,s;
	int count=0;
	int max=0;
	
	while (scanf("%d,%d,%d",&x,&y,&s)!=EOF) {
		x+=2;
		y+=2;
		if (s==1) {
			for (int i=0; i<3; i++) {
				yx[y+i-1][x]++;
				yx[y][x+i-1]++;
			}
			yx[y][x]--;
		}
		else if(s==2){
			for (int i=0; i<3; i++) {
				for(int j=0;j<3;j++){
					yx[y+i-1][x+j-1]++;
				}
			}
		}
		else {
			for (int i=0; i<3; i++) {
				for(int j=0;j<3;j++){
					yx[y+i-1][x+j-1]++;
				}
			}
			yx[y][x-2]++;
			yx[y][x+2]++;
			yx[y-2][x]++;
			yx[y+2][x]++;
			
		}
	}
	
	for (int i=2; i<12; i++) {
		for (int j=2; j<12; j++) {
			if(yx[i][j]==0)count++;
			if (yx[i][j]>max) {
				max=yx[i][j];
			}
		}
	}
	printf("%d\n%d\n",count,max);
	
	return 0;
}