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++: /*
	0026:Dropping Ink
*/
#include	<iostream>
#include	<algorithm>
#include	<cstdio>

using namespace std;

int map[10][10] = { 0 };
const int vxL[13] = { 0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0 };
const int vyL[13] = { 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2 };
const int vxM[9]  = { 1, 0, -1, 1, 0, -1, 1, 0, -1 };
const int vyM[9]  = { 1, 1, 1, 0, 0, 0, -1, -1, -1 };
const int vxS[5]  = { 0, 1, 0, -1, 0 };
const int vyS[5]  = { 1, 0, 0, 0, -1 };

bool IsField(int x, int y);
void draw(int mx, int my, int size);

int main(void) {
	while(1) {
		int x, y, size;
		
		if( scanf("%d,%d,%d", &x, &y, &size) == EOF ) { break; }
		
		draw(x, y, size);
	}
	int count = 0, maxInk = 0;
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			if(map[i][j] == 0) {
				count++;
			} else {
				maxInk = max(map[i][j], maxInk);
			}
		}
	}
	cout << count << endl << maxInk << endl;
	return 0;
}

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

void draw(int mx, int my, int size) {
	if(size == 1) {
		for(int i = 0; i < 5; i++) {
			int px = mx + vxS[i];
			int py = my + vyS[i];
			if(IsField(px, py)) {
				map[px][py]++;
			}
		}
	} else if(size == 2) {
		for(int i = 0; i < 9; i++) {
			int px = mx + vxM[i];
			int py = my + vyM[i];
			if(IsField(px, py)) {
				map[px][py]++;
			}
		}
	} else {
		for(int i = 0; i < 13; i++) {
			int px = mx + vxL[i];
			int py = my + vyL[i];
			if(IsField(px, py)) {
				map[px][py]++;
			}
		}
	}
}

C++: //インクを落とす
#include<cstdio>

using namespace std;

int main(void){
	int pa[10][10];
	int i,j;	//ループカウンタ
	int x,y,size,da=0,not=0;
	
	//二次元配列の初期化
	for(i=0;i<10;i++){
		for(j=0;j<10;j++)
			pa[i][j]=0;
	}

	while(scanf("%d,%d,%d",&x,&y,&size)!=-1){
		switch(size){
			case 1:	//小
				pa[x][y]++;
				pa[x-1][y]++;
				pa[x+1][y]++;
				pa[x][y-1]++;
				pa[x][y+1]++;
				break;
			case 2:	//中
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[x+i][y+j]++;
				}
				break;
			case 3:	//大
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[x+i][y+j]++;
				}
				pa[x-2][y]++;
				pa[x+2][y]++;
				pa[x][y-2]++;
				pa[x][y+2]++;
				break;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(pa[i][j]==0)
				not++;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(pa[i][j]>da)
				da=pa[i][j];
		}
	}
	printf("%d\n%d\n",not,da);

	return 0;
}

C++: #include<cstdio>

using namespace std;

int main(){
 int pa[14][14];
 int i,j;
 int x,y,size;
 int da=0,not=0;
 
 for(i=0;i<14;i++){
  for(j=0;j<14;j++)
   pa[i][j]=0;
 }

 while(scanf("%d,%d,%d",&x,&y,&size)!=-1){
  x=x+2;
  y=y+2;
  switch(size){
   case 1:
    pa[y][x]++;
    pa[y-1][x]++;
    pa[y+1][x]++;
    pa[y][x-1]++;
    pa[y][x+1]++;
    break;
   case 2:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++){
      pa[y+i][x+j]++;
		}
    }
    break;
   case 3:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++){
      pa[y+i][x+j]++;
		}
    }
    pa[y-2][x]++;
    pa[y+2][x]++;
    pa[y][x-2]++;
    pa[y][x+2]++;
    break;
   default: break;
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]==0){
    not++;
	}
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]>da){
    da=pa[i][j];
	}
  }
 }
 printf("%d\n%d\n",not,da);
 return 0;
}