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<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
	int a[30][30]={{0}};
	char str;
	int cnt=0,m;
	int ans=0;
	int x,y,z;
	while(scanf("%d%c%d%c%d",&x,&str,&y,&str,&z)!=EOF){
	    x+=10,y+=10;
        if(z==1){
            a[x][y]++;
            a[x+1][y]++;
            a[x-1][y]++;
            a[x][y+1]++;
            a[x][y-1]++;

        }
        else if(z==2){
            a[x][y]++;
            a[x+1][y+1]++;
            a[x+1][y-1]++;
            a[x+1][y]++;
            a[x-1][y+1]++;
            a[x-1][y-1]++;
            a[x-1][y]++;
            a[x][y+1]++;
            a[x][y-1]++;


        }
        else if(z==3){
            a[x+1][y]++;
            a[x+2][y]++;
            a[x][y+1]++;
            a[x][y+2]++;
            a[x-1][y]++;
            a[x-2][y]++;
            a[x][y-1]++;
            a[x][y-2]++;
            a[x+1][y+1]++;
            a[x-1][y-1]++;
            a[x+1][y-1]++;
            a[x-1][y+1]++;
            a[x][y]++;




        }


	}
	for(int i=10;i<20;i++){
            for(int j=10;j<20;j++){
                if(a[i][j]==0)cnt++;
                ans=max(ans,a[i][j]);
            }
        }
        cout<<cnt<<endl<<ans<<endl;



	return 0;
}

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

using namespace std;

int main() {
	int paper[10][10];
	int x, y, size;
	int blank = 0, depth = 0;
	int dx[] = { 1, -1,  0,  0,  1, -1,  1, -1,  2, -2,  0,  0};
	int dy[] = { 0,  0,  1, -1,  1, -1, -1,  1,  0,  0,  2, -2};

	memset(paper, 0, sizeof(paper));
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		int i;
		switch (size) {
			case 3:
				for (i = 8; i < 12; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
			case 2:
				for (i = 4; i < 8; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
			case 1:
				for (i = 0; i < 4; i++)
					if (x + dx[i] >= 0 && x + dx[i] <= 9 &&
						y + dy[i] >= 0 && y + dy[i] <= 9 )
						paper[y + dy[i]][x + dx[i]] += 1;
				break;
		}
	}
	for (int i = 0; i < 10; i++)
		for (int j = 0; j < 10; j++)
			if (paper[i][j] == 0)
				blank++;
			else
				depth = max(depth, paper[i][j]);
	cout << blank << endl;
	cout << depth << endl;
	return 0;
}

C++: #include<iostream>
int main()
{
	int**paper = new int*[14];
	paper += 2;
	for (int i = -2; i < 12; i++)
	{
		paper[i] = new int[14];
		paper[i] += 2;
	}
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			paper[i][j] = 0;
		}
	}
	while (true)
	{
		int x, y, s;
		char foo;
		std::cin >> x >> foo >> y >> foo >> s;
		if (std::cin.eof())
		{
			break;
		}
		paper[y][x]++;
		paper[y - 1][x]++;
		paper[y][x - 1]++;
		paper[y][x + 1]++;
		paper[y + 1][x]++;
		if (s != 1)
		{
			paper[y - 1][x - 1]++;
			paper[y - 1][x + 1]++;
			paper[y + 1][x - 1]++;
			paper[y + 1][x + 1]++;
		}
		if (s == 3)
		{
			paper[y - 2][x]++;
			paper[y][x - 2]++;
			paper[y][x + 2]++;
			paper[y + 2][x]++;
		}
	}
	int max = -1, white = 0;
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (paper[i][j] == 0)
			{
				white++;
			}
			if (max < paper[i][j])
			{
				max = paper[i][j];
			}
		}
	}
	std::cout << white << std::endl;
	std::cout << max << std::endl;
	return 0;
}

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

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

    for(i=-1; i<=1; i+2)
      if(x+i>=0 && x+i<10) canvas[x+i][y]++;
    for(i=-1; i<=1; i+2)
      if(y+i>=0 && y+i<10) canvas[x][y+i]++;
    if(size>1){
      for(i=-1; i<=1; i+2){
        for(j=-1; j<=1; j+2)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }
    if(size>2){
      for(i=-2; i<=2; i+4){
        for(j=-2; j<=2; j+4)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }

    empty_num=0; max_val=0;
    for(i=0; i<10; i++){
      for(j=0; j<10; j++){
        if(canvas[i][j]>max_val) max_val=canvas[i][j];
        else if(canvas[i][j]==0) empty_num++;
      }
    }

    printf("%d\n%d\n", empty_num, max_val);
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int dc[3] = {5,9,13};
int dx[3][13] = {
	{0,0,0,-1,1},
	{-1,-1,-1,0,0,0,1,1,1},
	{-2,-1,-1,-1,0,0,0,0,0,1,1,1,2}
};
int dy[3][13] = {
	{0,1,-1,0,0},
	{-1,0,1,-1,0,1,-1,0,1},
	{0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}
};

int main(){
	int a,b,c;
	int d[10][10] = {0};
	while(~scanf("%d,%d,%d",&a,&b,&c)){
		c--;
		rep(i,dc[c]){
			int tx = a + dx[c][i] , ty = b + dy[c][i];
			if(tx < 0 || ty < 0 || ty > 9 || tx > 9) continue;
			d[ty][tx]++;
		}
	}
	int white = 0;
	int ans = 0;
	rep(i,10)rep(j,10){
		if(d[i][j]==0)white++;
		else ans = max(d[i][j],ans);
	}
	cout << white << endl << ans << endl;
}