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 <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int a[10][10];

int main() {
    int x, y, t;
    while (scanf("%d,%d,%d", &x, &y, &t) != EOF) {
        if (t == 2) {
            rep (i, 10) rep (j, 10) if (abs(x-i)<2 && abs(y-j)<2) a[i][j]++;
        }
        else {
            const int d = t == 1 ? 1 : 2;
            rep (i, 10) rep (j, 10) if (abs(x-i)+abs(y-j) <= d) a[i][j]++;
        }
    }
    int c = 0, m = 0;
    rep (i, 10) rep (j, 10) {
        if (a[i][j] == 0) c++;
        if (a[i][j] > m) m = a[i][j];
    }
    printf("%d\n", c);
    printf("%d\n", m);
    return 0;
}

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

int masu[10][10];
void small(int x, int y) {
    for (int i = x-1; i <= x+1; i++) {
        if (0 <= i && i < 10) {
            masu[y][i]++;
        }
    }
    for (int i = y-1; i <= y+1; i++) {
        if (0 <= i && i < 10) {
            masu[i][x]++;
        }
    }
    masu[y][x]--;
}

void middle(int x, int y) {
    for (int i = y-1; i <= y+1; i++) {
        for (int j = x-1; j <= x+1; j++) {
            if (0 <= i && i < 10 && 0 <= j && j < 10) {
                masu[i][j]++;
            }
        }
    }
}

void big(int x, int y) {
    middle(x, y);
    if (0 <= x-2 && x-2 < 10) masu[y][x-2]++;
    if (0 <= x+2 && x+2 < 10) masu[y][x+2]++;
    if (0 <= y-2 && y-2 < 10) masu[y-2][x]++;
    if (0 <= y+2 && y+2 < 10) masu[y+2][x]++;
}

int main(void) {
    string s;

    while (cin >> s) {
        replace(s.begin(), s.end(), ',', ' ');
        stringstream ss(s);
        int x, y, size;
        ss >> x >> y >> size;

        switch (size) {
        case 1:
            small(x, y);
            break;
        case 2:
            middle(x, y);
            break;
        case 3:
            big(x, y);
        }
    }

    int max_num = -1;
    int no_color = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (masu[i][j] == 0) {
                no_color++;
            } else {
                max_num = max(max_num, masu[i][j]);
            }
        }
    }

    cout << no_color << endl;
    cout << max_num << endl;

    return 0;
}

C++: #include <iostream>
#include <cstring>

using namespace std;

int small_x[4] = {-1,  0, 0, 1};
int small_y[4] = { 0, -1, 1, 0};

int medium_x[8] = {-1, -1, -1,  0, 0,  1, 1, 1};
int medium_y[8] = {-1,  0,  1, -1, 1, -1, 0, 1};

int large_x[12] = {-2, -1, -1, -1,  0,  0, 0, 0,  1, 1, 1, 2};
int large_y[12] = { 0, -1,  0,  1, -2, -1, 1, 2, -1, 0, 1, 0};

void solve()
{
	int Field[14][14];
	memset(Field, 0, sizeof(Field));
	int a, b, c;
	while(~scanf("%d,%d,%d", &a, &b, &c))
	{
		++Field[b + 2][a + 2];
		if(c == 1)
		{
			for(int i = 0; i < 4; ++i)
			{
				++Field[b + 2 + small_y[i]][a + 2 + small_x[i]];
			}
		}
		else if(c == 2)
		{
			for(int i = 0; i < 8; ++i)
			{
				++Field[b + 2 + medium_y[i]][a + 2 + medium_x[i]];
			}
		}
		else if(c == 3)
		{
			for(int i = 0; i < 12; ++i)
			{
				++Field[b + 2 + large_y[i]][a + 2 + large_x[i]];
			}
		}
	}
	int count = 0;
	int Max = 0;
	for(int i = 2; i < 12; ++i)
	{
		for(int j = 2; j < 12; ++j)
		{
			if(Field[i][j] == 0)
			{
				++count;
			}
			if(Max < Field[i][j])
			{
				Max = Field[i][j];
			}
		}
	}
	cout << count << endl;
	cout << Max << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

int dx[]={0,0,0,1,-1,1,1,-1,-1,0,0,2,-2};
int dy[]={0,1,-1,0,0,1,-1,1,-1,2,-2,0,0};
	int sz[4] ={0,5,9,13};
int mas[12][12]={0};
int x,y,s;
char zz;
	
	while(cin >> x >> zz >> y >>zz >> s ){
		rep(i,sz[s]){
			int xx=x+dx[i]; int yy=y+dy[i];
			if(xx >=0 && xx <=9 && yy >=0 && yy<=9) mas[xx][yy]++;
		}
	}
	int wcnt =0, mx =-999;
	rep(i,10) rep(j,10){
		if(mas[i][j]==0) wcnt++;
		mx = max(mx,mas[i][j]);
	}
	cout << wcnt << endl << mx << endl;;
	return 0;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

int m[10][10];

void small(int x, int y, int r) {
    if (y - r >= 0) m[x][y-r]++;
    if (x - r >= 0) m[x-r][y]++;
    if (x + r >= 0) m[x+r][y]++;
    if (y + r >= 0) m[x][y+r]++;
    m[x][y]++;
}

void middle(int x, int y) {
    for (int i = -1; i < 2; i++) for (int j = -1; j < 2; j ++){
        if (x + i >= 0 && x+i <= 9 && y + j >= 0 && y + j <= 9) m[x + i][y + i]++;
    }
}

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) != EOF) {
        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 = 0; i < 10; i++) for (j = 0; j < 10; j++) {
        if (m[i][j] == 0) k++; else h = h < m[i][j] ? m[i][j] : h;
    }
    cout << k << endl << h << endl;
    return 0;
}