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

int main(void){
  vector < vector <int> > square;
  square.resize(14);
  for(int i=0; (int)i<square.size(); i++){
    square[i].resize(14);
  }
  for(int i=0; i<(int)square.size(); i++){
    for(int j=0; j<(int)square[i].size(); j++){
      square[i][j] =0;
    }
  }

  int x, y, size;
  int min=0, max=0;
  char c;

  while( cin >> x >> c >> y >> c >> size ){
    x+=2;
    y+=2;
    if(size>=1 && size<=3){
      square[y][x]++;
      square[y][x-1]++;
      square[y-1][x]++;
      square[y+1][x]++;
      square[y][x+1]++;
    }
    if(size==2 || size==3){
      square[y-1][x-1]++;
      square[y+1][x-1]++;
      square[y-1][x+1]++;
      square[y+1][x+1]++;
    }
    if(size==3){
      square[y][x-2]++;
      square[y-2][x]++;
      square[y+2][x]++;
      square[y][x+2]++;
    }
  }

  for(int i=2; (int)i<square.size()-2; i++){
    for(int j=2; (int)j<square.size()-2; j++){
      cout << square[i][j];
      if((int)j==square.size()-3){
        cout << endl;
      }else{
        cout << " ";
      }
    }
  }

  cout << min << endl << max << endl;
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

#define DEBUG 0

using namespace std;

struct INKI{
	int x;
	int y;
	int size;
};

int main(){
	int map[10][10];

	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			map[i][j] = 0;
		}
	}

	INKI tmp;
	while( scanf("%d,%d,%d", &tmp.x, &tmp.y, &tmp.size) > 0 ){
		if(tmp.size == 3){
			for(int i = -2; i <= 2; i++){
				if(tmp.y + i >= 0 && tmp.y + i < 10){
					map[tmp.y + i][tmp.x]++;
				}
				if(tmp.x + i >= 0 && tmp.x + i < 10){
					map[tmp.y][tmp.x + i]++;
				}
			}
			map[tmp.y][tmp.x]--;
			for(int i = -1; i <= 1; i += 2){
				if(tmp.y + i >= 0 && tmp.y + i < 10){
					for(int j = -1; j <= 1; j += 2){
						if(tmp.x + j >= 0 && tmp.x + j < 10){
							map[tmp.y + i][tmp.x + j]++;
						}
					}
				}
			}
		}
		else if(tmp.size == 2){
			for(int i = tmp.y - 1; i <= tmp.y + 1; i++){
				if(i >= 0 && i < 10){
					for(int j = tmp.x - 1; j <= tmp.x + 1; j++){
						if(j >= 0 && j < 10){
							map[i][j]++;
						}
					}
				}
			}
		}
		else if(tmp.size == 1){
			for(int i = -1; i <= 1; i++){
				if(tmp.y + i >= 0 && tmp.y + i < 10){
					map[tmp.y + i][tmp.x]++;
				}
				if(tmp.x + i >= 0 && tmp.x + i < 10){
					map[tmp.y][tmp.x + i]++;
				}
			}
			map[tmp.y][tmp.x]--;
		}

#if DEBUG
		for(int i = 0; i < 10; i++){
			for(int j = 0; j < 10; j++){
				if(j){
					cout << " ";
				}
				cout << map[i][j];
			}
			cout << endl;
		}
#endif

	}

	int noColor = 0;
	int koi = 0;

	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(map[i][j] == 0){
				noColor++;
			}
			if(koi < map[i][j]){
				koi = map[i][j];
			}
		}
	}

	cout << noColor << endl;
	cout << koi << endl;

	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <stack>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

