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>
#include <cstdio>

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size;
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		if (size==1) {
			if (y-1>=0) p[x][y-1]++;
			if (x-1>=0) p[x-1][y]++;
			if (x+1<10) p[x+1][y]++;
			if (y+1<10) p[x][y+1]++;
		} else if (size==2) {
			if (y-1>=0) p[x][y-1]++;
			if (x-1>=0) p[x-1][y]++;
			if (x+1<10) p[x+1][y]++;
			if (y+1<10) p[x][y+1]++;
			if (x-1>=0&&y-1>=0) p[x-1][y-1]++;
			if (x+1<10&&y-1>=0) p[x+1][y-1]++;
			if (x-1>=0&&y+1<10) p[x-1][y+1]++;
			if (x+1<10&&y+1<10) p[x+1][y+1]++;
		} else if (size==3) {
			if (y-1>=0) p[x][y-1]++;
			if (x-1>=0) p[x-1][y]++;
			if (x+1<10) p[x+1][y]++;
			if (y+1<10) p[x][y+1]++;
			if (x-1>=0&&y-1>=0) p[x-1][y-1]++;
			if (x+1<10&&y-1>=0) p[x+1][y-1]++;
			if (x-1>=0&&y+1<10) p[x-1][y+1]++;
			if (x+1<10&&y+1<10) p[x+1][y+1]++;
			if (y-2>=0) p[x][y-2]++;
			if (x-2>=0) p[x-2][y]++;
			if (x+2<10) p[x+2][y]++;
			if (y+2<10) p[x][y+2]++;
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) c++;
			else max(m,p[i][j]);
		}
	}
	cout << c << endl;
	cout << m << endl;
	return 0;
}

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

int board[10][10];
int empty = 0;
int _max = 0;

bool ok(int val) {
    return(val >= 0 && val < 10);
}

void small(int x, int y) {
    board[y][x]++;
    int north = y - 1, south = y + 1,  east = x + 1, west = x - 1;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}

void mid(int x, int y) {
    small(x, y);
    int uprightx = x + 1, uprighty = y + 1;
    int downrightx = x + 1, downrighty = y - 1;
    int downleftx = x - 1, downlefty = y - 1;
    int upleftx = x - 1, uplefty = y + 1;
    if(ok(uprightx) && ok(uprighty)) board[uprighty][uprightx]++;
    if(ok(downrightx) && ok(downrighty)) board[downrighty][downrightx]++;
    if(ok(downleftx) && ok(downlefty)) board[downrighty][downrightx]++;
    if(ok(upleftx) && ok(uplefty)) board[uplefty][upleftx]++;
}

void large(int x, int y) {
    mid(x, y);
    int north = y - 2, south = y + 2,  east = x + 2, west = x - 2;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}

void search() {
    for(int r = 0; r < 10; r++) {
        for(int c = 0; c < 10; c++) {
            if(board[r][c] > _max) _max = board[r][c];
            else if(board[r][c] == 0) empty++;
        }
    }
}

int main(void) {
    int x, y, size;
    
    while(scanf("%d,%d,%d", &x, &y, &size) != EOF) {
        switch(size) {
            case 1: small(x, y); break;
            case 2: mid(x, y);   break;
            default:large(x, y); break;
        }
    }
    search();
    cout << empty << endl << _max << endl;
    return(0);
}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;
int a[14][14];
void drop_ink(int x, int y, int s);

int main()
{
	int count = 0;
	int max = 0;
	for (int i = 0; i < 14; i++) {
		for (int j = 0; j < 14; j++) {
			a[i][j] = 0;
		}
	}
	int x, y, s;
	while (cin >> x >> y >> s) {
		drop_ink(x, y, s);
	}
	for (int i = 2; i <= 11; i++) {
		for (int j = 2; j <= 11; j++) {
			if (a[i][j] == 0) {
				count++;
			}
			if (a[i][j]>max) {
				max = a[i][j];
			}
		}
	}
	cout << count << endl << max << endl;
}

void drop_ink(int x, int y, int s) {
	if (s == 1) {
		a[x + 2][y + 2]++;
		a[x + 2][y + 1]++;
		a[x + 2][y + 3]++;
		a[x + 3][y + 2]++;
		a[x + 1][y + 2]++;
	}
	if (s == 2) {
		drop_ink(x, y, 1);
		a[x + 1][y + 1]++;
		a[x + 1][y + 3]++;
		a[x + 3][y + 1]++;
		a[x + 3][y + 3]++;
	}
	if (s == 3) {
		drop_ink(x, y, 2);
		a[x + 2][y]++;
		a[x + 2][y + 4]++;
		a[x][y + 2]++;
		a[x + 4][y + 2]++;
	}
}

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

using namespace std;

#define XAXIS 10
#define YAXIS 10

int main(){
	int paper[XAXIS][YAXIS];
	int x,y,s;
	int white = 0, most=0;

	//initialize
	for(int i=0; i<XAXIS; i++)
	for(int j=0; j<YAXIS; j++)
		paper[i][j] = 0;

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		switch(s){
			case 3:
				if(x+2 <  XAXIS) paper[x+2][y] += 1; //2 right 
				if(y+2 <  YAXIS) paper[x][y+2] += 1; //2 down
				if(x-2 >= 0)     paper[x-2][y] += 1; //2 left
				if(y-2 >= 0)     paper[x][y-2] += 1; //2 up

			case 2:
				if(x+1 <  XAXIS && y+1 < YAXIS )  paper[x+1][y+1] += 1; //right upper
				if(x+1 <  XAXIS && y-1 > 0)       paper[x+1][y-1] += 1; //right downer
				if(x-1 >= 0     && y+1 < YAXIS )  paper[x-1][y+1] += 1; //left upper
				if(x-1 >= 0     && y-1 < 0)       paper[x-1][y-1] += 1; //left downer

			case 1:
				if(x+1 <  XAXIS) paper[x+1][y] += 1; //right
				if(y+1 <  YAXIS) paper[x][y+1] += 1; //down
				if(x-1 >= 0)     paper[x-1][y] += 1; //left
				if(y-1 >= 0)     paper[x][y-1] += 1; //up
				paper[x][y] += 1;
				break;
		}
	}

	for(int i=0; i<XAXIS; i++)
		for(int j=0; j<YAXIS; j++){
			if(paper[i][j] == 0 )  white++;
			most = max(most,paper[i][j]);
		}

	cout<<white<<endl<<most<<endl;
	return 0;
}