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 main()
{
????????int paper[15][15] = {{0}};
????????int x,y,size;
????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
????????{
????????????????x+=2;
????????????????y+=2;
????????????????if(size==1)
????????????????{
????????????????????????paper[x][y]+=1;paper[x+1][y]+=1;paper[x-1][y]+=1;paper[x][y-1]+=1;paper[x][y+1]+=1;
????????????????}
????????????????if(size==2)
????????????????{
????????????????????????paper[x][y]+=1;paper[x-1][y+1]+=1;paper[x-1][y]+=1;paper[x-1][y-1]+=1;paper[x][y+1]+=1;paper[x][y-1]+=1;paper[x+1][y-1]+=1;paper[x+1][y]+=1;paper[x+1][y+1]+=1;
????????????????}
????????????????if(size==3)
????????????????{
????????????????????????paper[x][y]+=1;paper[x-1][y+1]+=1;paper[x-1][y]+=1;paper[x-1][y-1]+=1;paper[x][y+1]+=1;paper[x][y-1]+=1;paper[x+1][y-1]+=1;paper[x+1][y]+=1;paper[x+1][y+1]+=1;paper[x+2][y]+=1;paper[x-2][y]+=1;paper[x][y+2]+=1;paper[x][y-2]+=1;
????????????????}
????????}
????????int max=0,voi=0;
????????for(int i=2;i<=11;i++)
????????{
????????????????for(int j=2;j<=11;j++)
????????????????{
????????????????????????if(paper[i][j]>max)max=paper[i][j];
????????????????????????if(paper[i][j]==0)voi++;
????????????????}
????????}
????????cout<<voi<<endl<<max<<endl;
????????return 0;
}

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

int drop(int x, int y, int s, int p[14][14]){
	p[x][y]+=1;
	for(int i1=-1;i1<2;i1+=2){
		p[x][y+i1]+=1;
		p[x+i1][y]+=1;
	}
	if(s==1) return 0;
	for(int i2=-1;i2<2;i2+=2){
		p[x+i2][y-i2]+=1;
		p[x-i2][y+i2]+=1;
	}
	if(s==2) return 0;
	for(int i3=-2;i3<=2;i3+=4){
		p[x+i3][y]+=1;
		p[x][y+i3]+=1;
	}
}

int main() {
	int p[14][14]={0};
	int x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)>0){
		 int a=drop(x+2,y+2,s,p);
	}
	int cnt=1,max=0;
	for(int a=2;a<12;a++){
		for(int b=2;b<12;b++){
			if(p[a][b]==0) cnt++;
			if(p[a][b]>max) max=p[a][b];
		}
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

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;
}