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 <sstream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <string.h>

using namespace std;

int sx[5] = {0, 1,  0, -1, 0};
int sy[5] = {0, 0, -1,  0, 1};

int mx[9] = {0, 1,  1,  0, -1, -1, -1, 0, 1};
int my[9] = {0, 0, -1, -1, -1,  0,  1, 1, 1};

int lx[13] = {0, 1,  1,  0, -1, -1, -1, 0, 1, 2,  0, -2, 0};
int ly[13] = {0, 0, -1, -1, -1,  0,  1, 1, 1, 0, -2,  0, 2};

int maze[10][10];

int i, j, xi, xj;

bool isValid(int a, int b) {
    return a >= 0 && b >= 0 && a < 10 && b < 10;
}

vector<string> split(string source, string pattern) {
    unsigned i, base = 0;
    vector<string> ret;
    string buff;

    for(i = 0; i < source.size(); i++) {
        if(source.substr(i, pattern.size()) == pattern) {
            ret.push_back(buff);
            i += pattern.size() - 1;
            buff.clear();
        } else {
            buff += source[i];
        }
    }
    ret.push_back(buff);
    return ret;
}

int main(void) {
    memset(maze, 0, sizeof(maze));

    int ai, aj, s;
    string p;
    vector<string> ok;

    while(getline(cin, p)) {
        ok.clear();
        ok = split(p, ",");

        aj = ok[1].size() > 1 ? 10 : ok[1][0] - '0';
        ai = ok[0].size() > 1 ? 10 : ok[0][0] - '0';
        s = ok[2].size() > 1 ? 10 : ok[2][0] - '0';

        if(s == 1) {
            for(i = 0; i < 5; i++) {
                xi = ai + sx[i];
                xj = aj + sy[i];

                if(isValid(xi, xj)) {
                    maze[xi][xj] += 1;
                }
            }
        } else if(s == 2) {
            for(i = 0; i < 9; i++) {
                xi = ai + mx[i];
                xj = aj + my[i];

                if(isValid(xi, xj)) {
                    maze[xi][xj] += 1;
                }
            }
        } else {
            for(i = 0; i < 13; i++) {
                xi = ai + lx[i];
                xj = aj + ly[i];

                if(isValid(xi, xj)) {
                    maze[xi][xj] += 1;
                }
            }
        }
    }

    int mx = 0, ct = 0;

    for(i = 0; i < 10; i++) {
        for(j = 0; j < 10; j++) {
            if(maze[i][j] == 0) ct += 1;
            mx = max(mx, maze[i][j]);
        }
    }
    cout << ct << endl << mx << endl;
    return 0;
}

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

int main(void){
  vector < vector <int> > square;
  square.resize(14);
  for(int i=0; (int)i<square.size(); i++){
    square[i].resize(14);
  }
  for(int i=0; i<(int)square.size(); i++){
    for(int j=0; j<(int)square[i].size(); j++){
      square[i][j] =0;
    }
  }

  int x, y, size;
  int min=0, max=0;

  while( cin >> x >> y >> size ){
    x+=2;
    y+=2;
    if(size>=1 && size<=3){
      square[y][x]++;
      square[y][x-1]++;
      square[y-1][x]++;
      square[y+1][x]++;
      square[y][x+1]++;
    }
    if(size==2 || size==3){
      square[y-1][x-1]++;
      square[y+1][x-1]++;
      square[y-1][x+1]++;
      square[y+1][x+1]++;
    }
    if(size==3){
      square[y][x-2]++;
      square[y-2][x]++;
      square[y+2][x]++;
      square[y][x+2]++;
    }
  }

  for(int i=2; (int)i<square.size()-2; i++){
    for(int j=2; (int)j<square.size()-2; j++){
      if( square[i][j]==0 ){
        min++;
      }else if(max < square[i][j]){
        max=square[i][j];
      }
    }
  }

  cout << min << endl << max << endl;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define drep(n,m) for(int i=0;i<n;i++)for(int j=0;j<m;j++)
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

ll gcd(ll a,ll b){
    if(a<b){
        int t=a;a=b;b=t;
    }
    int c=a%b;
    while(c!=0){
        a=b;
        b=c;
        c=a%b;
    }
    return b;
}

ll lcm(ll a,ll b){
    return a*b/gcd(a,b);
}

bool isPrime(int x){
    if(x==1)return false;
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=3;i<=sqrt(x);i+=2){
        if(x%i==0)return false;
    }
    return true;
}

vector<vector<int>> v;
void calc1(int x,int y){
    rep(i,0,4){
        int nx=x+dx[i],ny=y+dy[i];
        if(0<=nx&&0<=ny&&nx<10&&ny<10)v[ny][nx]++;
    }
}

void calc2(int x,int y){
    for(int i=-1;i<=1;i++){
        for(int j=-1;j<=1;j++){
            if(i!=0||j!=0){
                int nx=x+i,ny=y+j;
                if(0<=nx&&0<=ny&&nx<10&&ny<10)v[ny][nx]++;
            }
        }
    }
}

void calc3(int x,int y){
    calc2(x,y);
    rep(i,0,4){
        int nx=x+dx[i]*2,ny=y+dy[i]*2;
        if(0<=nx&&0<=ny&&nx<10&&ny<10)v[ny][nx]++;
    }
    
}
int main() {
    v.resize(10,vector<int>(10,0));
    int x,y,mode;
    char c;
    while(cin>>x>>c>>y>>c>>mode){
        if(mode==1)calc1(x,y);
        else if(mode==2)calc2(x,y);
        else if(mode==3)calc3(x,y);
        
        v[y][x]++;
    }
    
    int blank=0,ma=-INF;
    rep(i,0,10){
        rep(j,0,10){
            if(v[i][j]==0)blank++;
            ma=max(ma,v[i][j]);
        }
    }
    cout<<blank<<endl<<ma<<endl;
    
  
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int k[10][10]={0};
  int x,y,s,i,j;
  char c;
  int d=0,w=0;
  int S[4]={0,5,9,13};
  int X[]={0,1,-1,0,0,1,-1,1,-1,2,-2,0,0};
  int Y[]={0,0,0,1,-1,1,-1,-1,1,0,0,2,-2};
  while(cin>>x>>c>>y>>c>>s){
    for(i=0;i<S[s];i++){
      
      if(-1<x&&x<10){
	if(-1<y&&y<10){
	
	  k[x+X[i]][y+Y[i]]++;
	  if(k[x+X[i]][y+Y[i]]>d){
	    d=k[x+X[i]][y+Y[i]];
	  }
	}
      }
    }
  }
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(k[i][j]==0)w++;
    }
  }
  if(d!=0){
    cout<<w<<"\n"<<d<<endl;
  }
  return 0;
}