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 <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int xy[10][10];

void set(int x, int y)
{
    if(x>=0 && y>=0 && x<=9 && y <= 9)
        xy[x][y]++;
}

int main(void)
{
    int size, x, y, white, deep;
    while(~scanf("%d,%d,%d", &x, &y, &size))
    {
        if(size >= 1)
        {
            set(x,y);
            set(x,y-1);
            set(x,y+1);
            set(x-1,y);
            set(x+1,y);
        }
        if(size >= 2)
        {
            set(x+1,y+1);
            set(x+1,y-1);
            set(x-1,y+1);
            set(x-1,y+1);
        }
        if(size == 3)
        {
            set(x+2,y);
            set(x-2,y);
            set(x,y+2);
            set(x,y-2);
        }
    }
    
    white = 0;
    deep = 0;
    rep(i,10)
    {
        rep(j,10)
        {
            if(xy[i][j] == 0)
                white++;
            if(deep < xy[i][j])
                deep = xy[i][j];
        }
    }
    
    cout << white << endl << deep << endl;

    return 0;
}

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

int dx[12] = { 1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0 };
int dy[12] = { 0, 1, 0, -1, -1, 1, 1, -1, 0, 2, 0, -2 };
int map[10][10];

inline bool out_of_range(int x, int y) {
	if (x<0||x>9||y<0||y>9) return false;
	return true;
}

inline void drop(int x, int y, int s) {
	for (int i=0; i<4*s; i++)
		map[y+dy[i]][x+dx[i]]++;
}

int main() {
	memset(map, 0, sizeof(map));
	int x, y, s;
	char c;
	while (cin >> x >> c >> y >> c >> s) {
		drop(x, y, s);
	}

	int cnt=0,dep=0;
	for (int i=0; i<10; i++)
	for (int j=0; j<10; j++) {
		if (map[j][i]==0) cnt++;
		if (map[j][i] > dep) dep=map[j][i];
	}
	cout << cnt << endl << dep << endl;
	return 0;
}

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

void function(int board[14][14],int x,int y,int n){


	if(n == 1){
		board[x-1][y]++;
		board[x+1][y]++;
		board[x][y]++;
		board[x][y-1]++;
		board[x][y+1]++;
	}

	else if (n == 2){
		for(int i=-1;i<2;i++){
			for(int  j = -1;j<2;j++){
				board[x+i][y+j]++;
			}
		}
	}

	else{
		for(int i=-1;i<2;i++){
			for(int  j = -1;j<2;j++){
				board[x+i][y+j]++;
			}
		}
		board[x+2][y]++;
		board[x-2][y]++;
		board[x][y-2]++;
		board[x][y+2]++;
	}
}

int main(){

	int board[14][14];
	int max=0;
	int sum=0;

	for(int i=0;i<14;i++){
		for(int j=0;j<14;j++){
			board[i][j] = 0;
		}
	}

	char str[10];

	while(cin>>str){
		/*
		if(str[0]=='a'){
			break;
		}
		*/

		function(board,(int)(str[0]-'0'+2),(int)(str[2]-'0'+2),(int)(str[4]-'0'));

	}

	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(board[i][j]==0){
				sum++;
			}
			if(max<=board[i][j]){
				max = board[i][j];
			}
		}
	}
	/*
	for(int i=0;i<14;i++){
		for(int j=0;j<14;j++){
			printf("%d ",board[i][j]);
		}
		printf("\n");
	}
	*/

	cout<<sum<<endl;
	cout<<max<<endl;

	return 0;
}

C++: #include <stdio.h>

int main(void) {
  int i, j, k, p[10][10], x, y, s, ansn = 0, ansm = 0;
  for(i = 0; i < 10; ++i) for(j = 0; j < 10; ++j) p[i][j] = 0;
  int inkx[4][4] = {
   {0, 0, 0, 0},
   {1, 0, 0, -1},
   {1, 1, -1, -1},
   {2, 0, 0, -2}
  }, inky[4][4] = {
    {0, 0, 0, 0},
    {0, 1, -1, 0},
    {1, -1, 1, -1},
    {0, -2, 2, 0}
  };
  while(scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    p[y][x]++;
    for(i = 1; i <= s; ++i) for(j = 0; j < 4; ++j) 
        if(x + inkx[i][j] >= 0 && y + inky[i][j] >= 0 && x + inkx[i][j] < 10 && y + inky[i][j] < 10) p[y + inky[i][j]][x + inkx[i][j]]++;
  }
  for(i = 0; i < 10; ++i) for(j = 0; j < 10; ++j) {
    if(!p[i][j]) ++ansn;
    if(p[i][j] > ansm) ansm = p[i][j];
  }
  printf("%d\n%d\n", ansn, ansm);
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int x, y, s;
	char a, b;
	vector<int> X, Y, S, m;
	vector<int> L1 = { -1,1 }, L2 = { -1,0,1 }, L3 = { -2,2 };
	while (cin >> x >> a >> y >> b >> s) {
		X.push_back(x);
		Y.push_back(y);
		S.push_back(s);
	}
	vector<vector<int>> matrix;
	for (int i = 0; i < 30; i++) {
		for (int j = 0; j < 30; j++) {
			m.push_back(0);
		}
		matrix.push_back(m);
	}
	for (int i = 0; i < X.size(); i++) {
		if (S[i] == 1) {
			matrix[X[i] + 10][Y[i] + 10] += 1;
			for (int j = 0; j < L1.size(); j++) {
				matrix[X[i] + 10 + L1[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L1[j]] += 1;
			}
		}
		else if (S[i] == 2) {
			for (int j = 0; j < L2.size(); j++) {
				for (int k = 0; k < L2.size(); k++) {
					matrix[X[i] + 10 + L2[j]][Y[i] + 10 + L2[k]] += 1;
				}
			}
		}
		else {
			for (int k = 0; k < L2.size(); k++) {
				for (int j = 0; j < L2.size(); j++) {
					matrix[X[i] + 10 + L2[k]][Y[i] + 10 + L2[j]] += 1;
				}
			}
			for (int j = 0; j < L3.size(); j++) {
				matrix[X[i] + 10 + L3[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L3[j]] += 1;
			}
		}
	}
	int ctr1 = 0, max = INT_MIN;
	for (int i = 10; i < 20; i++) {
		for (int j = 10; j < 20; j++) {
			if (matrix[i][j] == 0) {
				ctr1++;
			}
			else {
				if (max < matrix[i][j])max = matrix[i][j];
			}
		}
	}
	cout << ctr1 << endl;
	cout << max << endl;
	return 0;
}