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

using namespace std;

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

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		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=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;
}

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




int main()
{
	int area[14][14] = {0};
	int x,nx,ny,y,size;
	int count = 0;
	int max = 0;
	while(cin >> x >> y >> size){
		nx=x+2;
		ny=y+2;
		switch (size){
		case 1:
			for (int i=-1;i<2;i++){
				area[nx+i][ny]++;
				area[nx][ny+i]++;
			}
			break;
		case 2:
			for (int i=-1;i<2;i++){
				for (int j=-1;j<2;j++){
					area[nx+i][ny+j]++;
				}
			}
			break;
		default:
			for (int i=-1;i<2;i++){
				for (int j=-1;j<2;j++){
					area[nx+i][ny+j]++;
				}
			}
			area[nx-2][ny]++;
			area[nx+2][ny]++;
			area[nx][ny-2]++;
			area[nx][ny+2]++;
			break;
		}	
	}
	for (int i=2;i<12;i++){
		for (int j=2;j<12;j++){
			if (area[i][j]==0){
				count++;
			}
		}
	}
	for (int i=2;i<12;i++){
		for (int j=2;j<12;j++){
			if (max < area[i][j]){
				max=area[i][j];
			}
		}
	}
	cout << count <<endl;
	cout << max << endl;


	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int vx[4]={1,0,-1,0};
int vy[4]={0,1,0,-1};
int vx2[4]={2,0,-2,0};
int vy2[4]={0,2,0,-2};
int main(){
  int x,y,s;
  int Map[10][10];
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      Map[i][j]=0;
  while(scanf("%d,%d,%d",&x,&y,&s)){
    switch(s){
    case 1:
      Map[x][y]++;
      for(int i=0;i<4;i++)
	if(x+vx[i]<=9&&x+vx[i]>=0&&y+vy[i]<=9&&y+vy[i]>=0)
	  Map[x+vx[i]][y+vy[i]]++;
      break;
    case 2:
      Map[x][y]++;
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  if(x+i<=9&&x+i>=0&&y+j<=9&&y+j>=0)
	    Map[x+i][y+i]++;
	}
      }
      break;
    case 3:
      Map[x][y]++;
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  if(x+i<=9&&x+i>=0&&y+j<=9&&y+j>=0)
	    Map[x+i][y+i]++;
	}
      }
      for(int i=0;i<4;i++)
	if(x+vx2[i]<=9&&x+vx2[i]>=0&&y+vy2[i]<=9&&y+vy2[i]>=0)
	  Map[x+vx2[i]][y+vy2[i]]++;
      break;
    }
  }
  int white=0;
  int Max=0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(Map[i][j]==0)
	white++;
      Max=max(Max,Map[i][j]);
    }
  }
  cout<<white<<endl<<Max<<endl;
  return 0;
}

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

void small (int a[10][10],int x,int y)
{
	a[x][y]++;
	int d[2]={1,-1};
	int nx,ny;
	for(int i=0;i<2;i++){
		nx=x+d[i];
		if(nx>=0 && nx<10 && y>=0 && y<10)
			a[nx][y]++;
	}
	for(int i=0;i<2;i++){
		ny=y+d[i];
		if(x>=0 && x<10 && ny>=0 && ny<10)
			a[x][ny]++;
	}
}

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

void large (int a[10][10],int x,int y)
{
	int nx,ny;
	for(int i=-1;i<=1;i++)
		for(int j=-1;j<=1;j++){
			nx=x+i;
			ny=y+j;
			if(nx>=0 && nx<10 && ny>=0 && ny<10)
			a[nx][ny]++;
		}
		int d[2]={2,-2};
	for(int i=0;i<2;i++){
		nx=x+d[i];
		if(nx>=0 && nx<10 && y>=0 && y<10)
			a[nx][y]++;
	}
	for(int i=0;i<2;i++){
		ny=y+d[i];
		if(x>=0 && x<10 && ny>=0 && ny<10)
			a[x][ny]++;
	}
}

int main()
{
	int a[10][10]={0};
	int x,y,size;
	int brank=0,c=0;

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
		case 1:
			small(a,x,y);
			break;
		case 2:
			middle(a,x,y);
			break;
		case 3:
			large(a,x,y);
			break;
		}
	}

	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++){
			if(a[i][j]==0)
				brank++;
			else if(c<a[i][j])
				c=a[i][j];
		}
		cout<<brank<<endl;
		cout<<c<<endl;
}

C++: // 2014/09/08 Tazoe

#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int main()
{
	int F[14][14];
	for(int y=0; y<14; y++){
		for(int x=0; x<14; x++){
			F[y][x] = 0;
		}
	}

	while(true){
		string S;
		cin >> S;

		if(cin.eof())
			break;

		for(int i=0; i<2; i++){
			int loc = S.find(",");
			S.replace(loc, 1, " ");
		}

		istringstream is(S);
		int x, y, s;
		is >> x >> y >> s;

//		cout << x << ' ' << y << ' ' << s << endl;

		x = x+2;
		y = y+2;

		if(s==1){
			F[y][x]++;
			F[y-1][x]++;
			F[y+1][x]++;
			F[y][x-1]++;
			F[y][x+1]++;
		}
		else if(s==2){
			F[y][x]++;
			F[y-1][x]++;
			F[y+1][x]++;
			F[y][x-1]++;
			F[y][x+1]++;
			F[y-1][x-1]++;
			F[y-1][x+1]++;
			F[y+1][x-1]++;
			F[y+1][x+1]++;
		}
		else if(s==3){
			F[y][x]++;
			F[y-1][x]++;
			F[y+1][x]++;
			F[y][x-1]++;
			F[y][x+1]++;
			F[y-1][x-1]++;
			F[y-1][x+1]++;
			F[y+1][x-1]++;
			F[y+1][x+1]++;
			F[y-2][x]++;
			F[y+2][x]++;
			F[y][x-2]++;
			F[y][x+2]++;
		}
	}

	int cnt = 0;
	int F_max = -1;

	for(int y=0; y<10; y++){
		for(int x=0; x<10; x++){
			if(F[y+2][x+2]==0){
				cnt++;
			}

			if(F[y+2][x+2]>F_max){
				F_max = F[y+2][x+2];
			}
		}
	}

	cout << cnt << endl;
	cout << F_max << endl;

	return 0;
}