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", count, max)
}

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

int main(){
	int x,y,size,glid[10][10];
	int max = 0,count = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			glid[i][j]=0;
		}
	}

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

}

C++: #include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <cstdlib>

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

using namespace std;

vector<string> split(const string &str, char delim)
{
  vector<string> res;
  size_t current = 0, found;
  while((found = str.find_first_of(delim, current)) != string::npos)
  {
    res.push_back(string(str, current, found - current));
    current = found + 1;
  }
  res.push_back(string(str, current, str.size() - current));
  return res;
}

int f[10][10];

bool checkf(int x,int y)
{
	if(0 <= x && x < 10 && 0 <= y && y < 10)
	{
		return true;
	}
	else
	{
		return false;
	}
}

void dropInk(int x,int y,int size)
{
	if(size == 1)
	{
		f[x][y]++;
		if(checkf(x+1,y)) f[x+1][y]++;
		if(checkf(x-1,y)) f[x-1][y]++;
		if(checkf(x,y+1)) f[x][y+1]++;
		if(checkf(x,y-1)) f[x][y-1]++;
	}
	else if(size == 2)
	{
		REP(i,-1,2)
		{
			REP(j,-1,2)
			{
				if(checkf(x+i,y+j)) f[x+i][y+j]++;
			}
		}
	}
	else if(size == 3)
	{
		REP(i,-1,2)
		{
			REP(j,-1,2)
			{
				if(checkf(x+i,y+j)) f[x+i][y+j]++;
			}
		}
		if(checkf(x+2,y)) f[x+2][y]++;
		if(checkf(x-2,y)) f[x-2][y]++;
		if(checkf(x,y+2)) f[x][y+2]++;
		if(checkf(x,y-2)) f[x][y-2]++;
	}
}

int main()
{
	memset(f,0,sizeof(f));
	string s;
	while(cin >> s)
	{
		vector<string> _s = split(s,',');
		int x = atoi(_s[0].c_str());
		int y = atoi(_s[1].c_str());
		int size = atoi(_s[2].c_str());

		dropInk(y,x,size);
	}

	int count = 0;
	int ans = 0;
	rep(i,10)
	{
		rep(j,10)
		{
			if(f[i][j] == 0)
			{
				count++;
			}
			ans = max(ans,f[i][j]);
		}
	}

	cout << count << endl << ans << endl;
	return 0;
}

C++: #include <stdio.h>
int main() {
    int RB[10][10],i,j,k;for (i=0;i<10;i++) for (j=0;j<10;RB[i][j++]=0);while (scanf("%d,%d,%d",&i,&j,&k)!=EOF) {
        RB[i][j]++;if (i) RB[i-1][j]++;if (i<9) RB[i+1][j]++;if (j) RB[i][j-1]++;if (j<9) RB[i][j+1]++;if (k>1) {if (i*j) RB[i-1][j-1]++;if (i<9 && j<9) RB[i+1][j+1]++;if (i && j<9) RB[i-1][j+1]++;if (i<9 && j) RB[i+1][j-1]++;} if (k==3) {if (i>1) RB[i-2][j]++;if (i<8) RB[i+2][j]++;if (j>1) RB[i][j-2]++;if (j<8) RB[i][j+2]++;}}
    for (i=0,k=100;i<10;i++) for (j=0;j<10;j++) if (RB[i][j]) k--;printf("%d\n",k);for (i=0,k=0;i<10;i++) for (j=0;j<10;j++) if (RB[i][j]>k) k=RB[i][j];printf("%d\n",k);return 0;}

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

using namespace std;

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

void small(int x, int y){
	grid[x][y]++;
	grid[x - 1][y]++;
	grid[x + 1][y]++;
	grid[x][y - 1]++;
	grid[x][y + 1]++;
}

void medium(int x, int y){
	small(x, y);
	grid[x - 1][y - 1]++;
	grid[x + 1][y - 1]++;
	grid[x - 1][y + 1]++;
	grid[x + 1][y + 1]++;
}

void large(int x, int y){
	medium(x, y);
	grid[x - 2][y]++;
	grid[x + 2][y]++;
	grid[x][y - 2]++;
	grid[x][y + 2]++;
}

int main(){
	int x, y, size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		if (size == 1) small(x + 2, y + 2);
		else if (size == 2) medium(x + 2, y + 2);
		else if (size == 3) large(x + 2, y + 2);
	}

	int ans1 = 0;
	int ans2 = 0;

	for (int i = 2; i < 12; i++){
		for (int j = 2; j < 12; j++){
			if (grid[i][j] == 0)
				ans1++;
			else
				ans2 = max(ans2, grid[i][j]);
		}
	}

	printf("%d\n%d\n", ans1, ans2);

	return 0;
}