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 <vector>
#include <algorithm>
#include <string>
using namespace std;

#define Vint vector<int>
#define VVint vector<Vint>
#define Fsize() front().size()

int VVint_zero(VVint vv) {
	int num = 0;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] == 0) num++;
		}
	}
	return num;
}

int VVint_max(VVint vv) {
	int max = 0;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] > max) max = vv[i][j];
		}
	}
	return max;
}

int main() {
	int x, y, s;
	char cha;
	VVint vec(10, Vint(10, 0));
	while (cin >> x >> cha >> y >> cha >> s) {
		vec[y][x] += 1;
		if (y - 1 >= 0) vec[y - 1][x]++;
		if (y + 1 < 10) vec[y + 1][x]++;
		if (x - 1 >= 0) vec[y][x - 1]++;
		if (x + 1 < 10) vec[y][x + 1]++;
		if (s >= 2) {
			if (y - 1 >= 0 && x - 1 >= 0) vec[y - 1][x - 1]++;
			if (y - 1 >= 0 && x + 1 < 10) vec[y - 1][x + 1]++;
			if (y + 1 < 10 && x - 1 >= 0) vec[y + 1][x - 1]++;
			if (y + 1 < 10 && x + 1 < 10) vec[y + 1][x + 1]++;
		}
		if (s == 3) {
			if (y - 2 >= 0) vec[y - 2][x]++;
			if (y + 2 < 10) vec[y + 2][x]++;
			if (x - 2 >= 0) vec[y][x - 2]++;
			if (x + 2 < 10) vec[y][x + 2]++;
		}
	}
	cout << VVint_zero(vec) << endl;
	cout << VVint_max(vec) << endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <climits>
using namespace std;

#define Vint vector<int>
#define VVint vector<Vint>
#define Fsize() front().size()

int VVint_zero(VVint vv) {
	int num = 0;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] == 0) num++;
		}
	}
	return num;
}

int VVint_max(VVint vv) {
	int max = INT_MIN;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] > max) max = vv[i][j];
		}
	}
	return max;
}

int main() {
	int x, y, s;
	string str, str_x, str_y, str_s;
	VVint vec(10, Vint(10, 0));
	while (getline(cin, str)) {
		replace(str.begin(), str.end(), ',', ' ');
		istringstream iss(str);
		iss >> str_x >> str_y >> str_s;
		x = stoi(str_x);
		y = stoi(str_y);
		s = stoi(str_s);
		vec[y][x] += 1;
		if (s == 1 || s == 2 || s == 3) {
			if (y - 1 >= 0) vec[y - 1][x] += 1;
			if (y + 1 >= 0) vec[y + 1][x] += 1;
			if (x - 1 >= 0) vec[y][x - 1] += 1;
			if (x + 1 >= 0) vec[y][x + 1] += 1;
		}
		if (s == 2 || s == 3) {
			if (y - 1 >= 0 && x - 1 >= 0) vec[y - 1][x - 1] += 1;
			if (y - 1 >= 0 && x + 1 >= 0) vec[y - 1][x + 1] += 1;
			if (y + 1 >= 0 && x - 1 >= 0) vec[y + 1][x - 1] += 1;
			if (y + 1 >= 0 && x + 1 >= 0) vec[y + 1][x + 1] += 1;
		}
		if (s == 3) {
			if (y - 2 >= 0) vec[y - 2][x] += 1;
			if (y + 2 >= 0) vec[y + 2][x] += 1;
			if (x - 2 >= 0) vec[y][x - 2] += 1;
			if (x + 2 >= 0) vec[y][x + 2] += 1;
		}
	}
	cout << VVint_zero(vec) << endl;
	cout << VVint_max(vec) << endl;
	return 0;
}

C++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>

using namespace std;

double sq(double x){return x*x;}

int t[10][10];

int main(){
	int x,y,s;
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s == 1){
			for (int i = 0; i < 10; i++)
			{
				for (int j = 0; j < 10; j++)
				{
					if(abs(i-x) + abs(j-y) <= 1) t[i][j]++;
				}
			}
		} else if(s == 2){
			for (int i = 0; i < 10; i++)
			{
				for (int j = 0; j < 10; j++)
				{
					if(abs(i-x) <=1 && abs(j-y) <= 1) t[i][j]++;
				}
			}
		} else if(s == 3){
			for (int i = 0; i < 10; i++)
			{
				for (int j = 0; j < 10; j++)
				{
					if(abs(i-x) + abs(j-y) <= 2) t[i][j]++;
				}
			}
		}
	}

	int no = 0, big = 0;
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if(t[i][j] == 0) no++;
			big = max(big,t[i][j]);
		}
	}

	printf("%d\n%d\n",no,big);

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)

int f[10][10];

int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};

int main(){
	int x,y,size;
	while (scanf("%d,%d,%d",&x,&y,&size)){
		int x2,y2;
		switch (size){
			case 1:
				f[y][x]++;
				REP(i,4){
					x2=x+dx[i];
					y2=y+dy[i];
					if (x2>=0 && x2<10 && y2>=0 && y2<10){
						f[y2][x2]++;
					}
				}
				break;
			case 2:
				FOR(i,-1,2){
					FOR(j,-1,2){
						x2=x+i;
						y2=y+j;
						if (x2>=0 && x2<10 && y2>=0 && y2<10){
							f[y2][x2]++;
						}
					}
				}
				break;
			case 3:
				FOR(i,-1,2){
					FOR(j,-1,2){
						x2=x+i;
						y2=y+j;
						if (x2>=0 && x2<10 && y2>=0 && y2<10){
							f[y2][x2]++;
						}
					}
				}
				REP(i,4){
					x2=x+dx[i]*2;
					y2=y+dy[i]*2;
					if (x2>=0 && x2<10 && y2>=0 && y2<10){
						f[y2][x2]++;
					}
				}
				break;
		}
	}
	int e=0;
	int m=0;
	REP(i,10){
		REP(j,10){
			m=max(m,f[i][j]);
		}
	}
	REP(i,10){
		REP(j,10){
			if (f[i][j]==0){
				e++;
			}
		}
	}
	printf("%d\n%d\n",e,m);
	return 0;
}

C++: #include<iostream>

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

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

void ink(int x,int y, int s){
  switch(s){
    case 3: drop(x+2,y);
            drop(x-2,y);
            drop(x,y+2);
            drop(x,y-2);
    case 2: drop(x+1,y+1);
            drop(x-1,y+1);
            drop(x-1,y-1);
            drop(x+1,y-1);
    case 1: drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
  }

}

int main(){
  int x,y,s;

  //drop(9,9);

  /*for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      std::cout << paper[i][j] << std::endl;
    }
  }*/

  while(std::scanf(" %d,%d,%d",&x,&y,&s)){
    //std::cout << x << y << s;
    ink(x,y,s);
  }

  int spase=0,max=0;

  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(paper[i][j]==0){
        ++spase;
      }
      if(paper[i][j]>max){
        max = paper[i][j];
      }
    }
  }

  std::cout << spase << std::endl;
  std::cout << max << std::endl;


}