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 <stdio.h>
using namespace std;
int m[14][14],h;

void small(int x,int y,int r) {
	m[x][y-r]++;
	m[x-r][y]++; m[x][y]++; m[x+r][y]++;
	m[x][y+r]++;
}
void middle(int x,int y) {
	for (int i=-1; i<2; i++) for (int j=-1; j<2; j++) m[x+i][y+j]++;
}
void large(int x,int y) {
	middle(x,y);
	small(x,y,2);
    m[x][y]--;
}

int main() {
	int x,y,n,i,j,h,k;
	while(scanf("%d,%d,%d",&x,&y,&n)) {
		x+=2; y+=2;
		if (n==1) small(x,y,1); 
		if (n==2) middle(x,y);
		if (n==3) large(x,y);
	}
    n=0; h=0; k=0;
	for (i=2;i<12;i++) for (j=2;j<12;j++) {
		if (m[i][j]==0) k++; else h=h<m[i][j] ? m[i][j] : h;
	}
    cout << k << endl << h << endl;
	return 0;
	}

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

int main() {
	int p[14][14] = {};
	int x, y, s;
	int ca = 0;
	int a = 0;
	while (scanf("%d,%d,%d", &x, &y, &s) + 1) {
		if (s == 1) {
			p[x + 2][y + 2] += 1;
			p[x + 3][y + 2] += 1;
			p[x + 2][y + 1] += 1;
			p[x + 2][y + 3] += 1;
			p[x + 1][y + 2] += 1;
		}

		if (s == 2) {
			p[x + 2][y + 2] += 1;
			p[x + 3][y + 2] += 1;
			p[x + 2][y + 1] += 1;
			p[x + 2][y + 3] += 1;
			p[x + 1][y + 2] += 1;
			p[x + 3][y + 3] += 1;
			p[x + 3][y + 1] += 1;
			p[x + 1][y + 1] += 1;
			p[x + 1][y + 3] += 1;
		}

		if (s == 3) {
			p[x + 2][y + 2] += 1;
			p[x + 3][y + 2] += 1;
			p[x + 2][y + 1] += 1;
			p[x + 2][y + 3] += 1;
			p[x + 1][y + 2] += 1;
			p[x + 3][y + 3] += 1;
			p[x + 3][y + 1] += 1;
			p[x + 1][y + 1] += 1;
			p[x + 1][y + 3] += 1;
			p[x + 4][y + 2] += 1;
			p[x][y + 2] += 1;
			p[x + 2][y + 4] += 1;
			p[x + 2][y] += 1;
		}
	}
	a = p[2][2];
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (p[i][j] == 0) {
				ca++;
			}
			if (p[i][j] > a) {
				a = p[i][j];
			}
		}
	}
	cout << ca << endl << a << endl;
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
//#include <sstream>
//#include <queue>

using namespace std;


int main(){

	int field[14][14];
	int x, y, s,cntz = 0,max = 0;
	char c;

	for (int i = 0; i < 14; i++){
		for (int j = 0; j < 14; j++){
			field[i][j] = 0;
		}
	}


	while (cin >> x >> c >> y >> c >> s){

		//?°?
		if (s == 1){
			field[x + 2][y + 2]++;
			field[x + 2][y + 1]++;
			field[x + 2][y + 3]++;
			field[x + 1][y + 2]++;
			field[x + 3][y + 2]++;
		}
		//????????§
		if (s == 2 || s == 3){
			for (int i = -1; i <= 1; i++){
				for (int j = -1; j <= 1; j++){
					field[x + 2 + i][y + 2 + j]++;
				}
			}
		}
		//??§
		if (s == 3){
			field[x + 2][y]++;
			field[x + 2][y + 4]++;
			field[x][y + 2]++;
			field[x + 4][y + 2]++;
		}

	}

	for (int i = 2; i < 12; i++){
		for (int j = 2; j < 12; j++){
			if (field[i][j] == 0)cntz++;
			if (field[i][j] > max)max = field[i][j];
		}
	}

	cout << cntz << endl;
	cout << max << endl;

	return 0;
}

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

int G[10][10];

bool inF(int x, int y) { return 0<=x<10 && 0<=y<10; }

void draw(int x, int y) {
  if(inF(x, y)) {
    G[y][x] ++;
  }
}

int main() {
  int a, b, c;
  char d;

  fill(G[0], G[9]+10, 0);
  
  while(cin >> a >> d >> b >> d >> c) {
    draw(a, b);
    switch(c) {
    case 3:
      draw(a-2, b);
      draw(a+2, b);
      draw(a, b-2);
      draw(a, b+2);
    case 2:
      draw(a-1, b-1);
      draw(a+1, b-1);
      draw(a-1, b+1);
      draw(a+1, b+1);
    case 1:
      draw(a-1, b);
      draw(a+1, b);
      draw(a, b-1);
      draw(a, b+1);
      break;
    }
  }
  
  int clrNum = 0, mx=0;  
  
  for(int i=0; i<10; i++) {
    for(int j=0; j<10; j++) {
      mx = max(mx, G[i][j]);
      if(G[i][j]==0) clrNum ++;
    }
  }

  cout << clrNum << endl << mx << endl;
  
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int sx[] = { 0, 1, 0, -1 };
int sy[] = { -1, 0, 1, 0 };
int mx[] = { -1, 0, 1, 1, 1, 0, -1, -1 };
int my[] = { -1, -1, -1, 0, 1, 1, 1, 0 };
int lx[] = { -1, 0, 1, 1, 1, 0, -1, -1, 0, 2, 0, -2 };
int ly[] = { -1, -1, -1, 0, 1, 1, 1, 0, -2, 0, 2, 0 };

int main() {
    int paper[10][10] = { 0 };
    int x, y, s, nx, ny;
    while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
        if (s == 1) {
            for (int i = 0; i < 4; i++) {
                nx = x + sx[i];
                ny = y + sy[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
        else if (s == 2) {
            for (int i = 0; i < 8; i++) {
                nx = x + mx[i];
                ny = y + my[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
        else {
            for (int i = 0; i < 12; i++) {
                nx = x + lx[i];
                ny = y + ly[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
    }
    
    int none = 0, maxc = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (paper[i][j] == 0) {
                none++;
            }
            maxc = max(maxc, paper[i][j]);
        }
    }
    cout << none << endl << maxc << endl;
    
    return 0;
}