int main(){
    int x, y, s, ink[10][10] = {{0}};
    while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    	if (s == 1){
    		ink[x][y]++;
    		if (x-1 >= 0) ink[x-1][y]++;
    		if (x+1 < 10) ink[x+1][y]++;
    		if (y-1 >= 0)ink[x][y-1]++;
    		if (y+1 < 10)ink[x][y+1]++;
    	} else if (s == 2){
    		for (int i = -1; i <= 1; i++)
    			for (int j = -1; j <= 1; j++)
    				if (x+i >= 0 && x+i < 10 && y+j >= 0 && y+j < 10) ink[x+i][y+j]++;
    	} else {
    		for (int i = -1; i <= 1; i++)
    			for (int j = -1; j <= 1; j++)
    				if (x+i >= 0 && x+i < 10 && y+j >= 0 && y+j < 10) ink[x+i][y+j]++;
    		if (x-2 >= 0) ink[x-2][y]++;
    		if (x+2 < 10) ink[x+2][y]++;
    		if (y-2 >= 0) ink[x][y-2]++;
    		if (y+2 < 10) ink[x][y+2]++;
    	}
    }
    int max = -1, ct = 0;
    REP(i, 10){
    	REP(j, 10){
    		if (max < ink[i][j]) max = ink[i][j];
    		if (ink[i][j] == 0) ct++;
    	}
    }

    cout << ct << endl << max << endl;
}

C++: #include <iostream>
#include <algorithm>
int main()
{
	int a = 0;
	int s = 100;
	int xy[10][10] = {};
	while (true) {
		int x, y, n;
		char a, b;
		std::cin >> x;
		std::cin >> a >> y >> b >> n;
		if (n == 0) {
			break;
		}
		switch (n)
		{
		case 1: {
			if (x != 0) {
				++xy[x - 1][y];
			}
			++xy[x + 1][y];
			if (y != 0) {
				++xy[x][y - 1];
			}
			++xy[x][y + 1];
			break;
		}
		case 2: {
			if (x != 0) {
				++xy[x - 1][y];
				++xy[x - 1][y - 1];
				++xy[x - 1][y + 1];
			}
			if (y != 0) {
				++xy[x][y - 1];
				++xy[x + 1][y - 1];
			}
			++xy[x + 1][y];
			++xy[x][y + 1];
			++xy[x + 1][y + 1];
			break;
		}
		case 3: {
			if (x != 0) {
				++xy[x - 1][y];
				++xy[x - 1][y - 1];
				++xy[x - 1][y + 1];
			}
			if (y != 0) {
				++xy[x][y - 1];
				++xy[x + 1][y - 1];
			}
			++xy[x + 1][y];
			++xy[x][y + 1];
			++xy[x + 1][y + 1];
			if (x != 2) { ++xy[x - 2][y]; }
			++xy[x + 2][y];
			if (y != 2) {
				++xy[x][y - 2];
			}
			++xy[x][y + 2];
			break;
		}
		}
	}

	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (xy[i][j] > 0) {
				--s;
			}
		}
	}
	a = xy[0][0];
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (a < xy[i][j]) {
				a = xy[i][j];
			}
		}
	}
	std::cout << s-1 << std::endl;
	std::cout << a << std::endl;
	return 0;
}

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

int main(){
  int p[14][14]={0};
  int x,y,s;
  while(scanf("%d,%d,%d",&x,&y,&s)>0){
    if(s==1){
      p[x+2][y+1]++;p[x+1][y+2]++;p[x+2][y+2]++;p[x+3][y+2]++;p[x+2][y+3]++;
    }
    else if(s==2){
      for(int i=1;i<4;i++){
	for(int j=1;j<4;j++) p[x+i][y+j]++;
      }
    }
    else{
      for(int i=1;i<4;i++){
	for(int j=1;j<4;j++) p[x+i][y+j]++;
      }
      p[x][y+2]++;p[x+2][y]++;p[x+4][y+2]++;p[x+2][y+4]++;
    }
  }
  int w=0;
  int t=0;
  for(int i=2;i<12;i++){
    for(int j=2;j<12;j++){
      if(p[i][j]==0) w++;
      if(p[i][j]>t) t=p[i][j];
    }
  }
  printf("%d\n%d",w,t);
  return 0;
}