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<cstdio>
using namespace std;
#define loop(i,a,b) for(int i = a ; i < b ; i++)
#define rep(i,a) for(int i = 0 ; i < a ; i++) 

int maze[10][10];
int smallx[5] = {1,-1,0,0,0};
int smally[5] = {0,0,0,1,-1};
int midx[4] = {1,1,-1,-1};
int midy[4] = {1,-1,1,-1};
int largex[4] = {2,-2,0,0};
int largey[4] = {0,0,2,-2};

bool inmaze(int x,int y){
  return (0<=x && x<10) && (0<=y && y<10);
	     
}
void Fsmall(int x,int y){
  rep(i,5)
    if(inmaze(x+smallx[i],y+smally[i]))
       maze[x+smallx[i]][y+smally[i]]++;
       
}
void Fmid(int x,int y){
  rep(i,4)
    if(inmaze(x+midx[i],y+midy[i]))
       maze[x+midx[i]][y+midy[i]]++;
}
void Flarge(int x,int y){
  rep(i,5)
    if(inmaze(x+largex[i],y+largey[i]))
    maze[x+largex[i]][y+largey[i]]++;
}
int main(void){
  int x,y,size;
  rep(i,10)rep(j,10)maze[i][j] = 0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF)
    switch(size){
    case 3:
      Flarge(x,y);
    case 2:
      Fmid(x,y);
    case 1:
      Fsmall(x,y);
    }
  int no = 0,ma = -1;
  rep(i,10)rep(j,10){
    if(maze[i][j] == 0)no ++;
    ma = max(ma,maze[i][j]);
  }
  cout<<no<<endl<<ma<<endl;
  
}

C++: #include <iostream>
using namespace std;
 
int ds[3] = {5,9,13};
int dx[13] = { 0,-1, 0, 1, 0,-1, 1,-1, 1, 0,-2, 2, 0};
int dy[13] = {-1, 0, 0, 0, 1,-1,-1, 1, 1,-2, 0, 0, 2};
 
int main() {
 
  int x,y,size;
  char c;
  int map[14][14] = {0};
 
  int cnt = 0;
  int map_max = 0;
 
  while( cin >> x >> c >> y >> c >> size ) {
 
    for ( int i = 0; i < ds[size-1]; i++ ) {
 
      map[ x+2 + dx[i] ][ y+2 + dy[i] ]++;
 
    }
 
  }
 
  for ( int i = 2; i < 12; i++ ) {
    for ( int j = 2; j < 12; j++ ) {
       
      if ( map[i][j] == 0 ) cnt++;
      map_max = max( map_max, map[i][j] );
       
    }
  }
 
  cout << cnt << endl << map_max << endl;
 
  return 0;
 
}

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve
int b[10][10];

void set_(int x, int y){
  if(x >= 0 && x < 10 && y >= 0 && y < 10)b[x][y] += 1;
}

int main(int argc, char const* argv[])
{
  string ss;
  while(cin >> ss){
    int x = -1, y = -1, s;
    string tmp = "";
    rep(i, ss.size()){
      if(ss[i] != ',')tmp += ss[i];
      else{
        if(x == -1)x = stoi(tmp);
        else y = stoi(tmp);
        tmp = "";
      }
    }
    s = stoi(tmp);
    if(s == 1){
      set_(x, y-1);
      set_(x-1, y); set_(x, y); set_(x+1, y);
      set_(x, y+1);
    }else if(s == 2){
      rep(i, 3){
        rep(j, 3){
          set_(x + i - 1, y + j - 1);
        }
      }
    }else{
      set_(x, y - 2);
      set_(x, y + 2);
      set_(x - 2, y);
      set_(x + 2, y);
      rep(i, 3){
        rep(j, 3){
          set_(x + i - 1, y + j - 1);
        }
      }
    }
  }
  int res = 0;
  int maxi = 0;
  rep(i, 10){
    rep(j, 10){
      if(b[i][j] == 0)res++;
      maxi = max(maxi, b[i][j]);
    }
  }
  cout << res << endl;
  cout << maxi << endl;
	return 0;
}

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

inline bool a(int y, int x){
  return (0<=x && x<=9 && 0<=y && y<=9);
}

int d1[4][2]={{-1,0},{1,0},{0,1},{0,-1}};
int d2[4][2]={{1,1},{1,-1},{-1,1},{-1,-1}};
int d3[4][2]={{-2,0},{2,0},{0,2},{0,-2}};
int p[10][10];

void drop1(int y, int x){
  p[y][x]++;
  for(int i=0; i<4; i++)
    if(a(y+d1[i][0], x+d1[i][1]))p[y+d1[i][0]][x+d1[i][1]]++;
}

void drop2(int y, int x){
  drop1(y, x);
  for(int i=0; i<4; i++)
    if(a(y+d2[i][0], x+d2[i][1]))p[y+d2[i][0]][x+d2[i][1]]++;
}

void drop3(int y, int x){
  drop2(y, x);
  for(int i=0; i<4; i++)
    if(a(y+d3[i][0], x+d3[i][1]))p[y+d3[i][0]][x+d3[i][1]]++;
}

int main(){
  int x, y, z;
  int max=0, n=0;

  while(scanf("%d,%d,%d", &x, &y, &z)!=EOF){
    if(z==1)drop1(y, x);
    else if(z==2)drop2(y, x);
    else if(z==3)drop3(y, x);
  }
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(p[i][j]==0) n++;
      else if(max<p[i][j])max=p[i][j];
    }
  }
  cout << n << endl;
  cout << max << endl;

  return 0;
}