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<cstdio>
#include<algorithm>

using namespace std;

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

void small(int x, int y){
	grid[x][y]++;
	grid[x - 1][y]++;
	grid[x + 1][y]++;
	grid[x][y - 1]++;
	grid[x][y + 1]++;
}

void medium(int x, int y){
	small(x, y);
	grid[x - 1][y - 1]++;
	grid[x + 1][y - 1]++;
	grid[x - 1][y + 1]++;
	grid[x + 1][y + 1]++;
}

void large(int x, int y){
	medium(x, y);
	grid[x - 2][y]++;
	grid[x + 2][y]++;
	grid[x][y - 2]++;
	grid[x][y + 2]++;
}

int main(){
	int x, y, size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		if (size == 1) small(x + 2, y + 2);
		else if (size == 2) medium(x + 2, y + 2);
		else if (size == 3) large(x + 2, y + 2);
	}

	int ans1 = 0;
	int ans2 = 0;

	for (int i = 2; i < 12; i++){
		for (int j = 2; j < 12; j++){
			if (grid[i][j] == 0)
				ans1++;
			else
				ans2 = max(ans2, grid[i][j]);
		}
	}

	printf("%d\n%d\n", ans1, ans2);

	return 0;
}

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

constexpr int N = 10;

void drop( int p[N][N], int x, int y, int s ) {
	static const vector<vector<int>> ink = {
		{ 0,-1, -1,0, 0,0, 1,0, 0,1 },
		{ -1,-1, 0,-1, 1,-1, -1,0, 0,0, 1,0, -1,1, 0,1, 1,1 },
		{ 0,-2, -1,-1, 0,-1, 1,-1, -2,0, -1,0, 0,0, 1,0, 2,0, -1,1, 0,1, 1,1, 0,2 }
	};

	auto& v = ink[s-1];
	for( int i = 0; i < v.size()/2; ++i ) {
		uint32_t a = y + v[2*i + 1];
		uint32_t b = x + v[2*i];

		if( a < N && b < N ) {
			p[a][b] += 1;
		}
	}
}

int main() {
	ios_base::sync_with_stdio( false );

	int paper[N][N] = {};

	int x, y, s;
	char c;
	while( cin >> x >> c >> y >> c >> s ) {
		drop( paper, x, y, s );
	}

	int w = 0;
	int d = 0;

	for( int i = 0; i < N; ++i ) {
		for( int j = 0; j < N; ++j ) {
			if( paper[i][j] == 0 ) {
				w += 1;
			}
			else if( paper[i][j] > d ) {
				d = paper[i][j];
			}
		}
	}

	cout << w << '\n' << d << '\n';
}

C++: #include <iostream>
#include <stdio.h>
#include <sstream>
using namespace std;
void draw(int map[10][10]);
void drop(int x,int y,int z);
void drop_rotate(int,int,int,int);
bool isValidPoint(int,int);
void count(int map[10][10]);
int map[10][10];
int white, conc;
int dx,dy;

int main(){
  int x,y,s;
  string tmp;
  
  //zñÌú»
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      map[i][j]=0;
    }
  }

  while(cin >> tmp){ //J}æØèðooÉ
    tmp.replace(tmp.find(","),1," ");
    tmp.replace(tmp.find(","),1," ");
    istringstream ss(tmp);
    ss >> x >> y >> s;
    drop(x,y,s);
    //draw(map);
  }
  count(map);
}

//2³mapÌ`Ê
void draw(int map[10][10]){
    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
      printf("%4d",map[i][j]);
      }
      cout << endl;
    }
    cout << endl;
}

//¦ðÔ·Ö
void count(int map[10][10]){
  white = 0; conc = 0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(map[i][j]==0){
	white++;
      }
      if(map[i][j] > conc){
	conc = map[i][j];
      }
    }
  }
  cout << white << endl << conc << endl;
}
 
//CNº
void drop(int x,int y,int s){
  if(isValidPoint(x,y)){
    map[x][y]++;
  }
  if(s==3){
    drop_rotate(x,y,2,0);
    drop_rotate(x,y,1,1);
    drop_rotate(x,y,1,0);
  }else if(s==2){
    drop_rotate(x,y,1,1); 
    drop_rotate(x,y,1,0);
  }else{
    drop_rotate(x,y,1,0);
  }
}

void drop_rotate(int x, int y,int dx, int dy){
  int temp;
  for(int i = 0; i < 4; i++){
    temp = dx;
    dx = dy;
    dy = -temp;
    if(isValidPoint((x+dx),(y+dy))){
      map[x+dx][y+dy]++;
    }
  }
}

bool isValidPoint(int x,int y){
  if(x < 0 || x > 9 || y < 0 || y > 9){
    return false;
  }else{
    return true;
  }
}

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

int board[10][10];
int empty = 0;
int _max = 0;

bool ok(int val) {
    return(val >= 0 && val < 10);
}

void small(int x, int y) {
    board[y][x]++;
    int north = y - 1, south = y + 1,  east = x + 1, west = x - 1;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}

void mid(int x, int y) {
    small(x, y);
    int uprightx = x + 1, uprighty = y + 1;
    int downrightx = x + 1, downrighty = y - 1;
    int downleftx = x - 1, downlefty = y - 1;
    int upleftx = x - 1, uplefty = y + 1;
    if(ok(uprightx) && ok(uprighty)) board[uprighty][uprightx]++;
    if(ok(downrightx) && ok(downrighty)) board[downrighty][downrightx]++;
    if(ok(downleftx) && ok(downlefty)) board[downrighty][downrightx]++;
    if(ok(upleftx) && ok(uplefty)) board[uplefty][upleftx]++;
}

void large(int x, int y) {
    mid(x, y);
    int north = y - 2, south = y + 2,  east = x + 2, west = x - 2;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}

void search() {
    for(int r = 0; r < 10; r++) {
        for(int c = 0; c < 10; c++) {
            if(board[r][c] > _max) _max = board[r][c];
            if(board[r][c] == 0) empty++;
        }
    }
}

int main(void) {
    int x, y, size;
    
    while(scanf("%d,%d,%d", &x, &y, &size) != EOF) {
        switch(size) {
            case 1: small(x, y); break;
            case 2: mid(x, y);   break;
            default:large(x, y); break;
        }
    }
    search();
    cout << empty << endl << _max << endl;
    return(0);
}