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++: #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;

int main() {
	int pap[10][10];
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			pap[i][j] = 0;
		}
	}
	int x, y, s;
	int ca = 0;
	int p = 0;
	while (scanf("%d,%d,%d", &x, &y, &s)+1) {

		if (s == 1) {pap[x][y] + 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }

			if (s == 2) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }

			if (s == 3) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }
			if (x + 2 < 10) { pap[x + 2][y] += 1; }
			if (x - 2 > -1) { pap[x - 2][y] += 1; }
			if (y + 2 < 10) { pap[x][y + 2] += 1; }
			if (y - 2 > -1) { pap[x][y - 2] += 1; }
		
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 10; j++) {
					if (pap[i][j] == 0) { ca++; }
					if (p < pap[i][j]) { p = pap[i][j]; }
				}
			}
	}
	cout << ca << endl << p << endl;
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;

const int margin = 2;
const int paper_size = 10;
int cordx[] = {0,  0, -1, 0, 1, -1, -1, 1,  1,  0, -2, 0, 2};
int cordy[] = {0, -1,  0, 1, 0, -1,  1, 1, -1, -2,  0, 2, 0};

int main(int argc, char **argv)
{
  vvi paper(paper_size+margin, vi(paper_size+margin, 0));
  int x, y, size;
  char com;
  for (;;) {
    cin >> x >> com >> y >> com >> size;
    if (cin.eof())
      break;

    for (int i = 0; i < 1+4*size; i++) {
      paper[margin+x+cordx[i]][margin+y+cordy[i]]++;
    }
  }

  int empty_nr = 0;
  int max_score = 0;
  for (int i = margin; i < margin+paper_size; i++) {
    for (int j = margin; j < margin+paper_size; j++) {
      if (paper[i][j]) {
        max_score = max(max_score, paper[i][j]);
      } else {
        empty_nr++;
      }
    }
  }
  cout << empty_nr << " " << max_score << endl;

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int a[15][15]={0},b=0,c=0,x,y,t;
  string s[50];
  while(scanf("%d,%d,%d",&x,&y,&t)){
    if(t==3){a[x+2][y+2]++;a[x+1][y+2]++;a[x][y+2]++;a[x+3][y+2]++;a[x+4][y+2]++;a[x+2][y+1]++;a[x+2][y]++;a[x+2][y+3]++;a[x+2][y+4]++;a[x+3][y+3]++;a[x+3][y+1]++;a[x+1][y+3]++;a[x+1][y+1]++;}
    if(t==2){a[x+2][y+2]++;a[x+1][y+2]++;a[x+3][y+2]++;a[x+2][y+1]++;a[x+2][y+3]++;a[x+3][y+3]++;a[x+3][y+1]++;a[x+1][y+3]++;a[x+1][y+1]++;}
    else {a[x+2][y+2]++;a[x+1][y+2]++;a[x+3][y+2]++;a[x+2][y+1]++;a[x+2][y+3]++;}
  }
  for(int i=2;i<13;i++){
    for(int j=2;j<13;j++){
      if(!a[i][j])c++;
      b=max(b,a[i][j]);
    }
  }
  cout<<b<<endl<<c<<endl;
}

C++: #include <algorithm>
#include <cctype>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <functional>
#include <queue>
#include <string>
#include <map>
#include <vector>

using namespace std;

int p[10][10];

void drop(int x, int y) {
  if (0 <= x && x < 10 && 0 <= y && y < 10)
    p[x][y]++;
}

int main() {
  int x, y, s;
  while (scanf("%d,%d,%d", &x, &y, &s) == 3)
    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-1, y);
      drop(x+1, y);
      drop(x, y);
      drop(x, y-1);
      drop(x, y+1);
      break;
    default:
      break;
    }
  int c = 0, d = 0;
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < 10; j++) {
      if (!p[i][j]) c++;
      d = max(d, p[i][j]);
    }
  printf("%d\n%d\n", c, d);
  return 0;
}

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

int G[10][10];

void draw(int x, int y) {
  if(0<=x<10 && 0<=y<10) {
    G[y][x] ++;
  }
}

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

  fill(G[0], G[10], 0);
  
  while(scanf("%d,%d,%d", &a, &b, &c) != EOF) {
    draw(a, b);
    switch(c) {
    case 1:
      draw(a-1, b);
      draw(a+1, b);
      draw(a, b-1);
      draw(a, b+1);
    case 2:
      draw(a-1, b-1);
      draw(a+1, b-1);
      draw(a-1, b+1);
      draw(a+1, b+1);
    case 3:
      draw(a-2, b);
      draw(a+2, b);
      draw(a, b-2);
      draw(a, b+2);
      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]);
    }
  }

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