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 <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
#define first first
#define second se
using namespace std;
typedef pair<int, int> P;
typedef vector<int> vi;


int dy[4] = {1, -1, 0, 0};
int dx[4] = {0, 0, 1, -1};

int h = 10, w = 10;

bool contain(int y, int x){
    return (0 <= y && y < h && 0 <= x && x < w);
}

signed main(){
    int x, y, s;
    char c;
    int d[11][11] = {0};
    while(cin >> x >> c >> y >> c >> s){
        // cout << x << ' ' << y << ' ' << s << endl;
        if(s == 1){
            d[y][x]++;
            rep(i, 0, 4){
                int ny = y + dy[i];
                int nx = x + dx[i];
                if(contain(ny, nx)){
                    d[ny][nx]++;
                }
            }
        }
        if(s >= 2){
            rep(i, 0, 3){
                rep(j, 0, 3){
                    int ny = y + i - 1;
                    int nx = x + j - 1;
                    if(contain(ny, nx)){
                        d[ny][nx]++;
                    }
                }
            }
        }
        if(s == 3){
            rep(i, 0, 4){
                int ny = y + 2 * dy[i];
                int nx = x + 2 * dx[i];
                if(contain(ny, nx)){
                    d[ny][nx]++;
                }
            }
        }
    }
    int ans = 0, MAX = 0;
    rep(i, 0, 10){
        rep(j, 0, 10){
            // o(d[i][j]);
            if(d[i][j] == 0) ans ++;
            MAX = max(MAX, d[i][j]);
        }
    }
    cout << ans << endl;
    cout << MAX << endl;
}

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

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif


void ink_small(int w, int h, std::vector<int> &image, int x, int y){
	image[y * w + x]++;

	if(y - 1 >= 0){
		image[(y - 1) * w + x]++;
	}
	if(y + 1 < h){
		image[(y + 1) * w + x]++;
	}
	if(x - 1 >= 0){
		image[y * w + x - 1]++;
	}
	if(x + 1 < w){
		image[y * w + x + 1]++;
	}

	return;
}

void ink_middle(int w, int h, std::vector<int> &image, int x, int y){

	ink_small(w, h, image, x, y);

	if((y - 1) >= 0){
		if((x - 1) >= 0){
			image[(y - 1) * w + x - 1]++;
		}
		if((x + 1) < w){
			image[(y - 1) * w + x + 1]++;
		}
	}
	if((y + 1) < h){
		if((x - 1) >= 0){
			image[(y + 1) * w + x - 1]++;
		}
		if((x + 1) < w){
			image[(y + 1) * w + x + 1]++;
		}
	}

	return;
}

void ink_large(int w, int h, std::vector<int> &image, int x, int y){
	ink_middle(w, h, image, x, y);

	if((y - 2) >= 0){
		image[(y - 2) * w + x]++;
	}
	if((y + 2) < h){
		image[(y + 2) * w + x]++;
	}
	if((x - 2) >= 0){
		image[y * w + x - 2]++;
	}
	if((x + 2) < w){
		image[y * w + x + 2]++;
	}

	return;
}

void print(int w, int h, const std::vector<int> &image){
	for(int y = 0; y < h; y++){
		int offset = y * w;
		for(int x = 0; x < w; x++){
			std::cout << image[offset + x];
		}
		std::cout << std::endl;
	}
	return;
}

int main(int argc, char **argv){
	int w = 10;
	int h = 10;
	std::vector<int> image(w * h, 0);
	int x, y, s;
	char tmp;
	int count_zero = 0;
	int max = 0;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	while(ifs >> x >> tmp >> y >> tmp >> s){
#else
	while(std::cin >> x >> tmp >> y >> tmp >> s){
#endif
		
		if(s == 1){
			ink_small(w, h, image, x, y);
		}
		else if(s == 2){
			ink_middle(w, h, image, x, y);
		}
		else{
			ink_large(w, h, image, x, y);
		}

		//print(w, h, image);
	}

	for(int y = 0; y < h; y++){
		int offset = y * w;
		for(int x = 0; x < w; x++){
			int val = image[offset + x];
			if(val == 0){
				count_zero++;
			}
			max = std::max(max, val);
		}
	}

	std::cout << count_zero << std::endl;
	std::cout << max << std::endl;
	
	return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int p[10][10];
int dx[] = { 0, 0, -1, 1, -1, -1, 1, 1, 0, 0, -2, 2 };
int dy[] = { -1, 1, 0, 0, -1, 1, -1, 1, -2, 2, 0, 0 };
int main() {
  int x, y, s;
  while (~scanf("%d,%d,%d", &x, &y, &s)) {
    p[y][x]++;
    for (int i = 0; i < s * 4; ++i) {
      int px = x + dx[i];
      int py = y + dy[i];
      if (px >= 0 && px < 10 && py >= 0 && py < 10) {
        p[py][px]++;
      }
    }
  }
  int dv = 0, mv = 0;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      if (p[j][i] == 0) dv++;
      mv = max(p[j][i], mv);
    }
  }
  printf("%d\n%d\n", dv, mv);
}

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

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size,mx,my;
	int dx[] = {0,-1,1,0,-1,1,-1,1,0,-2,2,0};
	int dy[] = {-1,0,0,1,-1,-1,1,1,-2,0,0,2};
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		for (int i=0; i<size*4; i++) {
			mx=x+dx[i];
			my=x+dy[i];
			if (mx>=0&&mx<10&&my>=0&&my<10) p[mx][my]++;
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) c++;
			else if (p[i][j]>m) m=p[i][j];
		}
	}
	cout << c << endl;
	cout << m << endl;
	return 0;
}