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>
#include <string>
#include <math.h>
#include <stdio.h>
#include <ctype.h>

using namespace std;

int main() {
    int a[10][10]={0};
    int x,y,size;
    while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
        //size=1
        if(size >= 1){
            a[x][y]++;
            if(x-1>-1){
                a[x-1][y]++;
            }
            if(y-1>-1){
                a[x][y-1]++;
            }
            if(x+1<10){
                a[x+1][y]++;
            }
            if(y+1<10){
                a[x][y+1]++;
            }
        }
        //size=2
        if(size >= 2){
            if(x-1>-1&&y-1>-1){
                a[x-1][y-1]++;
            }
            if(x+1<10&&y-1>-1){
                a[x+1][y-1]++;
            }
            if(x+1<10&&y+1<10){
                a[x+1][y+1]++;
            }
            if(x-1>-1&&y+1<10){
                a[x-1][y+1]++;
            }
        }
        //size=3
        if(size >= 3){
            if(x-2>-1){
                a[x-2][y]++;
            }
            if(y-2>-1){
                a[x][y-2]++;
            }
            if(x+2<10){
                a[x+2][y]++;
            }
            if(y+2<10){
                a[x][y+2]++;
            }
        }
    }
    int white=0;
    int max=0;
    for(int i=0; i<10; i++){
        for(int j=0; j<10; j++){
            if(a[i][j]==0){
                white++;
            }
            if(a[i][j]>max){
                max=a[i][j];
            }
        }
    }
    cout<<white<<" "<<max<<endl;
    return 0;
}

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

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 <iostream>
#include <algorithm>
#define MAX 30
using namespace std;


int main()
{
	int p[MAX][MAX];
	for (int i = 0; i < MAX; i++){
		for (int j = 0; j < MAX; j++){
			p[i][j] = 0;
		}
	}
	int x, y, size;
	while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
		x += 10;
		y += 10;
		p[x][y]++;
		p[x - 1][y]++;
		p[x + 1][y]++;
		p[x][y - 1]++;
		p[x][y + 1]++;
		if (size == 1){
			continue;
		}
		p[x - 1][y - 1]++;
		p[x - 1][y + 1]++;
		p[x + 1][y - 1]++;
		p[x + 1][y + 1]++;
		if (size == 2){
			continue;
		}
		p[x - 2][y]++;
		p[x + 2][y]++;
		p[x][y - 2]++;
		p[x][y + 2]++;
	}
	int clean = 0, ink = 0;
	for (int i = 10; i < 20; i++){
		for (int j = 10; j < 20; j++){
			if (p[i][j] == 0){
				clean++;
			}
			ink = max(ink, p[i][j]);
		}
	}
	cout << clean << endl;
	cout << ink << endl;

	return 0;
}

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

int paper[10][10];

int drop[3][5][5]  = {
  {
  {0, 0, 0, 0, 0},
  {0, 0, 1, 0, 0},
  {0, 1, 1, 1, 0},
  {0, 0, 1, 0, 0},
  {0, 0, 0, 0, 0},
  },
  {
  {0, 0, 0, 0, 0},
  {0, 1, 1, 1, 0},
  {0, 1, 1, 1, 0},
  {0, 1, 1, 1, 0},
  {0, 0, 0, 0, 0},
  },
  {
  {0, 0, 1, 0, 0},
  {0, 1, 1, 1, 0},
  {1, 1, 1, 1, 1},
  {0, 1, 1, 1, 0},
  {0, 0, 1, 0, 0},
  },
};

int main()
{
  fill((int*) paper, (int*) paper+100, 0);
  int x, y, size;
  char d;
  while (cin >> x >> d >> y >> d >> size) {
    for (int dx = -2; dx <= 2; dx++) {
      for (int dy = -2; dy <= 2; dy++) {
        if (x + dx >= 0 && x + dx < 10 && y + dy >= 0 && y + dy < 10)
          paper[x + dx][y + dy] += drop[size - 1][2+dx][2+dy];
      }
    }
  }
  int max_drop = 0;
  int space = 0;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      if (paper[i][j] == 0) space++;
      max_drop = max(max_drop, paper[i][j]);
    }
  }
  cout << space << endl << max_drop << endl;
}