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 <stdio.h>
////#include <math.h>
////int main(){
////double v;
////while(scanf("%lf",&v) != EOF){
////double y=v*v/19.6;
////int z=y;
////if(y==z){
////if(z%5==0){
////	z=y/5+1;
////printf("%d\n",z);
////continue;
////}
////}
////int q=y/5;
////q += 2;
////printf("%d\n",q);
////}
////return 0;
//
//#include <stdio.h>
//  int main(){ 
//	  int a[5],b[5],i,j;
//	  int hit=0,blow=0;
//	  while(scanf("%d %d %d %d %d %d %d %d",&a[1],&a[2],&a[3],&a[4],&b[1],&b[2],&b[3],&b[4]) != EOF){
//		  for(i=1;i<=4;i++){
//			  if(a[i]==b[i]){
//				  hit++;
//			  }
//		  }
//		  for(i=1;i<=4;i++){
//			  for(j=1;j<= 4;j++){
//				  if(j != i){
//				  if(a[i]==b[j]){
//					  blow++;
//				  }	  
//			  }
//			  }
//		  }
//		  printf("%d %d\n",hit,blow);
//		  hit=0; blow=0;
//	  }
//	  return 0;
//  }
#include <stdio.h>
  int xy[10][10]={};
  int main(){
	  int x,y,s,i,j,num1=0;
	  while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
		  if(s==1){
			  xy[x][y]++;
			  xy[x-1][y]++;
			  xy[x+1][y]++;
			  xy[x][y-1]++;
			  xy[x][y+1]++;
		  }else if(s==2){
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
		  }else{
			  xy[x-2][y]++;
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-2]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x][y+2]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
			  xy[x+2][y]++;
		  }
	  }
	  int max=xy[0][0];
	  for(i=0;i<10;i++){
		  for(j=0;j<10;j++){
			  if(xy[i][j]==0) num1++;
			  if(xy[i][j]>max) max=xy[i][j];
		  }
	  }
	  printf("%d\n%d\n",num1,max);
	  return 0;
  }

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

int main(){
	int x,y,size,glid[10][10];
	int max = 0,count = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			glid[i][j]=0;
		}
	}

	while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
		glid[x][y]++;
		if(size == 1){
			if(x-1 >= 0 && x-1 < 10) glid[x-1][y]++;
			if(x+1 >= 0 && x+1 < 10) glid[x+1][y]++;
			if(y-1 >= 0 && y-1 < 10) glid[x][y-1]++;
			if(y+1 >= 0 && y+1 < 10) glid[x][y+1]++;
		}
		if(size == 2){
			if(x-1 >= 0 && x-1 < 10) glid[x-1][y]++;
			if(x+1 >= 0 && x+1 < 10) glid[x+1][y]++;
			if(y-1 >= 0 && y-1 < 10) glid[x][y-1]++;
			if(y+1 >= 0 && y+1 < 10) glid[x][y+1]++;
			if(x-1 >= 0 && y+1 >= 0 && x-1 < 10 && y+1 < 10) glid[x-1][y+1]++;
			if(x+1 >= 0 && y+1 >= 0 && x+1 < 10 && y+1 < 10) glid[x+1][y+1]++;
			if(x-1 >= 0 && y-1 >= 0 && x-1 < 10 && y-1 < 10) glid[x-1][y-1]++;
			if(x+1 >= 0 && y-1 >= 0 && x+1 < 10 && y-1 < 10) glid[x+1][y-1]++;
		}
		if(size == 3){
			if(x-1 >= 0 && x-1 < 10) glid[x-1][y]++;
			if(x+1 >= 0 && x+1 < 10) glid[x+1][y]++;
			if(y-1 >= 0 && y-1 < 10) glid[x][y-1]++;
			if(y+1 >= 0 && y+1 < 10) glid[x][y+1]++;
			if(x-1 >= 0 && y+1 >= 0 && x-1 < 10 && y+1 < 10) glid[x-1][y+1]++;
			if(x+1 >= 0 && y+1 >= 0 && x+1 < 10 && y+1 < 10) glid[x+1][y+1]++;
			if(x-1 >= 0 && y-1 >= 0 && x-1 < 10 && y-1 < 10) glid[x-1][y-1]++;
			if(x+1 >= 0 && y-1 >= 0 && x+1 < 10 && y-1 < 10) glid[x+1][y-1]++;
			if(x-2 >= 0 && x-2 < 10) glid[x-2][y]++;
			if(x+2 >= 0 && x+2 < 10) glid[x+2][y]++;
			if(y-2 >= 0 && y-2 < 10) glid[x][y-2]++;
			if(y+2 >= 0 && y+2 < 10) glid[x][y+2]++;
		}
	}
	
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if(max < glid[i][j])
				max = glid[i][j];
			if(glid[i][j] == 0)
				count++;
		}
	}
			cout << count << endl << max << endl;

}

