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\n", count, max)
}

C++: #include<iostream>
using namespace std;
int main()
{
    int ma[10][10];
    int x,y,d;
    char c;
    memset(ma,0,sizeof(ma));
    //while(cin>>x>>c>>y>>c>>d){
    for(int i=0;i<6;i++){
        
        cin>>x>>c>>y>>c>>d;
        
        ma[y][x]++;
        if(d==1){
            if(x>0){
                ma[y][x-1]++;
            }
            if(x<9){
                ma[y][x+1]++;
            }
            if(y>0){
                ma[y-1][x]++;
            }
            if(y<9){
                ma[y+1][x]++;
            }
        }
        else if(d==2){
            if(x>0){
                ma[y][x-1]++;
            }
            if(x<9){
                ma[y][x+1]++;
            }
            if(y>0){
                ma[y-1][x]++;
            }
            if(y<9){
                ma[y+1][x]++;
            }
            if(x>0&&y<9){
                ma[y+1][x-1]++;
            }
            if(x<9&&y>0){
                ma[y-1][x+1]++;
            }
            if(x>0&&y>0){
                ma[y-1][x-1]++;
            }
            if(x<9&&y<9){
                ma[y+1][x+1]++;
            }
        }
        else{
            if(x>0){
                ma[y][x-1]++;
            }
            if(x<9){
                ma[y][x+1]++;
            }
            if(y>0){
                ma[y-1][x]++;
            }
            if(y<9){
                ma[y+1][x]++;
            }
            if(x>0&&y<9){
                ma[y+1][x-1]++;
            }
            if(x<9&&y>0){
                ma[y-1][x+1]++;
            }
            if(x>0&&y>0){
                ma[y-1][x-1]++;
            }
            if(x<9&&y<9){
                ma[y+1][x+1]++;
            }
            if(x>1){
                ma[y][x-2]++;
            }
            if(x<8){
                ma[y][x+2]++;
            }
            if(y>1){
                ma[y-2][x]++;
            }
            if(y<8){
                ma[y+2][x]++;
            }
        }
    }
    int em=0,m=0;
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(ma[i][j]==0)em++;
            m=max(m,ma[i][j]);
        }
    }
    cout<<em<<endl<<m<<endl;
    return 0;
}

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

int main() {
  int vec[14][14];
  rep(i,14){
    rep(j,14) vec[i][j]=0;
  }
  
  int a,b,c;
  char x,y;
  while(cin>>a>>x>>b>>y>>c){
    
    vec[a+2][b+2]++;
    vec[a+1][b+2]++;
    vec[a+3][b+2]++;
    vec[a+2][b+1]++;
    vec[a+2][b+3]++;
    if(c>1){
      vec[a+1][b+1]++;
      vec[a+1][b+3]++;
      vec[a+3][b+1]++;
      vec[a+3][b+3]++;
    }
    if(c>2){
      vec[a][b+2]++;
      vec[a+4][b+2]++;
      vec[a+2][b]++;
      vec[a+2][b+4]++;
    }
  }
    
  int ma=0,cnt=0;
    
  for(int i=2;i<=11;i++){
    for(int j=2;j<=11;j++){
      if(vec[i][j]==0) cnt++;
      chmax(ma,vec[i][j]);
    }
  }
    
  cout<<cnt<<endl;
  cout<<ma<<endl;
      
  return 0;
}

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

int main(){
	vector<vector<int> > field(14, vector<int>(14, 0));
	int x,y,s;
	while(scanf("%d,%d,%d", &x, &y, &s)!=EOF){
		x+=2; y+=2;
		for(int i=-2; i<=2; i++){
			for(int j=-2; j<=2; j++){
				if(s==1 && abs(i)+abs(j)<=1){
					field[x+i][y+j]++;
				}
				if(s==2 && abs(i)<=1 && abs(j)<=1){
					field[x+i][y+j]++;
				}
				if(s==3 && abs(i)+abs(j)<=2){
					field[x+i][y+j]++;
				}
			}
		}
	}
	
	int white = 0;
	int deep = 0;
	for(int i=2; i<=11; i++){
		for(int j=2; j<=11; j++){
			deep = max(deep, field[i][j]);
			if(field[i][j] == 0 ) white++;
		}
	}
	cout << white << endl << deep << endl; 
    return 0;
}

C++: #include <cstdio>

int ds[][2]={{0,0},{1,0},{0,1},{-1,0},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1},{2,0},{0,2},{-2,0},{0,-2}};
int map[10][10],kosa,rest=100;

int max(int a,int b){return a>b?a:b;}

int drop(int x,int y){
  if(x>=0 && x<10 && y>=0 && y<10){
    if(map[x][y]++==0) rest--;
    kosa=max(map[x][y],kosa);
  }
}

int main(){
  int x,y,size;
  while(~scanf("%d,%d,%d",&x,&y,&size))
    for(int i=0; i<=4*size; i++)
      drop(x+ds[i][0],y+ds[i][1]);

  printf("%d\n%d\n",rest,kosa);
}