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

using namespace std;

constexpr auto N=10;

int main()
{
  unsigned int p[N][N]={};
  vector<pair<int,int>> inc[] = {
    { {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} }
  };

  int x, y, s;
  while( scanf( "%d,%d,%d", &x, &y, &s ) != EOF ) {
    {
      for( auto const i : inc[s-1] ) {
        auto const px = x + i.first, py = y + i.second;
        if ( px >= 0 && px < N && py >= 0 && py < N )
          ++p[px][py];
      }
    }
  }

  cout
    << count( &p[0][0], &p[0][0]+N*N, 0 ) << endl
    << *max_element( &p[0][0], &p[0][0]+N*N ) << endl;
}

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 <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
constexpr int MOD = 1000000007;
constexpr int INF = 2000000000;
using namespace std;


int main() {
	int map[50][50] = { 0 };
	int a, b, c;
	char ch;
	while (cin >> a >> ch >> b >> ch >> c) {
		if (c == 1) {
			map[b + 1][a]++;
			map[b - 1][a]++;
			map[b][a + 1]++;
			map[b][a - 1]++;
		}
		else if (c == 2) {
			map[b - 1][a - 1]++;
			map[b - 1][a]++;
			map[b - 1][a + 1]++;
			map[b][a + 1]++;
			map[b + 1][a + 1]++;
			map[b + 1][a]++;
			map[b + 1][a - 1]++;
			map[b][a - 1]++;
		}
		else {
			map[b - 1][a - 1]++;
			map[b - 1][a]++;
			map[b - 1][a + 1]++;
			map[b][a + 1]++;
			map[b + 1][a + 1]++;
			map[b + 1][a]++;
			map[b + 1][a - 1]++;
			map[b][a - 1]++;
			map[b + 2][a]++;
			map[b - 2][a]++;
			map[b][a + 2]++;
			map[b][a - 2]++;
		}
	}
	int ans = 0, maxl = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (!map[i][j])ans++;
			maxl = max(maxl, map[i][j]);
		}
	}
	cout << ans << endl << maxl << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <math.h>
#include <vector>

using namespace std;

int main(void){
    int a[10][10]={0};
    int x,y,size;
    char z;
    
    while (cin>>x>>z>>y>>z>>size) {
        a[y][x]+=1;
        if (size==1)
        {
            if(x+1<10){a[y][x+1]+=1;}
            if(y+1<10){a[y+1][x]+=1;}
            if(0<=x-1){a[y][x-1]+=1;}
            if(0<=y-1){a[y-1][x]+=1;}
        }
        else if (size==2)
        {
            if(x+1<10){a[y][x+1]+=1;}
            if(y+1<10){a[y+1][x]+=1;}
            if(0<=x-1){a[y][x-1]+=1;}
            if(0<=y-1){a[y-1][x]+=1;}
            if(0<=y-1 && 0<=x-1){a[y-1][x-1]+=1;}
            if(0<=y-1 && x+1<10){a[y-1][x+1]+=1;}
            if(y+1<10 && 0<=x-1){a[y+1][x-1]+=1;}
            if(y+1<10 && x+1<10){a[y+1][x+1]+=1;}
        }
        else
        {
            if(y+1<10){a[y+1][x]+=1;}
            if(y+2<10){a[y+2][x]+=1;}
            if(x+1<10){a[y][x+1]+=1;}
            if(x+2<10){a[y][x+2]+=1;}
            if(0<=x-1){a[y][x-1]+=1;}
            if(0<=x-2){a[y][x-2]+=1;}
            if(0<=y-1){a[y-1][x]+=1;}
            if(0<=y-2){a[y-2][x]+=1;}
            if(0<=y-1 && 0<=x-1){a[y-1][x-1]+=1;}
            if(0<=y-1 && x+1<10){a[y-1][x+1]+=1;}
            if(y+1<10 && 0<=x-1){a[y+1][x-1]+=1;}
            if(y+1<10 && x+1<10){a[y+1][x+1]+=1;}
        }
    }
    int sum=0,age=0;
    for(int i=0; i<10; i++)
    {
        for (int j=0; j<10; j++)
        {
            if(a[i][j]==0){sum++;}
            if(age<a[i][j]){age=a[i][j];}
        }
    }
    
    printf("%d\n%d\n",sum,age);
    
    return 0;
}