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++: 
import java.util.Scanner;

public class Main {
 static int     max   = 0;
 static int     count = 100;
 static int[][] p     = new int[10][10];

 public static void main(String[] args) {
	Scanner in = new Scanner(System.in)
	  .useDelimiter("[^0-9]+");
	max = 0;
	count = 100;
	for (int i = 0; i < p.length; i++) {
	 for (int j = 0; j < p[i].length; j++) {
		p[i][j] = 0;
	 }
	}
	while (in.hasNextLine()) {
	 ink(in.nextInt(), in.nextInt(), in.nextInt());
	}
	System.out.println(count);
	System.out.println(max);

 }

 static void ink(int x, int y, final int size) {
	if (size >= 3) {
	 pi(x + 2, y);
	 pi(x - 2, y);
	 pi(x, y + 2);
	 pi(x, y - 2);
	}
	if (size >= 2) {
	 pi(x + 1, y + 1);
	 pi(x + 1, y - 1);
	 pi(x - 1, y + 1);
	 pi(x - 1, y - 1);
	}
	if (size >= 1) {
	 pi(x + 1, y);
	 pi(x - 1, y);
	 pi(x, y + 1);
	 pi(x, y - 1);
	}
	pi(x, y);
 }

 static void pi(int x, int y) {
	if (0 <= x && x < 10 && 0 <= y && y < 10) {
	 if (p[x][y] == 0) {
		count--;
	 }
	 p[x][y]++;
	 max = Math.max(max, p[x][y]);
	}
 }
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
using namespace std;
int main() {
	int i,j,k,l,m,n,o,x,y,z;
	int max = 0;
	int count = 0;
	vector<vector<int>> s;
	s.resize(10);
	for (i = 0; i < 14; i++) {
		s[i].resize(14);
	}
	for (j = 0; j < 14; j++) {
		for (k = 0; k < 14; k++) {
			s[j][k] = 0;
		}
	}
	while (scanf("%d,%d,%d", &x, &y, &z)) {
		if (z == 1) {
			s[x + 2][y + 2] += 1;
			s[x + 1][y + 2] += 1;
			s[x + 3][y + 2] += 1;
			s[x + 2][y + 1] += 1;
			s[x + 2][y + 3] += 1;
		}
		else if (z == 2) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
				}
			}
		}
		else if (z == 3) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
					s[x][y + 2] += 1;
					s[x + 4][y + 2] += 1;
					s[x + 2][y] += 1;
					s[x + 2][y + 4] += 1;
				}
			}
		}
	}
	for (n = 2; n < 12; n++) {
		for (o = 2; o < 12; o++) {
			if (max < s[n][o]) {
				max = s[n][o];
			}
			if (s[n][o] == 0) {
				count += 1;
			}
		}
	}
	cout << count << endl;
	cout << max << endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <iomanip>
using namespace std;
int main(){
  int x,y,size,m[14][14]={0},max=0,none=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    if(size>=1){
      m[x+2][y+2]++;
      m[x+2][y+1]++;
      m[x+2][y+3]++;
      m[x+1][y+2]++;
      m[x+3][y+2]++;
    }
    if(size>=2){
      m[x+1][y+1]++;
      m[x+1][y+3]++;
      m[x+3][y+1]++;
      m[x+3][y+3]++;
    }
    if(size==3){
      m[x+2][y]++;
      m[x+2][y+4]++;
      m[x][y+2]++;
      m[x+4][y+2]++;
    }
    for(y=0;y<14;y++){
      for(x=0;x<14;x++){
	cout<<m[x][y];
	(x==13)?cout<<endl:cout<<" ";
      }
    }
  }
  for(y=0;y<10;y++){
    for(x=0;x<10;x++){
      if(m[x+2][y+2]>max)max=m[x+2][y+2];
      if(!m[x+2][y+2])none++;
    }
  }
  cout<<none<<endl<<max<<endl;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#define MAX 30
using namespace std;


