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<algorithm>
using namespace std;
int x,y,size,maxm,cnt;
int t[10][10];
char ch;
void pl(int y,int x){
  if(y<0||y==10||x<0||x==10)return;
  t[y][x]++;
  maxm=max(maxm,t[y][x]);
}

int main(){
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      t[i][j]=0;
  maxm=-1;
  while(cin>>x>>ch>>y>>ch>>size){
    if(size==1){
      pl(y,x);pl(y+1,x);pl(y-1,x);pl(y,x+1);pl(y,x-1);
    }else if(size==2){
      for(int i=y-1;i<y+2;i++){
	for(int j=x-1;j<x+2;j++){
	  pl(i,j);
	}
      }
    }else{
      for(int i=y-1;i<y+2;i++){
	for(int j=x-1;j<x+2;j++){
	  pl(i,j);
	}
      }
      pl(y+2,x);pl(y-2,x);pl(y,x+2);pl(y,x-2);
    }
  }
  cnt=0;
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      if(t[i][j]==0)cnt++;
  cout<<cnt<<endl;
  cout<<maxm<<endl;
  return 0;
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

const int MAX_H = 10;
const int MAX_W = 10;
int m[MAX_H][MAX_W];
int x, y ,s;
int cnt = MAX_H * MAX_W;
int mx;

inline bool check(int x, int y){ return 0<=x&&x<MAX_H && 0<=y&&y<=MAX_W; }

void dfs(int x, int y)
{
  maxup(mx, m[x][y]);
  m[x][y] = 0;
  cnt -= 1;
  erep(dx, -1, 1) erep(dy, -1, 1) if(check(x+dx, y+dy)) if(m[x+dx][y+dy]) dfs(x+dx, y+dy);
}

int main()
{
  while(scanf(" %d,%d,%d", &x, &y, &s) == 3){
    m[x][y] += 1;
    if(s%2){
      int d = s/2 + 1;
      int dx[] = {-d, 0, d, 0};
      int dy[] = {0, -d, 0, d};
      rep(i, 4) if(check(x+dx[i], y+dy[i])) m[x+dx[i]][y+dy[i]] += 1;
    }
    if(s-1){
      erep(i, -1, 1) erep(j, -1, 1) if(i || j) if(check(x+i, y+j)) m[x+i][y+j] += 1;
    }
  }

  rep(i, MAX_H) rep(j, MAX_W) if(m[i][j]) dfs(i, j);

  cout << cnt << endl << mx << endl;

  return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int mas[10][10]={0};
  int dx1[5]={1,0,0,0,-1},dx2[9]={1,1,1,0,0,0,-1,-1,-1},dx3[13]={2,1,1,1,0,0,0,0,0,-1,-1,-1,-2};
  int dy1[5]={0,0,1,-1,0},dy2[9]={1,0,-1,1,0,-1,1,0,-1},dy3[13]={0,1,0,-1,2,1,0,-1,-2,1,0,-1,0};
  int x,y,size,nx,ny,bell=0,hess=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    if(size==1){
      for(int i=0;i<5;i++){
	nx=x+dx1[i];
        ny=y+dy1[i];
	if(nx>=0 && nx<10 && ny>=0 && ny<10){
	  mas[ny][nx]++;
	}
      }
    }
    else if(size==2){
      for(int i=0;i<9;i++){
	nx=x+dx2[i];
	ny=y+dy2[i];
	if(nx>=0 && nx<10 && ny>=0 && ny<10){
	  mas[ny][nx]++;
	}
      }
    }
    else if(size==3){
      for(int i=0;i<13;i++){
	nx=x+dx3[i];
	ny=y+dy3[i];
	if(nx>=0 && nx<10 && ny>=0 && ny<10){
	  mas[ny][nx]++;
	}
      }
    }
    /*for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
      cout << mas[i][j];
      }
      cout << endl;
      }*/
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j]>bell){
	bell=mas[i][j];
      }
      if(mas[i][j]==0){
	hess++;
      }
    }
  }
  cout << hess << endl << bell << endl;
  return (0);
}

C++: #include <bits/stdc++.h>
using namespace std;
int paper[10][10];
const int dx[] = { 0, 0, -1, 1, -1, -1,  1, 1,  0, 0, -2, 2};
const int dy[] = {-1, 1,  0, 0, -1,  1, -1, 1, -2, 2,  0, 0};

int main() {
  int x, y, s;
  char c;
  while (cin >> x >> c >> y >> c >> s) {
    paper[y][x]++;
    for (int i = 0; i < s * 4; i++) {
      int px = x + dx[i];
      int py = y + dy[i];
      if (px >= 0 && px < 10 && py >= 0 && py < 10){
        paper[py][px]++;
      }
    }
  }
  int num_of_cells = 0, max_density = 0;
  for (int i = 0; i < 10; i++)
  {
    for (int j = 0; j < 10; j++)
    {
      if (paper[j][i] == 0) num_of_cells++;
      max_density = max(paper[j][i], max_density);
    }
  }
  cout << num_of_cells << "\n" << max_density << "\n";
}

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

int paper[10][10] = { 0 };

void drop_ink(int x,int y,int size) {
	if (size == 1) {
		for (int i = 0; i < 3; i++) {
			if (x + i - 1 >= 0 && y >= 0)paper[x + i - 1][y] += 1;
		}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y + i - 1 >= 0) {
				if (y + i - 1 != y)paper[x][y + i - 1] += 1;
			}
		}
	}
	else if (size == 2) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y - 1 + i >= 0) {
				paper[x][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
				}
			}
	}
	else if (size == 3) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
			}
		}
		for (int i = 0; i < 5; i++) {
			if (x >= 0 && y - 2 + i >= 0) {
				paper[x][y - 2 + i] += 1;
			}
		}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
			}
		}
		if (x + 2 >= 0 && y >= 0)paper[x + 2][y] += 1;
		if (x - 2 >= 0 && y >= 0)paper[x - 2][y] += 1;
	}
}
int main() {
	char x[1], y[1], size[1]; char tem[5];
	int white = 0; int most_intense=0;
	while(cin>>tem) {
		x[0] = tem[0]; y[0] = tem[2]; size[0] = tem[4];
		drop_ink(atoi(x),atoi(y),atoi(size));
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[j][i] == 0)white += 1;
			if (most_intense < paper[j][i])most_intense = paper[j][i];
		}
	}
	cout << white << endl << most_intense << endl;
	return 0;
}