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<stdio.h>
using namespace std;

int small[3][3] = {0, 1, 0,
		   1, 1, 1,
		   0, 1, 0};
int normal[3][3] = {1, 1, 1,
		    1, 1, 1,
		    1, 1, 1};
int big[5][5] = {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 map[10][10];
int x, y, size;
int white = 0;
int black = 0;

int main(){
	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		switch(size){
			case 1:
				for(int i = 0; i < 3; i++){
					for(int j = 0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += small[i][j];
					}
				}
				break;
			case 2:
				for(int i =0; i < 3; i++){
					for(int j=0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += normal[i][j];
					}
				}
				break;
			case 3:
				for(int i=0; i < 5; i++){
					for(int j=0; j < 5; j++){
						if(0 <= x-2+i && x-2+i < 10 && 0 <= y-2+j && y-2+j < 10)
							map[x-2+i][y-2+j] += big[i][j];
					}
				}
				break;
		}
	}
	for(int i=0; i < 10; i++){
		for(int j=0; j < 10; j++){
			if(map[i][j] == 0) white++;
			black = max(black, map[i][j]);
		}
	}

	cout << white << endl;
	cout << black << endl;

}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int x,y,s;
int a[15][15]={0};
int main()
{
    while(scanf("%d,%d,%d",&x,&y,&s)!=EOF)
    {
        swap(x,y);
        a[x][y]++;
        if(x>0)a[x-1][y]++;
        if(y>0)a[x][y-1]++;
        a[x+1][y]++;
        a[x][y+1]++;
        if(s>1)
        {
            if(x>0&&y>0)a[x-1][y-1]++;
            if(x>0)a[x-1][y+1]++;
            if(y>0)a[x+1][y-1]++;
            a[x+1][y+1]++;
        }
        if(s>2)
        {
            if(x>1)a[x-2][y]++;
            if(y>1)a[x][y-2]++;
            a[x+2][y]++;
            a[x][y+2]++;
        }
    }
    int ans=0,mx=0;
    for(int i=0;i<10;i++)
        for(int j=0;j<10;j++)
        {
            if(a[i][j]==0)ans++;
            if(a[i][j]>mx)mx=a[i][j];
        }
    cout<<ans<<endl<<mx<<endl;
}

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

int main() {
  int p[10][10] = {}, x, y, s;
  char c1, c2;
  while (cin >> x >> c1 >> y >> c2 >> s) {
    int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0},
        dy[] = {0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2};
    ++p[y][x];
    for (int i = 0; i < 4 * s; ++i) {
      int nx = x + dx[i], ny = y + dy[i];
      if (nx < 0 || 10 <= nx || ny < 0 || 10 <= ny)
        continue;
      ++p[ny][nx];
    }
  }

  int ans1 = 0, ans2 = 0;
  for (int y = 0; y < 10; ++y) {
    for (int x = 0; x < 10; ++x) {
      if (p[y][x] == 0)
        ++ans1;
      ans2 = max(p[y][x], ans2);
    }
  }

  cout << ans1 << endl << ans2 << endl;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int x, y, s;
    char c;
    vector<vector<int>> v(14, vector<int>(14, 0));
    while (cin >> x >> c >> y >> c >> s) {
        x += 2; y += 2;
        switch (s) {
            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 mx = 0, cnt = 0;
    for (int i = 2; i < 12; i++) {
        for (int j = 2; j < 12; j++) {
            mx = max(mx, v[i][j]);
            if (v[i][j] == 0) cnt++;
        }
    }
    cout << cnt << "\n" << mx << endl;
    return 0;
}

C++: #include <stdio.h>

int main()
{
	int ans1 = 0;
	int ans2 = 0;
	int x,y,size;
	int paper[14][14];
	for(int i = 0; i < 14; i++){
		for(int j = 0; j < 14; j++){
			paper[i][j] = 0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
		paper[x + 2][y + 2] ++;
		paper[x + 1][y + 2] ++;
		paper[x + 2][y + 1] ++;
		paper[x + 3][y + 2] ++;
		paper[x + 2][y + 3] ++;
		if(size > 1){
			paper[x + 1][y + 3] ++;
			paper[x + 1][y + 1] ++;
			paper[x + 3][y + 1] ++;
			paper[x + 3][y + 3] ++;
		}
		if(size > 2){
			paper[x + 2][y + 4] ++;
			paper[x + 2][y] ++;
			paper[x + 4][y + 2] ++;
			paper[x][y + 2] ++;
		}
	}
	for(int i = 2; i < 12; i++){
		for(int j = 2; j < 12; j++){
			if(paper[i][j] == 0){
				ans1++;
			}
			if(ans2 < paper[i][j]){
				ans2 = paper[i][j];
			}

		}
	}
	printf("%d\n%d\n",ans1,ans2);
	Sleep(2000);
	return 0;
}

C++: #include <fstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
using namespace std;
// 5 9 13
int dx[13] = {0,1,0,-1,0,1,1,-1,-1,2,0,-2,0};
int dy[13] = {0,0,1,0,-1,1,-1,1,-1,0,2,0,-2};

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

int main() {
  // ifstream cin("../test.txt");
  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;
  char g,h;
  while (cin >> x >> g >> y >> h >> size) {
    int m = size * 4 + 1;
    for (int i = 0; i < m; i++) {
      int nx = x + dx[i];
      int ny = y + dy[i];
      if (inside(nx, ny))
        p[nx][ny]++;
    }
  }

  int cnt = 0;
  int deepest = 0;
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) {
      if (!p[i][j]) cnt++;
      deepest = max(deepest, p[i][j]);
    }
  }

  cout << cnt << endl << deepest << endl;
}