C++: #include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <cstdlib>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

vector<string> split(const string &str, char delim)
{
  vector<string> res;
  size_t current = 0, found;
  while((found = str.find_first_of(delim, current)) != string::npos)
  {
    res.push_back(string(str, current, found - current));
    current = found + 1;
  }
  res.push_back(string(str, current, str.size() - current));
  return res;
}

int f[10][10];

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

void dropInk(int x,int y,int size)
{
	if(size == 1)
	{
		f[x][y]++;
		if(checkf(x+1,y)) f[x+1][y]++;
		if(checkf(x-1,y)) f[x-1][y]++;
		if(checkf(x,y+1)) f[x][y+1]++;
		if(checkf(x,y-1)) f[x][y-1]++;
	}
	else if(size == 2)
	{
		REP(i,-1,2)
		{
			REP(j,-1,2)
			{
				if(checkf(x+i,y+j)) f[x+i][y+j]++;
			}
		}
	}
	else if(size == 3)
	{
		REP(i,-1,2)
		{
			REP(j,-1,2)
			{
				if(checkf(x+i,y+j)) f[x+i][y+j]++;
			}
		}
		if(checkf(x+2,y)) f[x+2][y]++;
		if(checkf(x-2,y)) f[x-2][y]++;
		if(checkf(x,y+2)) f[x][y+2]++;
		if(checkf(x,y-2)) f[x][y-2]++;
	}
}

int main()
{
	memset(f,0,sizeof(f));
	string s;
	while(cin >> s)
	{
		vector<string> _s = split(s,',');
		int x = atoi(_s[0].c_str());
		int y = atoi(_s[1].c_str());
		int size = atoi(_s[2].c_str());

		dropInk(y,x,size);
	}

	int count = 0;
	int ans = 0;
	rep(i,10)
	{
		rep(j,10)
		{
			if(f[i][j] == 0)
			{
				count++;
			}
			ans = max(ans,f[i][j]);
		}
	}

	cout << count << endl << ans << endl;
	return 0;
}

C++: #include <stdio.h>
int main() {
    int RB[10][10],i,j,k;for (i=0;i<10;i++) for (j=0;j<10;RB[i][j++]=0);while (scanf("%d,%d,%d",&i,&j,&k)!=EOF) {
        RB[i][j]++;if (i) RB[i-1][j]++;if (i<9) RB[i+1][j]++;if (j) RB[i][j-1]++;if (j<9) RB[i][j+1]++;if (k>1) {if (i*j) RB[i-1][j-1]++;if (i<9 && j<9) RB[i+1][j+1]++;if (i && j<9) RB[i-1][j+1]++;if (i<9 && j) RB[i+1][j-1]++;} if (k==3) {if (i>1) RB[i-2][j]++;if (i<8) RB[i+2][j]++;if (j>1) RB[i][j-2]++;if (j<8) RB[i][j+2]++;}}
    for (i=0,k=100;i<10;i++) for (j=0;j<10;j++) if (RB[i][j]) k--;printf("%d\n",k);for (i=0,k=0;i<10;i++) for (j=0;j<10;j++) if (RB[i][j]>k) k=RB[i][j];printf("%d\n",k);return 0;}