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 <cstdio>
using namespace std;

int main(){
  int p[14][14]={0};
  int x,y,s;
  while(scanf("%d,%d,%d",&x,&y,&s)>0){
    if(s==1){
      p[x+2][y+1]++;p[x+1][y+2]++;p[x+2][y+2]++;p[x+3][y+2]++;p[x+2][y+3]++;
    }
    else if(s==2){
      for(int i=1;i<4;i++){
	for(int j=1;j<4;j++) p[x+i][y+j]++;
      }
    }
    else{
      for(int i=1;i<4;i++){
	for(int j=1;j<4;j++) p[x+i][y+j]++;
      }
      p[x][y+2]++;p[x+2][y]++;p[x+4][y+2]++;p[x+2][y+4]++;
    }
  }
  int w=0;
  int t=0;
  for(int i=2;i<12;i++){
    for(int j=2;j<12;j++){
      if(p[i][j]==0) w++;
      if(p[i][j]>t) t=p[i][j];
    }
  }
  printf("%d\n%d",w,t);
  return 0;
}

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

int xy[14][14] = {};

int dai(int x, int y){
	xy[x-2][y]++;
	xy[x+2][y]++;
	xy[x][y-2]++;
	xy[x][y+2]++;
	return 0;
}

int chu(int x, int y, int z){
	if(z>2){
		dai(x, y);
	}
	xy[x-1][y+1]++;
	xy[x+1][y+1]++;
	xy[x-1][y-1]++;
	xy[x+1][y-1]++;
	return 0;
}

int sho(int x, int y, int z){
	if(z>1){
		chu(x, y, z);
	}
	xy[x][y]++;
	xy[x-1][y]++;
	xy[x][y-1]++;
	xy[x+1][y]++;
	xy[x][y+1]++;
	return 0;
}

int main(){
	string input, xx, yy, zz;
	int x, y, z;
	while (true){
		cin >> input;
		if (cin.eof()||input == "000") { break; }
		xx = input[0];
		yy = input[2];
		zz = input[4];
		x = stoi(xx) + 2;
		y = stoi(yy) + 2;
		z = stoi(zz);
		sho(x, y, z);
		cout << xx << yy << zz << x << y << z << endl;
	}
	int add = 0, max = 0;
	for(int i = 2;i<12;i++){
		for(int j = 2;j<12;j++){
			cout << xy[i][j];
			if (xy[i][j] == 0) { add++; }
			if (xy[i][j] > max) { max = xy[i][j]; }
		}
		cout << endl;
	}
	cout << add << endl
		<< max << endl;
	return 0;
}

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

using namespace std;

int sheet[10 + 4][10 + 4];
int sx[] = {1, 0, -1, 0};
int sy[] = {0, -1, 0, 1};
int ssize = 4;
int mx[] = {1, 1, 1, 0, -1, -1, -1, 0};
int my[] = {1, 0, -1, -1, -1, 0, 1, 1};
int msize = 8;
int lx[] = {1, 1, 1, 0, -1, -1, -1, 0, 2, 0, -2, 0};
int ly[] = {1, 0, -1, -1, -1, 0, 1, 1, 0, -2, 0, 2};
int lsize = 12;

int main()
{
  int x, y, size;
  for (int i = 0; i < 15; i++) {
    fill(sheet[i], &sheet[i][15], 0);
  }
  while (scanf("%d,%d,%d ", &x, &y, &size) == 3) {
    //printf("%d,%d,%d\n", x, y, size);
    x += 2, y += 2;
    sheet[x][y]++;
    if (size == 1) {
      for (int i = 0; i < ssize; i++) {
	sheet[x + sx[i]][y + sy[i]]++;
      }
    } else if (size == 2) {
      for (int i = 0; i < msize; i++) {
	sheet[x + mx[i]][y + my[i]]++;
      }
    } else {
      for (int i = 0; i < lsize; i++) {
	sheet[x + lx[i]][y + ly[i]]++;
      }
    }
  }
  
  int max_w = 0, count = 0;;
  for (int i = 2; i <= 11; i++) {
    for (int j = 2; j <= 11; j++) {
      max_w = max(max_w, sheet[i][j]);
      if (sheet[i][j] == 0) {
	count++;
      }
    }
  }
  printf("%d\n%d\n", count, max_w);
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;
int main ()
{
	int m[18][18] = {};
	int x, y, s;
	int dx1[4] = {0, 1, 0, -1}, dy1[4] = {1, 0, -1, 0};
	int dx2[8] = {0, 1, 1, 1, 0, -1, -1, -1}, dy2[8] = {1, 1, 0, -1, -1, -1, 0, 1};
	int dx3[12] = {0, -1, 0, 1, -2, -1, 1, 2, -1, 0, 1, 0}, dy3[12] = {2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2};
	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		x += 3;
		y += 3;
		m[x][y]++;
		switch (s)
		{
		case 1:
			for (int i = 0; i < 4; i++)m[x + dx1[i]][y + dy1[i]]++;
			break;
		case 2:
			for (int i = 0; i < 8; i++)m[x + dx2[i]][y + dy2[i]]++;
			break;
		case 3:
			for (int i = 0; i < 12; i++)m[x + dx3[i]][y + dy3[i]]++;
			break;
		}
	}
	int ans1 = 0, ans2 = 0;
	for (int x = 3; x <13; x++)
	{
		for (int y = 3; y < 13; y++)
		{
			if (m[x][y] == 0)ans1++;
			ans2 = max(ans2, m[x][y]);
			cout<<m[y][x];
		}
		cout<<endl;
	}
	cout << ans1 << endl << ans2 << endl;
	return 0;
}

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

int board[10][10];

void fill(int x, int y){
	if(0<=x && x<10 && 0<=y && y<10){
		board[y][x]++;
	}
}

int main(){
	int x, y, size;
	for (y = 0; y < 10; y++) {
		for (x = 0; x < 10; x++) {
			board[y][x] = 0;
		}
	}
	while(~scanf("%d,%d,%d", &x, &y, &size)){
		if(size >= 1){ // small
			fill(x, y);
			fill(x+1, y);
			fill(x-1, y);
			fill(x, y+1);
			fill(x, y-1);
		}
		if (size >= 2) { // medium
			fill(x+1, y+1);
			fill(x+1, y-1);
			fill(x-1, y+1);
			fill(x-1, y+1);
		}
		if(size >= 3){ // large
			fill(x+2, y);
			fill(x-2, y);
			fill(x, y+2);
			fill(x, y-2);
		}
	}
	int num_zero = 0;
	int deepest = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if(board[j][i] == 0){
				num_zero++;
			}
			if(deepest < board[j][i]){
				deepest = board[j][i];
			}
		}
	}
	cout << num_zero << endl;
	cout << deepest << endl;

	return 0;
}