Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d\n", count, max)
}

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

int main(){
    int grid[14][14];
    int s[4][2]={{0,-1},{0,1},{-1,0},{1,0}};
    int m[4][2]={{-1,-1},{-1,1},{1,-1},{1,1}};
    int l[4][2]={{0,-2},{0,2},{-2,0},{2,0}};
    int x, y, size;
    int i, j;
    int max=0;
    int blank=0;
    char comma;
    for(i=0;i<14;i++){
        for(j=0;j<14;j++){
            grid[i][j] = 0;
        }
    }
    while(cin >> x >> comma >> y >> comma >> size){
        x += 2;
        y += 2;
        grid[x][y] += 1;
        for(i=0;i<4;i++){
            grid[x+s[i][0]][y+s[i][1]] += 1;
        }
        if(size > 1){
            for(i=0;i<4;i++){
                grid[x+m[i][0]][y+m[i][1]] += 1;
            }
            if(size > 2){
                for(i=0;i<4;i++){
                    grid[x+l[i][0]][y+l[i][1]] += 1;
                }
            }
        }
    }
    for(i=2;i<12;i++){
        for(j=2;j<12;j++){
            if(grid[i][j] > max){
                max = grid[i][j];
            }else if(grid[i][j] == 0){
                blank += 1;
            }
        }
    }
    cout << blank << endl;
    cout << max << endl;
    return 0;
}

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

int main(){
  int x,y,size,cnt = 0,ma = -1;
  int mas[10][10] = {0};
  int dx1[4] = {0,1,0,-1},dy1[4] = {1,0,-1,0};
  int dx2[8] = {0,1,0,-1,1,1,-1,-1},dy2[8] = {1,0,-1,0,1,-1,1,-1};
  int dx3[12]={1,0,-1,0,1,1,-1,-1,0,0,2,-2},dy3[12]={0,1,0,-1,-1,1,1,-1,2,-2,0,0};
  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    if(size == 1){
      for(int i=0;i<4;i++){
	int nx = x+dx1[i];
	int ny = y+dy1[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 2){
      for(int i=0;i<8;i++){
	int nx = x+dx2[i];
	int ny = y+dy2[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 3){
      for(int i=0;i<12;i++){
	int nx = x+dx3[i];
	int ny = y+dy3[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j] == 0) cnt++;
      ma = max(ma,mas[i][j]);
    }
  }
  cout << cnt << endl << ma << endl;
}

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

int field[10][10] = {0};

void small(int x,int y){
	int vx[4] = {-1,0,1,0};
	int vy[4] = {0,-1,0,1};
	if(x>=0 && x<10 && y>=0 && y<10)
		field[x][y]++;
	for(int i=0;i<4;i++){
		if(x+vx[i]>=0 && x+vx[i] <10 && y+vy[i]>=0 && y+vy[i]<10)
			field[x+vx[i]][y+vy[i]]++;
	}	
}
void mid(int x,int y){
	int vx[3] = {-1,0,1};
	int vy[3] = {-1,0,1};
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
		if(x+vx[i]>=0 && x+vx[i] <10 && y+vy[j]>=0 && y+vy[j]<10)
			field[x+vx[i]][y+vy[j]]++;
		}
	}
}
void large(int x,int y){
	int vx[4] = {-2,0,2,0};
	int vy[4] = {0,-2,0,2};
	mid(x,y);
	for(int i=0;i<4;i++){
		if(x+vx[i]>=0 && x+vx[i] <10 && y+vy[i]>=0 && y+vy[i]<10)
			field[x+vx[i]][y+vy[i]]++;
	}
}

void search()
{
	int m = 0;
	int zerocount = 0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(field[i][j]==0)
				zerocount++;
			m = max(m,field[i][j]);
		}
	}
	cout << zerocount << endl;
	cout << m << endl;
}
int main()
{
	int x,y,size;
	char dot;
	while(cin >> x >> dot >> y >> dot >> size){
		if(size == 1)
			small(x,y);
		else if(size == 2)
			mid(x,y);
		else if(size == 3)
			large(x,y);
	}
	search();
	return 0;
}

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

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)

long long paper[10][10];
const int dx[] = {0,0,1,-1};
const int dy[] = {1,-1,0,0};
const int diax[] = {1,1,-1,-1};
const int diay[] = {-1,1,1,-1};

void dai(int x, int y){
	REP(z,1,3)rep(k,4){
		int tx = x+dx[k]*z , ty = y+dy[k]*z;
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
	rep(k,4){
		int tx = x+diax[k] , ty = y+diay[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}
void chuu(int x, int y){
	rep(k,4){
		int tx = x+dx[k] , ty = y+dy[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
	rep(k,4){
		int tx = x+diax[k] , ty = y+diay[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}
void shou(int x, int y){
	rep(k,4){
		int tx = x+dx[k] , ty = y+dy[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}

int main(){
	int x,y,sz;
	memset(paper,0,sizeof(paper));
	while(~scanf("%d,%d,%d",&x,&y,&sz)){
		if( sz==3 )      dai(x,y);
		else if( sz==2 ) chuu(x,y);
		else             shou(x,y);
	}
	long long nasi = 0, ari = 0;
	rep(i,10)rep(j,10){
		if( paper[i][j]==0 )nasi++;
		else{
			ari = max(ari,paper[i][j]);
		}
	}
	printf("%lld\n%lld",nasi,ari);
	return 0;
}

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

int xy[14][14] = {};

int dai(int x, int y){
	xy[x-2][y]++;
	xy[x+2][y]++;
	xy[x][y-2]++;
	xy[x][y+2]++;
	return 0;
}

int chu(int x, int y, int z){
	if(z>2){
		dai(x, y);
	}
	xy[x-1][y+1]++;
	xy[x+1][y+1]++;
	xy[x-1][y-1]++;
	xy[x+1][y-1]++;
	return 0;
}

int sho(int x, int y, int z){
	if(z>1){
		chu(x, y, z);
	}
	xy[x][y]++;
	xy[x-1][y]++;
	xy[x][y-1]++;
	xy[x+1][y]++;
	xy[x][y+1]++;
	return 0;
}

int main(){
	string input, xx, yy, zz;
	int x, y, z;
	while (true){
		cin >> input;
		if (cin.eof()) { break; }
		xx = input[0];
		yy = input[2];
		zz = input[4];
		x = stoi(xx) + 2;
		y = stoi(yy) + 2;
		z = stoi(zz);
		sho(x, y, z);
	}
	int add = 0, max = 0;
	for(int i = 2;i<12;i++){
		for(int j = 2;j<12;j++){
			if (xy[i][j] == 0) { add++; }
			if (xy[i][j] > max) { max = xy[i][j]; }
		}
	}
	cout << add << endl
		<< max << endl;
	return 0;
}