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>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 
 using namespace std;
 
 double abs(double x)
 {
   if(x<0) return -x;
   else return x;       
 }
 
 bool judge(int x,int y)
 {
   if(x>=0&&x<10&&y>=0&&y<10) return true;
   else return false;     
 }
  
 int main()
 {
   int map[10][10]={{0}};
   int x,y,s;
   int dep=0;
   int blank=0;
   char temp;
   while(cin>>x>>temp>>y>>temp>>s)
   {
     if(s==1)
     {
       if(judge(x-1,y)) map[x-1][y]++;
       if(judge(x+1,y)) map[x+1][y]++;
       if(judge(x,y+1)) map[x][y+1]++;
       if(judge(x,y-1)) map[x][y-1]++;
       if(judge(x,y)) map[x][y]++;        
     }                   
     else if(s==2)
     {
       for(int i=-1;i<=1;i++)
       {
         for(int j=-1;j<=1;j++)
         {
           if(judge(x+i,y+j)) map[x+i][y+j]++;       
         }        
       }     
     }
     else
     {
       for(int i=-1;i<=1;i++)
       {
         for(int j=-1;j<=1;j++)
         {
           if(judge(x+i,y+j)) map[x+i][y+j]++;       
         }        
       }   
       if(judge(x-2,y)) map[x-2][y]++;
       if(judge(x+2,y)) map[x+2][y]++;
       if(judge(x,y+2)) map[x][y+2]++;
       if(judge(x,y-2)) map[x][y-2]++;    
     }
   }
   for(int i=0;i<10;i++)
   {
     for(int j=0;j<10;j++)
     {
       if(!map[i][j]) blank++;
       if(map[i][j]>dep) dep=map[i][j];        
     }        
   }
   cout<<blank<<dep<<endl;
   //while(1);      
   return 0;    
 }

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

int dx[] = {-1, 1,  0, 0};
int dy[] = { 0, 0, -1, 1};
int density[10][10];

bool WithinRange(int y, int x) {
  if (y < 0) return false;
  if (y >= 10) return false;
  if (x < 0) return false;
  if (x >= 10) return false;
  return true;
}

