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 drop(int x, int y, int s, int p[14][14]){
	p[x][y]+=1;
	for(int i1=-1;i1<2;i1+=2){
		p[x][y+i1]+=1;
		p[x+i1][y]+=1;
	}
	if(s==1) return 0;
	for(int i2=-1;i2<2;i2+=2){
		p[x+i2][y-i2]+=1;
		p[x-i2][y+i2]+=1;
	}
	if(s==2) return 0;
	for(int i3=-2;i3<=2;i3+=4){
		p[x+i3][y]+=1;
		p[x][y+i3]+=1;
	}
}

int main() {
	int p[14][14]={0};
	int x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)>0){
		 int a=drop(x+2,y+2,s,p);
	}
	int cnt=0,max=0;
	for(int a=2;a<12;a++){
		for(int b=2;b<12;b++){
			if(p[a][b]==0) cnt++;
			if(p[a][b]>max) max=p[a][b];
		}
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

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

using namespace std;
void big(int x,int y,int a[10][10]);
void middle(int x,int y,int a[10][10]);
void small(int x,int y,int a[10][10]);

int main(){
	int a[10][10]={0};
	int x,y,s;
	char c;
	int cnt=0,max=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
	if(s==3)big(x,y,a);
	else if(s==2)middle(x,y,a);
	else if(s==1)small(x,y,a);
	
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)cnt++;
			if(a[i][j]>max)max=a[i][j];
			//cout<<a[i][j]<<" ";
		}
		//cout<<endl;
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

void big(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x-2][y]++;a[x][y-2]++;
	a[x-1][y]++;a[x][y-1]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x+2][y]++;a[x][y+2]++;	
	a[x+1][y+1]++;a[x-1][y-1]++;
	a[x+1][y-1]++;a[x-1][y+1]++;
	return ;
}

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

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

//int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0};

int main(){
	int x, y, s;
	int board[10][10] = {{0}};
	while( ~scanf("%d,%d,%d", &x, &y, &s) ){
		if( s == 3 ){
			for(int i=-2; i<3; i++){
				for(int j=-2; j<3; j++){
					if( abs(i)+abs(j) < 3 ) board[y+i][x+j]++;
				}
			}
		}else if( s == 2 ){
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					board[y+i][x+j]++;
				}
			}
		}else{
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( abs(i)+abs(j) < 2 ) board[y+i][x+j]++;
				}
			}
		}
	}
	int max_c = 0, white = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			cout << board[i][j];
			if( board[i][j] == 0 ) white++;
			max_c = max(max_c, board[i][j]);
		}
		cout << endl;
	}
	cout << white << endl;
	cout << max_c << endl;
}

C++: #include <iostream>

using namespace std;

const int SMALL = 1;
const int MIDDLE = 2;
const int BIG = 3;
int paper[10][10] = {0};

void Dropping_Ink(int x, int y, int size)
{
		if(x-1 > -1)    paper[y][x-1]++;
		if(x+1 < 10)    paper[y][x+1]++;
		if(y-1 > -1)    paper[y-1][x]++;
		if(y+1 < 10)    paper[y+1][x]++;

		if(size >= MIDDLE)
		{
			if(x-1 > -1)
			{
				if(y-1 > -1)    paper[y-1][x-1]++;
				if(y+1 < 10)    paper[y+1][x-1]++;
			}
			if(x+1 < 10)
			{
				if(y-1 > -1)    paper[y-1][x+1]++;
				if(y+1 < 10)    paper[y+1][x+1]++;
			}
		}

		if(size >= BIG)
		{
			if(x-2 > -1)    paper[y-2][x]++;
			if(x+2 < 10)    paper[y+2][x]++;
			if(y-2 > -1)    paper[y][x-2]++;
			if(y+2 < 10)    paper[y][x+2]++;
		}
}

int main()
{
	int x, y, size, white, color;
	char c[2];

	while(cin >> x >> c[0] >> y >> c[1] >> size)
	{
		if(cin.eof())    break;

		Dropping_Ink(x, y, size);

		white = 0;
		color = 0;	
	
		for(int i=0; i<10; i++)
		{
			for(int j=0; j<10; j++)
			{
				if(paper[i][j] == 0)    white++;
				if(paper[i][j] > color)    color = paper[i][j];
			}
		}	
	}

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

C++: #include<iostream>

int paper[10][10]={0};
int sx[] ={1, 0, -1, 0, 1, 1, -1,-1, -2, 2, 0, 0};
int sy[] ={0, 1, 0, -1, 1, -1, 1, -1, 0, 0, -2, 2};


void solve(int x, int y, int le){
	if(le==1){
		paper[x][y]++;
		for(int i=0;i<4;++i){
			int sx_=x+sx[i],sy_=y+sy[i];
			if(sx_ >= 0 && sx_ < 10 && sy_ >= 0 && sy_ < 10)paper[sx_][sy_]++;
		}
	}else if(le==2){
		paper[x][y]++;
		for(int i=0;i<8;++i){
			int sx_=x+sx[i],sy_=y+sy[i];
			if(sx_ >= 0 && sx_ < 10 && sy_ >= 0 && sy_ < 10)paper[sx_][sy_]++;
		}
	}else if(le==3){
		paper[x][y]++;
		for(int i=0;i<12;++i){
			int sx_=x+sx[i],sy_=y+sy[i];
			if(sx_ >= 0 && sx_ < 10 && sy_ >= 0 && sy_ < 10)paper[sx_][sy_]++;
		}
	}
}

int main(){
	int x, y, le;
	char dummy;
	while(std::cin>>x&&std::cin>>dummy&&std::cin>>y&&std::cin>>dummy&&std::cin>>le){
		solve(x,y,le);
	}
	int blank=0;
	int max=0;
	for(int i=0;i<10;++i){
		for(int j = 0; j < 10; ++j){
			if(paper[i][j]>max)max=paper[i][j];
			if(paper[i][j]==0)blank++;
		}
	}
	std::cout<<blank<<std::endl<<max<<std::endl;
	return 0;
}