Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
  int dec[10][10][1];
  int x,y,size,num,max;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
       dec[i][j][0]=0;
    }
  }
                
  while(scanf("%d,%d,%d",&y,&x,&size)!=EOF){
  if(size == 1){
      dec[x+1][y][0] += 1;
      dec[x-1][y][0] += 1;
      dec[x][y+1][0] += 1;
      dec[x][y-1][0] += 1;
      dec[x][y][0] += 1;
    } else if(size == 2){
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  dec[x+i][y+j][0] +=1;
	}
      }
    }else if(size==3){
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  dec[x+i][y+j][0] +=1;
	}
      }
      dec[x+2][y][0] +=1;
      dec[x-2][y][0] +=1;
      dec[x][y+2][0] +=1;
      dec[x][y-2][0] +=1;
    }
  }
  max = dec[0][0][0];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(dec[i][j][0]==0){
	num +=1;
      }      
      if(max < dec[i][j][0])
	max=dec[i][j][0];
    }
  }
  cout << num << endl << max<<endl;
}

C++: #include <stdio.h>
#include<math.h>
using namespace std;

bool rangeCheck(int x,int y){
	if(x >= 0 && x <= 9 && y>=0 && y <= 9)return true;
	else{
		return false;
	}
}

int main(){
	int paper[10][10],x,y,size;
	for(int i=0;i<10;i++){
		for(int k=0;k<10;k++){
			paper[i][k] = 0;
		}
	}

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
		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]++;
			break;
		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]++;
			break;
		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]++;
			break;
		}
	}

	int count = 0,max = -1;
	for(int i=0; i< 10;i++){
		for(int k=0; k < 10; k++){
			if(paper[i][k] == 0)count++;
			max = (max >= paper[i][k])?max:paper[i][k];
		}
	}
	printf("%d\n%d\n",count,max);

    return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

void s1(int m[][14], int x, int y){
    x+= 2; y+= 2;
    m[x][y]++;
    m[x+1][y]++;
    m[x-1][y]++;
    m[x][y+1]++;
    m[x][y-1]++;
}
void s2(int m[][14], int x, int y){
    x+= 2; y+= 2;
    m[x][y]++;
    m[x+1][y]++;
    m[x-1][y]++;
    m[x][y+1]++;
    m[x][y-1]++;
    m[x+1][y+1]++;
    m[x+1][y-1]++;
    m[x-1][y+1]++;
    m[x-1][y-1]++;
}
void s3(int m[][14], int x, int y){
    x+= 2; y+= 2;
    m[x][y]++;
    m[x+1][y]++;
    m[x-1][y]++;
    m[x][y+1]++;
    m[x][y-1]++;
    m[x+1][y+1]++;
    m[x+1][y-1]++;
    m[x-1][y+1]++;
    m[x-1][y-1]++;
    m[x+2][y]++;
    m[x-2][y]++;
    m[x][y+2]++;
    m[x][y-2]++;
}

int main(){
    int x,y,s;
    char g;
    int m[14][14] = {{0}};
    int ans[2] = {0};

    while(cin >> x >> g >> y >> g >> s){
        if(s == 1) s1(m,x,y);
        else if(s == 2) s2(m,x,y);
        else if(s == 3) s3(m,x,y);
    }
    range(i,2,12){
        range(j,2,12){
            if(m[i][j] == 0){
                ans[0]++;
            }
            if(ans[1] < m[i][j]){
                ans[1] = m[i][j];
            }
        }
    }
    cout << ans[0] << endl << ans[1] << endl;
}

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

#define W 10
#define H 10

int main()
{
	vector< vector<int> > paper(W, vector<int>(H, 0));
	int x, y, size;
	int i, j;
	int blank, max;

	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		switch (size) {
			case 3:
				if (x-2 >= 0) paper[x-2][y] ++;
				if (x+2 < W) paper[x+2][y] ++;
				if (y-2 >= 0) paper[x][y-2] ++;
				if (y+2 < H) paper[x][y+2] ++;
			case 2:
				if (x-1 >= 0 && y-1 >= 0) paper[x-1][y-1] ++;
				if (x-1 >= 0 && y+1 <= H) paper[x-1][y+1] ++;
				if (x+1 <= W && y-1 >= 0) paper[x+1][y-1] ++;
				if (x+1 <= W && y+1 <= H) paper[x+1][y+1] ++;
			case 1:
				if (x-1 >= 0) paper[x-1][y] ++;
				if (x+1 < W) paper[x+1][y] ++;
				if (y-1 >= 0) paper[x][y-1] ++;
				if (y+1 < H) paper[x][y+1] ++;
				paper[x][y] ++;
				break;
		}
	}

	blank = 0;
	max = 0;
	for (i = 0; i < W; i++) {
		for (j = 0; j < H; j++) {
			if (paper[i][j] == 0) blank++;
			else if (paper[i][j] > max) max = paper[i][j];
		}
	}

	cout<<blank<<endl;
	cout<<max<<endl;

	return 0;
}

C++: #include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
const int MAP_SIZE = 100;
#define drp(y, x) m[(y) + 10][(x) + 10] += 1

int m[MAP_SIZE][MAP_SIZE];

void setMap(int y, int x, int s);
void searchMap();

int main(){
    int x, y, s;
    memset(m, 0, sizeof(m));
    while(scanf("%d,%d,%d", &x, &y, &s) != EOF) setMap(y, x, s);
    searchMap();
    return 0;
}

void setMap(int y, int x, int s){
    drp(y, x);
    int mx[3][4] = {{0, 1, 0, -1}, {-1, 1, 1, -1}, {0, 2, 0, -2}};
    int my[3][4] = {{-1, 0, 1, 0}, {-1, -1, 1, 1}, {-2, 0, 2, 0}};
    for(int i = 0; i < s; i++){
        for(int j = 0; j < 4; j++){
            drp(y + my[i][j], x + mx[i][j]);
        }
    }
}

void searchMap(){
    int blankSum = 0, max = -1;
    for(int i = 10; i < 20; i++){
        for(int j = 10; j < 20; j++){
            if(m[i][j] > max) max = m[i][j];
            if(m[i][j] == 0) blankSum++;
        }
    }
    cout <<blankSum <<endl <<max <<endl;
}