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 <stdio.h>

#define SIZE 10
int main(void){
    int paper[SIZE+4][SIZE+4];
    int x, y, s;
    int branks, darkest;
    
    for (int i=0; i<SIZE+4; i++){
        for (int j=0; j<SIZE+4; j++){
            paper[i][j]=0;
        }
	}
	
    while (scanf("%d,%d,%d", &x, &y, &s)!= EOF){
        x+=2; y+=2;
        switch (s){
        case 3:
            paper[x  ][y-2]++;
            paper[x-2][y  ]++;
            paper[x  ][y+2]++;
            paper[x+2][y  ]++;
        case 2:
            paper[x-1][y-1]++;
            paper[x-1][y+1]++;
            paper[x+1][y+1]++;
            paper[x+1][y-1]++;
        case 1:
            paper[x  ][y-1]++;
            paper[x-1][y  ]++;
            paper[x  ][y  ]++;
            paper[x+1][y  ]++;
            paper[x  ][y+1]++;
            break;
        }
    }

    branks=0; darkest=0;
    for (int i=2; i<SIZE+2; i++){
        for (int j=2; j<SIZE+2; j++){
            if (paper[i][j]==0) branks++;
            if (paper[i][j]>darkest) darkest=paper[i][j];
        }
	}
    printf("%d\n%d\n", branks, darkest);
    return 0;
}

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

int main(void){

	int map[10][10],ink,x,y,max=0,count=0;
	int dx[] = {0,0,-1,1,-1,-1,1,1,0,0,-2,2};
	int dy[] = {-1,1,0,0,-1,1,-1,1,-2,2,0,0};


	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			map[i][j]=0;
		}
	}
	
	
	while(scanf("%d,%d,%d",&x,&y,&ink)!=EOF){
		map[y][x]++;
		for(int i=0;i<ink*4;i++){
			int mx=x+dx[i];
			int my=y+dy[i];
			if(mx>=0 && mx<10 && my>=0 && my<=10){
				map[my][mx]++;
			}
		}
	}
	
	
	for(int y=0;y<10;y++){
		for(int x=0;x<10;x++){
			if(map[y][x]==0){
				count++;
			}
			if(map[y][x]>max){
				max=map[y][x];
			}
		}
	}
	printf("%d\n%d",count,max);
}

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

int pa[20][20];

int main(void)
{
	int x,y,c;

	while(true){
		cin >> x;
		if(cin.eof())
			break;
		cin.get();
		cin >> y;
		cin.get();
		cin >> c;

		if(c == 1){
			for(int i = -1; i <= 1; i++){
				pa[y][x-i]++;
				pa[y-i][x]++;

			}
			pa[y][x]--;
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
		}
		else if(c == 3){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
			pa[y+2][x+2]++;
			pa[y+2][x-2]++;
			pa[y-2][x-2]++;
			pa[y-2][x+2]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 1; i <= 10; i++){
		for(int j = 1; j <= 10; j++){
			if(pa[i][j])
				count++;
			if(max < pa[i][j])
				max = pa[i][j];
		}
	}
	cout << 100-count << endl << max << endl;


	return 0;
}

C++: #include <iostream>
#include <stdio.h>

int paper[10][10]={0};

void paint(int x, int y)
{
	if( x>=0 && x<=9 && y>=0 && y<=9)
		paper[x][y]++;
	return;
}

void drop(int x, int y, int size)
{
	switch(size)
	{
		case 1:
			paint(x-1, y);
			paint(x+1, y);
			paint(x, y-1);
			paint(x, y+1);
			paint(x, y);
			break;
		case 2:
			drop(x,y,1);
			paint(x-1, y-1); paint(x-1, y+1);
			paint(x+1, y-1); paint(x+1, y+1);
			break;
		case 3:
			drop(x,y,2);
			paint(x-2,y);paint(x,y-2);
			paint(x+2,y);paint(x,y+2);
			break;
	}
	return;
}

int main(void)
{
	int x,y,s;
	while(~scanf("%d,%d,%d",&x,&y,&s))
		drop(x,y,s);

	int blank=0;
	int max=0;
	for(int i=0; i<10; i++)
		for(int j=0; j<10; j++)
		{
			if(paper[i][j]==0)
				blank++;
			if(paper[i][j] > max)
				max = paper[i][j];
		}
	std::cout << blank << std::endl << max << std::endl;

	return 0;
}

C++:  // compile in C++11. use -std=c++11.
#include <iostream>
#include <iomanip>
#include <vector>
#include <valarray>
#include <map>
#include <set>
#include <list>
#include <queue>
#include <stack>
#include <bitset>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <complex>
#include <string>
#include <sstream>

#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>

// this require C++11
#include <unordered_set>
#include <unordered_map>
#include <random>

using namespace std;

#define all(c) c.begin(),c.end()
#define repeat(i,n) for(int i=0;i<static_cast<int>(n);i++)
#define debug(x) #x << "=" << (x)
#define dump(x) cerr << debug(x) << " (L:" << __LINE__ << ")"<< endl

typedef long long ll;
typedef vector<int> vi;

template<typename T>
ostream& operator<<(ostream& os,const vector<T>& vec){
    os << "[";
    for(const auto& v : vec){
        os << v << ",";
    }
    os << "]";
    return os;
}

template<typename T>
T input(){
    T t;cin >> t;
    return t;
}

template<typename T>
vector<T> input(const int N){
    vector<T> v(N);
    repeat(i,N) cin >> v[i];
    return v;
}

int main(){
    const int FIELD_SIZE = 10;
    const int PADDING = 2;
    const int DATA_SIZE = FIELD_SIZE + 2*PADDING;
    vector<vi> field(DATA_SIZE,vi(DATA_SIZE));
    {
        int y,x,size;char comma;
        while(cin >> x >> comma >> y >> comma >> size){
            x += PADDING;
            y += PADDING;

            field[y][x] += 1;
            vi dx,dy;
            if(size == 1){
                dx = {1,0,-1,0};
                dy = {0,-1,0,1};
            }else{
                for(int i=-1;i<=1;i++){
                    for(int j=-1;j<=1;j++){
                        if(i == 0 and j == 0) continue;
                        dx.push_back(i);
                        dy.push_back(j);
                    }
                }
                if(size == 3){
                    vi ax = {2,0,-2,0};
                    vi ay = {0,-2,0,2};
                    repeat(i,4){
                        dx.push_back(ax[i]);
                        dy.push_back(ay[i]);
                    }
                }
            }
            repeat(i,dx.size()){
                field[y+dy[i]][x+dx[i]]++;
            }
        }
    }

    int maxi = -1;
    int no = 0;

    for(int y=PADDING;y<FIELD_SIZE+PADDING;y++){
        for(int x=PADDING;x<FIELD_SIZE+PADDING;x++){
            maxi = max(maxi,field[y][x]);
            no += field[y][x]==0;
        }
    }

    cout << no << endl << maxi << endl;

    return 0;
}