int main()
{
	int p[MAX][MAX];
	for (int i = 0; i < MAX; i++){
		for (int j = 0; j < MAX; j++){
			p[i][j] = 0;
		}
	}
	int x, y, size;
	while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
		x += 10;
		y += 10;
		p[x][y]++;
		p[x - 1][y]++;
		p[x + 1][y]++;
		p[x][y - 1]++;
		p[x][y + 1]++;
		if (size == 1){
			continue;
		}
		p[x - 1][y - 1]++;
		p[x - 1][y + 1]++;
		p[x + 1][y - 1]++;
		p[x + 1][y + 1]++;
		if (size == 2){
			continue;
		}
		p[x - 2][y]++;
		p[x + 2][y]++;
		p[x][y - 2]++;
		p[x][y + 2]++;
	}
	int clean = 0, ink = 0;
	for (int i = 10; i < 20; i++){
		for (int j = 10; j < 20; j++){
			if (p[i][j] == 0){
				clean++;
			}
			ink = max(ink, p[i][j]);
		}
	}
	cout << clean << endl;
	cout << ink << endl;

	return 0;
}

C++: #include<cstdio>
#define MAX(x,y) ((x>y)? x:y)

int paper[14][14];
class ink {
public: 
	int x,y;
	ink(int X,int Y)
	{
		x=X,y=Y;
	}
};
class ink date_1[]={ink(-1,0),ink(0,-1),ink(1,0),ink(0,1),ink(0,0)};
class ink date_2[]={ink(-1,-1),ink(-1,0),ink(-1,1),ink(0,-1),ink(0,0),ink(0,1),ink(1,-1),ink(1,0),ink(1,1)};
class ink date_3[]={ink(-2,0),ink(0,-2),ink(2,0),ink(0,2),ink(-1,-1),ink(-1,0),ink(-1,1),ink(0,-1),ink(0,0),ink(0,1),ink(1,0),ink(1,1)};

void fail(int kind,int x,int y)
{
	if(kind==1)
	{
		for(int i=0;i<5;i++)
		{
			paper[x+date_1[i].x+2][y+date_1[i].y+2]++;
		}
	}
	if(kind==2)
	{
		for(int i=0;i<9;i++)
		{
			paper[x+date_2[i].x+2][y+date_2[i].y+2]++;
		}
	}
	if(kind==3)
	{
		for(int i=0;i<13;i++)
		{
			paper[x+date_3[i].x+2][y+date_3[i].y+2]++;
		}
	}
}

int main()
{
	int x,y,size;
	for(int i=2;i<12;i++)
	{
		for(int j=2;j<12;j++)
		{
			paper[i][j]=0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF)
	{
		if(x==-1)break;
		fail(size,x,y);
	}
	int white=0;
	int maxblack=0;
	for(int i=2;i<12;i++)
	{
		for(int j=2;j<12;j++)
		{
			if(paper[i][j]==0)white++;
			else maxblack=MAX(maxblack,paper[i][j]);
		}
	}
	printf("%d\n%d\n",white,maxblack);
    return 0;
}

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

int field[10][10], x, y, s, cnt, ma;

void s1()
{
    if (y - 1 >= 0) field[x][y-1]++;
    if (x - 1 >= 0) field[x-1][y]++;
    if (y + 1 < 10) field[x][y+1]++;
    if (x + 1 < 10) field[x+1][y]++;
}

void s2()
{
    s1();
    if (x - 1 >= 0 && y - 1 >= 0) field[x-1][y-1]++;
    if (x - 1 >= 0 && y + 1 < 10) field[x-1][y+1]++;
    if (x + 1 < 10 && y - 1 >= 0) field[x+1][y-1]++;
    if (x + 1 < 10 && y + 1 < 10) field[x+1][y+1]++;
}

void s3()
{
    s2();
    if (y - 2 >= 0) field[x][y-2]++;
    if (x - 2 >= 0) field[x-2][y]++;
    if (y + 2 < 10) field[x][y+2]++;
    if (x + 2 < 10) field[x+2][y]++;
}

int main()
{
    while(scanf("%d,%d,%d",&x,&y,&s) != EOF) {
        field[x][y]++;
        if      (s == 1) s1();
        else if (s == 2) s2();
        else if (s == 3) s3();
    }

    for(int i=0;i < 10;++i) {
        for(int j=0;j < 10;++j) {
            if (!field[i][j]) ++cnt;
            else ma = max(ma, field[i][j]);
        }
    }
    printf("%d\n%d\n", cnt, ma);

    return 0;
}