int main() {
  while (1) {
    int x, y, t;
    if (scanf("%d,%d,%d", &x, &y, &t) != 3) break;
    if (t == 1) {
      density[y][x]++;
      for (int i=0; i<4; i++) {
        int newy = y+dy[i];
        int newx = x+dx[i];
        if (WithinRange(newy, newx)) density[newy][newx]++;
      }
    } else if (t == 2) {
      for (int i=-1; i<=1; i++) {
        for (int j=-1; j<=1; j++) {
          int newy = y+i;
          int newx = x+j;
          if (WithinRange(newy, newx)) density[newy][newx]++;
        }
      }
    } else if (t == 3) {
      for (int i=-2; i<=2; i++) {
        for (int j=-2; j<=2; j++) {
          if (abs(i)+abs(j) > 2) continue;

          int newy = y+i;
          int newx = x+j;
          if (WithinRange(newy, newx)) density[newy][newx]++;
        }
      }
    }
  }

  int ans = 0;
  int mans = 0;
  for (int i=0; i<10; i++) { 
    for (int j=0; j<10; j++) {
      if (density[i][j] == 0) ans++;
      mans = max(density[i][j], mans);
    }
  }
  printf("%d\n", ans);
  printf("%d\n", mans);
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  string str;
  int paper[10][10];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      paper[i][j]=0;
    }
  }
  int I=50;
  while(cin >> str){
    int x,y,s;
    x=str[0]-48;
    y=str[2]-48;
    s=str[4]-48;
    if(s==1){
      paper[x][y]++;
      paper[x+1][y]++;
      paper[x-1][y]++;
      paper[x][y+1]++;
      paper[x][y-1]++;
    }
    else if(s==2){
      paper[x][y]++;
      paper[x][y+1]++;
      paper[x][y-1]++;
      paper[x+1][y]++;
      paper[x+1][y+1]++;
      paper[x+1][y-1]++;
      paper[x-1][y]++;
      paper[x-1][y+1]++;
      paper[x-1][y-1]++;
    }
    else if(s==3){
      paper[x][y-2]++;
      paper[x+1][y-1]++;
      paper[x][y-1]++;
      paper[x-1][y-1]++;
      paper[x-2][y]++;
      paper[x-1][y]++;
      paper[x][y]++;
      paper[x+1][y]++;
      paper[x+2][y]++;
      paper[x-1][y+1]++;
      paper[x][y+1]++;
      paper[x+1][y+1]++;
      paper[x][y+2]++;
    }
    int white=0,koii=0;
    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
        if(paper[i][j]==0)white++;
        koii=max(koii,paper[i][j]);
      }
    }
    cout << white << endl << koii << endl;
  }
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int mp[21][21];
void drop(int x,int y,int size){
  if(size==1)mp[y][x]++,mp[y+1][x]++,mp[y-1][x]++,mp[y][x+1]++,mp[y][x-1]++;
  if(size==2 || size==3)
    for(int i=-1;i<=1;i++)
      for(int j=-1;j<=1;j++) mp[y+i][x+j]++;
  if(size==3) mp[y+2][x]++,mp[y-2][x]++,mp[y][x+2]++,mp[y][x-2]++;
}
int main() {
  int x,y,size;
  while(scanf("%d,%d,%d",&x,&y,&size) != EOF) drop(x+10,y+10,size);
  int cnt=100,mxsize=0;
  for(int i=10;i<20;i++)
    for(int j=10;j<20;j++)
      if(mp[i][j] != 0)cnt--,mxsize=max(mxsize,mp[i][j]);
  cout << cnt <<endl<<mxsize<<endl;
  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
using namespace std;

int main(){
	int m[20][20]={},x,y,s,X,Y,max=0,ans=0;
	char c;
	while(cin>>x){
		cin>>c>>y>>c>>s;
		X=x+2; Y=y+2;
		m[X][Y]++; m[X+1][Y]++; m[X-1][Y]++;
		m[X][Y-1]++; m[X][Y+1]++;
		if(s==2||s==3){
			m[X-1][Y-1]++; m[X-1][Y+1]++;
			m[X+1][Y-1]++; m[X+1][Y+1]++;
		}
		if(s==3){
			m[X][Y-2]++; m[X][Y+2]++;
			m[X-2][Y]++; m[X+2][Y]++;
		}
	}
	rep(i,2,12){
		rep(j,2,12){
			if(m[i][j]==0) ans++;
			if(m[i][j]>max) max=m[i][j];
		}
	}
	cout<<ans<<endl<<max<<endl;
}

C++: #include <stdio.h>
#define H 14

int main(void){
	int b[H][H];
	int x, y, s;
	int w=0, h=0;
	for(int i=0; i<H; ++i){
		for(int j=0; j<H; ++j){
			b[i][j] = 0;
		}
	}

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		x += 2;
		y += 2;
		switch(s){
		case 3:
			b[x][y-2]++;
			b[x-2][y]++;
			b[x+2][y]++;
			b[x][y+2]++;
		case 2:
			b[x-1][y-1]++;
			b[x+1][y-1]++;
			b[x-1][y+1]++;
			b[x+1][y+1]++;
		case 1:
			b[x][y-1]++;
			b[x-1][y]++;
			b[x][y]++;
			b[x+1][y]++;
			b[x][y+1]++;
			break;
		}
	}

	for(int i=2; i< H-2; ++i){
		for(int j=2; j<H-2; ++j){
			if(b[i][j] == 0){
				w++;
			}else if(h < b[i][j]){
				h = b[i][j];
			}
		}
	}
	printf("%d\n%d\n", w, h);

	return 0;
}