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>
using namespace std;

int main() {
	int x, y, size;
	int sol[10][10];
	char c;
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			sol[i][j] = 0;
		}
	}
	while(cin >> x >> c >> y >> c >> size) {
		sol[x][y]++;
		if(x - 1 >= 0) sol[x-1][y]++;
		if(y - 1 >= 0) sol[x][y-1]++;
		if(x + 1 < 10) sol[x+1][y]++;
		if(y + 1 < 10) sol[x][y+1]++;
		if(size >= 2) {			
			if(x-1 >= 0 && y-1 >= 0) sol[x-1][y-1]++;
			if(x+1 < 10 && y-1 >= 0) sol[x+1][y-1]++;
			if(x-1 >= 0 && y+1 < 10) sol[x-1][y+1]++;
			if(x+1 < 10 && y+1 < 10) sol[x+1][y+1]++;
		}
		if(size == 3) {
			if(y - 2 >= 0) sol[x][y-2]++;
			if(y + 2 < 10) sol[x][y+2]++;
			if(x - 2 >= 0) sol[x-2][y]++;
			if(x + 2 < 10) sol[x+2][y]++; 
		}
		/*
		for(int i = 0; i < 10; i++) {
			for(int j = 0; j < 10; j++) {
				cout << sol[i][j] << " " ;
			}
			cout << endl;
		}
		*/
	}
	int count = 0;
	int max = 0;
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			if(sol[i][j] == 0) count++;
			if(sol[i][j] > max) max = sol[i][j];
		}
	}
	cout << count << endl;
	cout << max << endl;
	return 0;
}

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

int map[10][10]={};
int sx[] = { 0,-1,1,0 } , sy[] = { -1,0,0,1 } ;
int mx[] = { -1,0,1 }, my[] = { -1,0,1 } ;
int lx[] = { 0,-1,0,1,-2,-1,1,2,-1,0,1,0 } ;
int ly[] = { -2,-1,-1,-1,0,0,0,0,1,1,1,2 } ;

int main(){
	
	int x,y,size ;
	char temp;
	int enpty=0,max=0;
	
	while(1){
		cin >> x ;
		if( cin.eof() ) break;
		cin >> temp >> y ;
		cin >> temp >> size ;
		
		map[x][y]++;
		
		if( size==1 ){
			for( int i=0 ; i<4 ; i++ ){
				if( x+sx[i]>=0 && x+sx[i]<=9 && y+sy[i]>=0 && y+sy[i]<=9 )
					map[x+sx[i]][y+sy[i]]++;
			}
		}
		else if( size==2 ){
			for( int i=0 ; i<9 ; i++ ){
				if( x+mx[i%3]>=0 && x+mx[i%3]<=9 && y+my[i/3]>=0 && y+my[i/3]<=9 )
					map[x+mx[i%3]][y+my[i/3]]++;
			}
		}
		else if( size==3 ){
			for( int i=0 ; i<12 ; i++ ){
				if( x+lx[i]>=0 && x+lx[i]<=9 && y+ly[i]>=0 && y+ly[i]<=9 )
					map[x+sx[i]][y+sy[i]]++;
			}
		}
	}
	
	for( int i=0 ; i<10 ; i++ ){
		for( int j=0 ; j<10 ; j++ ){
			if( map[i][j]==0 ) empty++;
			if( map[i][j]>max ) max=map[i][j] ;
		}
	}
	
	cout << empty << endl ;
	cout << max << endl ;
	
return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int a[10][10]={},x,y,size,dumy=0,max=0,ans=0;
	int mx[12]={0,-1,1,0,-1,1,-1,1,0,-2,2,0},my[12]={-1,0,0,1,-1,-1,1,1,-2,0,0,2};
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		dumy=4*size;
		//cout<<size<<endl;
		for(int i=0;i<dumy;i++){
			if(x+mx[i]>=0&&y+my[i]>=0)
			a[x+mx[i]][y+my[i]]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0){
				ans++;
			}else{
				if(max<=a[i][j])
				max=a[i][j];
			}
		}
	}
	cout<<ans<<endl<<max<<endl;
return 0;
}

C++: #include <iostream>
#include <cmath>
#include <vector>


using namespace std;
#define LENGTH 10

bool isDropEnabled(int x, int y){
  if(0<=x && x<LENGTH && 0<=y && y<LENGTH){
    return true;
  }else{
    return false;
  }
}
 



int main(){
  int x, y, size;
  char c;
  int density[LENGTH][LENGTH];
  for(int i=0;i<LENGTH;i++){
    for(int j=0;j<LENGTH;j++){
      density[i][j]=0;
    }
  }
  
  while(cin >> x >> c >> y >> c >> size){
    if(size==1){
      for(int i=-1;i<2;i++){
	for(int j=-1;j<2;j++){
	  if(isDropEnabled(x+i, y+j) && ((i+j)%2==1 || i==j==0)){
	    density[x+i][y+j]++;
	  }
	}
      }
    }

    if(size==2){
      for(int i=-1;i<2;i++){
	for(int j=-1;j<2;j++){
	  if(isDropEnabled(x+i, y+j)){
	    density[x+i][y+j]++;
	  }
	}
      }
    }

    if(size==3){
      for(int i=-2;i<3;i++){
	for(int j=-2;j<3;j++){
	  if(isDropEnabled(x+i, y+j) && (abs(i)+abs(j) <=2)){
	    density[x+i][y+j]++;
	  }
	}
      }
    }
    cout << ":" << x << " " << y << " " << size << endl;
  }

  cout << "out" << endl;

  
  //
  int empty=0;
  int max=0;
  for(int i=0;i<LENGTH;i++){
    for(int j=0;j<LENGTH;j++){
      if(density[i][j]==0){
	empty++;
      }else if(max < density[i][j]){
	max = density[i][j];
      }
    }
  }
  cout << empty << endl;
  cout << max << endl;
  
}

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

int pa[20][20];

int main(void)
{
	int x,y,c;

	while(true){
		cin >> x;
		if(cin.eof())
			break;
		cin.get();
		if(cin.eof())
			break;
		cin >> y;
		cin.get();
		cin >> c;
		if(cin.eof())
			break;

		if(c == 1){
			for(int i = -1; i <= 1; i++){
				pa[y][x-i]++;
				pa[y-i][x]++;

			}
			pa[y][x]--;
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
		}
		else if(c == 3){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
			pa[y+2][x+2]++;
			pa[y+2][x-2]++;
			pa[y-2][x-2]++;
			pa[y-2][x+2]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 1; i <= 10; i++){
		for(int j = 1; j <= 10; j++){
			if(pa[i][j])
				count++;
			if(max < pa[i][j])
				max = pa[i][j];
		}
	}
	count = 100 - count;
	cout << count << endl << max << endl;


	return 0;
}