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 <vector>
using namespace std;

int main(int argc, char *argv[]) {
	vector<vector<int> > cell_list(10, vector<int>(10, 0));
	const int small_x[4] = {0, 1, 0, -1};
	const int small_y[4] = {-1, 0, 1, 0};
	const int middle_x[4] = {1, 1, -1, -1};
	const int middle_y[4] = {-1, 1, 1, -1};
	const int large_x[4] = {0, 2, 0, -2};
	const int large_y[4] = {2, 0, -2, 0};
	
	while (true) {
		int x, y, size;
		if (EOF == fscanf(stdin, "%d,%d,%d\n", &x, &y, &size)) {
			break;
		}
		// small
		for (int i = 0; i < 4; i++) {
			if (x+small_x[i] >= 0 && y+small_y[i] >= 0 &&
				x+small_x[i] < 10 && y+small_y[i] < 10) {
				cell_list[y+small_y[i]][x+small_x[i]]++;
			}
		}
		// middle
		if (size > 1) {
			for (int i = 0; i < 4; i++) {
				if (x+middle_x[i] >= 0 && y+middle_y[i] >= 0 &&
					x+middle_x[i] < 10 && y+middle_y[i] < 10) {
					cell_list[y+middle_y[i]][x+middle_x[i]]++;
				}
			}
			// large
			if (size > 2) {
				for (int i = 0; i < 4; i++) {
					if (x+large_x[i] >= 0 && y+large_y[i] >= 0 &&
						x+large_x[i] < 10 && y+large_y[i] < 10) {
						cell_list[y+large_y[i]][x+large_x[i]]++;
					}
				}
			}
		}
	}
	
	// calc empty cell and max
	int sum_empty = 0, max = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (cell_list[i][j] == 0) sum_empty++;
			if (cell_list[i][j] > max) max = cell_list[i][j];
		}
	}
	
	// print result
	printf("%d\n%d\n", sum_empty, max);
	return 0;
}

C++: #include<stdio.h>

int main(void){
  int xs[] = {-1,0,0,1},ys[] = {0,-1,1,0};
  int xm[] = {-1,-1,-1,0,0,1,1,1}, ym[] = {-1,0,1,-1,1,-1,0,1};
  int xl[] = {-2,-1,-1,-1,0,0,0,0,1,1,1,2};
  int yl[] = {0,-1,0,1,-2,-1,1,2,-1,0,1,0};

  int x,y,n;
  int max = 0, cnt = 0;

  int map[14][14] = {0};

  while(scanf("%d,%d,%d",&x,&y,&n) != EOF){
    x += 2;
    y += 2;
    switch(n){
    case 1:
      map[x][y]++;
      for(int i = 0; i < 4; i++){
	map[x + xs[i]][y + ys[i]]++;
      }
      break;

    case 2:
      map[x][y]++;
      for(int i = 0; i < 8; i++){
	map[x + xm[i]][y + ym[i]]++;
      }
      break;

    case 3:
      map[x][y]++;
      for(int i = 0; i < 12; i++){
	map[x + xl[i]][y + yl[i]]++;
      }
      break;
    }
  }

  for(int i = 2; i < 12; i++){
    for(int j = 2; j < 12; j++){
      if(map[i][j] == 0)
	cnt++;
      if(max < map[i][j])
	max = map[i][j];
    }
  }
    
  printf("%d\n%d",cnt,max);

  return 0;
}

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

int main(void){
	int map[10][10];
	int x,y,s;
	int n=0,m=0;
	memset(map,0,sizeof(map));
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s>=1){
			map[x][y]+=1;
			if(x-1>=0 && x-1<10)map[x-1][y]+=1;
			if(x+1>=0 && x+1<10)map[x+1][y]+=1;
			if(y-1>=0 && y-1<10)map[x][y-1]+=1;
			if(y+1>=0 && y+1<10)map[x][y+1]+=1;
		}
		if(s>=2){
			if(x-1>=0 && x-1<10 && y-1>=0 && y-1<10)map[x-1][y-1]+=1;
			if(x+1>=0 && x+1<10 && y-1>=0 && y-1<10)map[x+1][y-1]+=1;
			if(x-1>=0 && x-1<10 && y+1>=0 && y+1<10)map[x-1][y+1]+=1;
			if(x+1>=0 && x+1<10 && y+1>=0 && y+1<10)map[x+1][y+1]+=1;
		}
		if(s>=3){
			if(y-2>=0 && y-2<10)map[x][y-2]+=1;
			if(y+2>=0 && y+2<10)map[x][y+2]+=1;
			if(x-2>=0 && x-2<10)map[x-2][y]+=1;
			if(x+2>=0 && x+2<10)map[x+2][y]+=1;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(map[i][j]==0)n++;
			if(map[i][j]>m)m=map[i][j];
		}
	}
	printf("%d\n",n);
	printf("%d\n",m);
    return 0;
}