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<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int x,y,size;
  int paper[15][15]={};
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    paper[y][x]++;
    if(y>0)paper[y-1][x]++;
    if(y<9)paper[y+1][x]++;
    if(x>0)paper[y][x-1]++;
    if(x<9)paper[y][x+1]++;

    if(size>1){

      if(y>0 && y<9)
	if(x>0 && x<9){
	  paper[y-1][x-1]++;
	  paper[y-1][x+1]++;
	  paper[y+1][x-1]++;
	  paper[y+1][x+1]++;
	}else if(x==0){
	  paper[y-1][x+1]++;
	  paper[y+1][x+1]++;
	}else if(x==9){
	  paper[y-1][x-1]++;
	  paper[y+1][x-1]++;
	}

      if(y==0){
	if(x>0)paper[y+1][x-1]++;
	if(x<9)paper[y+1][x+1]++;
      }else if(y==9){
	if(x>0)paper[y-1][x-1]++;
	if(x<9)paper[y-1][x+1]++;
      }

    }
    if(size==2){
      if(y>1)paper[y-2][x]++;
      if(y<8)paper[y+2][x]++;
      if(x>1)paper[y][x-2]++;
      if(x<8)paper[y][x+2]++;
    }

  }
  int white=0;
  int m=0;
  int i,j;

  rep(i,10)rep(j,10){
    if(paper[i][j]==0)white++;
    m=max(m,paper[i][j]);
  }
  cout<<white<<endl;
  cout<<m<<endl;
}

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_s("%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 <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <complex>
using namespace std;
int main() {
	int paper[14][14] = { 0 };
	int fl, x, y;
	char split;
	while (cin >> x >>split>> y >>split>> fl) {
		if (fl == 2) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
		}
		if (fl == 1) {
			paper[x + 2][y + 2] += 1;
			paper[x + 1][y + 2] += 1;
			paper[x + 2][y + 1] += 1;
			paper[x + 3][y + 1] += 1;
			paper[x + 1][y + 3] += 1;
		}
		if (fl == 3) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
				paper[x][y + 2] += 1;
				paper[x + 4][y + 2] += 1;
				paper[x + 2][y + 4] += 1;
				paper[x + 2][y] += 1;
		}
		int count = 0;
		int ans = 0;
		for (int i = 2;i < 12;i++) {
			for (int j = 2;j < 12;j++) {
				if (paper[i][j] == 0) count += 1;
				ans = max(ans, paper[i][j]);
			}
		}
		cout << count<<endl;
		cout << ans << endl;
	}
}

C++: #include<iostream>
#include<string>
int mem[14][14] = {}, i = 0, X[50], Y[50], S[50], flag = 0, max = 0, x, y, s;
int main() {
	char b;
	while (1) {
		std::cin >> x >> b >> y >> b >> s;
		Y[i] = y, S[i] = s, X[i] = x;
		i += 1;
		for (int a = 0; a < i; a += 1) {
			if (S[a] >= 1) {
				mem[X[a] + 2][Y[a] + 2] += 1;
				mem[X[a] + 1][Y[a] + 2] += 1;
				mem[X[a] + 3][Y[a] + 2] += 1;
				mem[X[a] + 2][Y[a] + 1] += 1;
				mem[X[a] + 2][Y[a] + 3] += 1;
			}
			if (S[a] >= 2) {
				mem[X[a] + 1][Y[a] + 1] += 1;
				mem[X[a] + 1][Y[a] + 3] += 1;
				mem[X[a] + 3][Y[a] + 1] += 1;
				mem[X[a] + 3][Y[a] + 3] += 1;
			}
			if (S[a] >= 3) {
				mem[X[a]][Y[a] + 2] += 1;
				mem[X[a] + 4][Y[a] + 2] += 1;
				mem[X[a] + 2][Y[a] + 4] += 1;
				mem[X[a] + 2][Y[a]] += 1;
			}
		}
		for (int i = 0; i < 10; i += 1)
			for (int j = 0; j < 10; j += 1) {
				if (0 == mem[i + 2][j + 2])
					flag += 1;
				if (max < mem[i + 2][j + 2])
					max = mem[i + 2][j + 2];
			}
		std::cout << flag << std::endl;
		std::cout << max << std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

void drop1(int s[][14] , int x , int y){
	s[x][y]++;
	s[x-1][y]++;
	s[x][y-1]++;
	s[x+1][y]++;
	s[x][y+1]++;
}

void drop2(int s[][14] , int x , int y){
	drop1(s , x , y);
	s[x-1][y-1]++;
	s[x+1][y-1]++;
	s[x-1][y+1]++;
	s[x+1][y+1]++;
}

void drop3(int s[][14] , int x , int y){
	drop2(s , x , y);
	s[x-2][y]++;
	s[x][y-2]++;
	s[x+2][y]++;
	s[x][y+2]++;
}


int main(){
	int square[14][14]={0};
	int x , y , s , mx=0 ,cnt=0;
	while(scanf("%d,%d,%d",&x,&y,&s)){
		switch(s){
			case 1:
			drop1(square , x+2 , y+2);
			break;
			case 2:
			drop2(square , x+2 , y+2);
			break;
			case 3:
			drop3(square , x+2 , y+2);
		}
	}
		for(int i=2;i<12;++i){
			for(int j=2;j<12;++j){
				if(square[i][j]==0) cnt++;
				mx=max(mx , square[i][j]);
			}
		}
		cout << cnt << endl << mx << endl;	
	return 0; 
}