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
//------------------------------------------
#include <bits/stdc++.h> // only for GCC

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

//container util
//------------------------------------------
#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

//repetition
//------------------------------------------
#define loop(i,a,b) for(ull i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define riter(i,c) for(auto i=(c).rbegin(); i!=(c).rend(); ++i)

//constant
//--------------------------------------------
const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

// output vector
// ------------------------------------------
namespace std {
    template<typename T>ostream&operator<<(ostream&os, vector<T>const&v){
        iter(it,v) os<<*it<<(it+1==v.end()?"":",");
        return os;
    }
    template<typename T, typename U>ostream&operator<<(ostream&os,const pair<T,U>&p){
        return os << "[" << p.dirst << "," << p.second << "]";
    }
}

//clear memory
// ------------------------------------------
#define clr(a,i) memset((a), (i) ,sizeof(a))

int main(){
    int x,y,s;
    char c;
    int a[14][14]={0};
    while(cin>>x>>c>>y>>c>>s){
      if(s==1){
         a[x+2][y+2]++;
         a[x+1][y+2]++;
         a[x+2][y+1]++;
         a[x+3][y+2]++;
         a[x+2][y+3]++;
      }
      if(s==2){
         a[x+1][y+1]++;
         a[x+1][y+2]++;
         a[x+1][y+3]++;
         a[x+2][y+1]++;
         a[x+2][y+2]++;
         a[x+2][y+3]++;
         a[x+3][y+1]++;
         a[x+3][y+2]++;
         a[x+3][y+3]++;
      }
      if(s==3){
         a[x+1][y+1]++;
         a[x+1][y+2]++;
         a[x+1][y+3]++;
         a[x+2][y+1]++;
         a[x+2][y+2]++;
         a[x+2][y+3]++;
         a[x+3][y+1]++;
         a[x+3][y+2]++;
         a[x+3][y+3]++;
         a[x][y+2]++;
         a[x+2][y]++;
         a[x+2][y+4]++;
         a[x+4][y+2]++;
      }
    }
    int max=0,sum=0;
    loop(i,2,12)loop(j,2,12){
      if(a[i][j]==0) sum++;
      if(a[i][j]>max) max=a[i][j];
    }
    cout << sum << endl;
    cout << max << endl;
}

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

int main()
{
  int x, y, size;
  int canvas[10][10];
  int emp, max;
  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;

    if(x>0) canvas[x-1][y]++;
    if(x<9) canvas[x+1][y]++;
    if(y>0) canvas[x][y-1]++;
    if(y<9) canvas[x][y+1]++;
    if(size>1){
      for(i=-1; i<=1; i+=2){
        for(j=-1; j<=1; j+=2){
          if(x+i>=0 && x+i<=9 && y+j>=0 && y+j<=9) canvas[x+i][y+j]++;
        }
      }
    }
    if(size>2){
      if(x>1) canvas[x-2][y]++;
      if(x<8) canvas[x+2][y]++;
      if(y>1) canvas[x][y-2]++;
      if(y<8) canvas[x][y+2]++;
    }
  }
  emp=0; max=0;
  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(canvas[i][j]==0) emp++;
      if(max<canvas[i][j]) max=canvas[i][j];
    }
  }
  printf("%d\n%d\n", emp, max);

  return 0;
}

C++: #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 50//00
#define MIN -100001
#define _MAX 100
#define g 9.8
#define d 4.9
int main(void)
{
	int lnk[10][10], x, y, s, max = 0, cou = 0;
	while (scanf_s("%d %d %d", &x, &y, &s) != EOF) {
		if(s == 3){
			if (x - 2 >= 0)++lnk[x - 2][y];
			if (y - 2 >= 0)++lnk[x][y - 2];
			if (x + 2 < 10)++lnk[x + 2][y];
			if (y + 2 < 10)++lnk[x][y + 2];
			for (int i = 0; i < 10; ++i) {
				if (0 <= y - 1 + (i / 3) && y - 1 + (i / 3) <= 9) {
					if (0 <= x - 1 + (i % 3) && x - 1 + (i % 3) <= 9) {
						++lnk[x - 1 + (i % 3)][y - 1 + (i / 3)];
					}
				}
			}
		}
		else if (s == 2) {
			for (int i = 0; i < 10; ++i) {
				if (0 <= y - 1 + (i / 3) && y - 1 + (i / 3) <= 9) {
					if (0 <= x - 1 + (i % 3) && x - 1 + (i % 3) <= 9) {
						++lnk[x - 1 + (i % 3)][y - 1 + (i / 3)];
					}
				}
			}
		}
		else if (s == 1) {
			if (x - 1 >= 0)++lnk[x - 1][y];
			if (y - 1 >= 0)++lnk[x][y - 1];
			if (x + 1 < 10)++lnk[x + 1][y];
			if (y + 1 < 10)++lnk[x][y + 1];
		}
	}
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (lnk[i][j] == 0)++cou;
			if (lnk[i][j] > max) max = lnk[i][j];
		}
	}
	printf("%d\n%d\n", cou, max);
}