Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d", count, max)
}

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

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

void small(int x, int y) {
	paper[x + 2][y + 1]++;
	paper[x + 1][y + 2]++;
	paper[x + 2][y + 2]++;
	paper[x + 3][y + 2]++;
	paper[x + 2][y + 3]++;
}

void medium(int x, int y) {
	for (int i = 1; i <= 3; i++) {
		for (int j = 1; j <= 3; j++) {
			paper[x + j][y + i]++;
		}
	}
}

void big(int x, int y) {
	paper[x + 2][y]++;
	paper[x][y + 2]++;
	paper[x + 4][y + 2]++;
	paper[x + 2][y + 4]++;
	for (int i = 1; i <= 3; i++) {
		for (int j = 1; j <= 3; j++) {
			paper[x + j][y + i]++;
		}
	}
}

int main() {
	int x, y, z, white = 0, con = 0;

	while (scanf("%d,%d,%d", &x, &y, &z) != EOF) {
		if (z == 1) {
			small(x, y);
		}
		else if (z == 2) {
			medium(x, y);
		}
		else if (z == 3) {
			big(x, y);
		}
	}
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (paper[i][j] == 0) {
				white++;
			}
			if (paper[i][j] > con) {
				con = paper[i][j];
			}
		}
	}
	cout << white << endl << con << endl;
}

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

#define W 10
#define H 10

int main()
{
	vector< vector<int> > paper(W, vector<int>(H));
	int x, y, size;
	int i, j;
	int blank, max;

	while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
		switch (size) {
			case 3:
				if (x-2 >= 0) paper[x-2][y] ++;
				if (x+2 < W) paper[x+2][y] ++;
				if (y-2 >= 0) paper[x][y-2] ++;
				if (y+2 < H) paper[x][y+2] ++;
			case 2:
				if (x-1 >= 0 && y-1 >= 0) paper[x-1][y-1] ++;
				if (x-1 >= 0 && y+1 <= H) paper[x-1][y+1] ++;
				if (x+1 <= W && y-1 >= 0) paper[x+1][y-1] ++;
				if (x+1 <= W && y+1 <= H) paper[x+1][y+1] ++;
			case 1:
				if (x-1 >= 0) paper[x-1][y] ++;
				if (x+1 < W) paper[x+1][y] ++;
				if (y-1 >= 0) paper[x][y-1] ++;
				if (y+1 < H) paper[x][y+1] ++;
				paper[x][y] ++;
				break;
		}
	}

	blank = 0;
	max = 0;
	for (i = 0; i < W; i++) {
		for (j = 0; j < H; j++) {
			if (paper[i][j] == 0) blank++;
			else if (paper[i][j] > max) max = paper[i][j];
		}
	}

	cout<<blank<<endl;
	cout<<max<<endl;

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int x[10][10];
  int a,b,c;
  int yoso[3]={4,8,12};
  int tmp[3][2][12]={{{-1,0,1,0},{0,1,0,-1}},{{-1,-1,-1,0,1,1,1,0},{-1,0,1,1,1,0,-1,-1}},{{-1,-1,-1,0,1,1,1,0,-2,0,2,0},{-1,0,1,1,1,0,-1,-1,0,2,0,-2}}};
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      x[i][j]=0;
    }
  }

  while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
    c--;x[a][b]++;
    for(int i=0;i<yoso[c];i++){
      if(a+tmp[c][0][i]>=0&&a+tmp[c][0][i]<10&&b+tmp[c][1][i]>=0&&tmp[c][1][i]<10){
	x[a+tmp[c][0][i]][b+tmp[c][1][i]]++;
      }
    }
  }
  int cnt=0,max=0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(x[i][j]==0)cnt++;
      if(x[i][j]>max)max=x[i][j];
    }
  }
  cout << cnt << endl << max << endl;
}

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

int main(){
	int x,y,s;
	char b;
	int n=10;
	int x1[]={1,0,-1,0};
	int y1[]={0,1,0,-1};
	int x2[]={1,1,-1,-1};
	int y2[]={1,-1,1,-1};
	int x3[]={2,0,-2,0};
	int y3[]={0,2,0,-2};
	
	vector<vector<int> > a(n,vector<int>(n,0));
	while(cin>>x>>b>>y>>b>>s){
		//if(x==-1)break;
		a[x][y]++;
		for(int i=0;i<4;i++){
			if(x+x1[i]>-1&&y+y1[i]>-1&&x+x1[i]<10&&y+y1[i]<10){
				a[x+x1[i]][y+y1[i]]++;
			}
		}
		
		if(s>1){
				for(int i=0;i<4;i++){
				if(x+x2[i]>-1&&y+y2[i]>-1&&x+x2[i]<10&&y+y2[i]<10){
					a[x+x2[i]][y+y2[i]]++;
				}
			}
		}
		
		if(s>2){
				for(int i=0;i<4;i++){
				if(x+x3[i]>-1&&y+y3[i]>-1&&x+x3[i]<10&&y+y3[i]<10){
					a[x+x3[i]][y+y3[i]]++;
				}
			}
		}
	}
	int ans=0;
	int ans2=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)ans++;
			ans2=max(ans2,a[i][j]);
		}
	}
	
	cout<<ans<<endl<<ans2<<endl;
	return 0;
}

C++: //0026 Dropping Ink
//ÉCNðÆµÄV~ðÂ¯é
//¢­ç©CNðÆµ½ãAÜ¾V~ªoÄ¢È¢Æ±ëÆAêÔZ¢V~ÌÊð¦æ

//¡ñàI¹ð½à¢ÄÈ¢æH

#include<iostream>
#include<algorithm>
#include<limits>
using namespace std;

class Paper
{
public:
	static const int N = 10;
	static const int SIDE_SIZE = N+4;	//åÌCNÅRêÈ¢öxÌCN
	static const int FIELD_SIZE= SIDE_SIZE * SIDE_SIZE;
private:
	int a[FIELD_SIZE];
public:

	Paper(){fill(a, a+FIELD_SIZE, 0);}
	void Drop(int x, int y, int dropSize)
	{
		if(dropSize >= 3)
		{
			static const int X[] = {-2, 0, 2, 0};
			static const int Y[] = {0,  2, 0,-2};
			const int s = sizeof(X)/sizeof(X[0]);
			for(int i = 0; i < s; i++)
				Get(x+X[i], y+Y[i])++;
		}
		if(dropSize >= 2)
		{
			static const int X[] = {-1, 1, 1, -1};
			static const int Y[] = {1, -1, 1, -1};
			const int s = sizeof(X)/sizeof(X[0]);
			for(int i = 0; i < s; i++)
				Get(x+X[i], y+Y[i])++;
		}
		static const int X[] = {0, 1, 0, -1, 0};
		static const int Y[] = {0, 0, 1, 0, -1};
		const int s = sizeof(X)/sizeof(X[0]);
		for(int i = 0; i < s; i++)
			Get(x+X[i], y+Y[i])++;
	}
	int& Get(int x, int y){return a[(y+2)*SIDE_SIZE + (x+2)];}
};

int main(void)
{
	int x, y, size;
	char dummy;

	Paper p;

	while( cin >> x >> dummy >> y >> dummy >> size )
	{
		p.Drop(x, y, size);
	}

	int whiteCount = 0,
		maxDensity = numeric_limits<int>::min();
	for(x = 0; x < Paper::N; x++)
	{
		for(y = 0; y < Paper::N; y++)
		{
			int density = p.Get(x, y);
			if(!density)
				whiteCount++;
			maxDensity = max(maxDensity, density);
		}
	}

	cout << whiteCount << endl << maxDensity << endl;

	return 0;
}