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 <stdio.h>
using namespace std;

int main()
{
	int size, x, y, coord[20][20] = {0}, noink = 0, max =0;

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

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

int main() {
  int a[10][10]={},x,y,z,count=0, max=0;
  while(scanf("%d%*c%d%*c%d",&x,&y,&z)==3) {
    if(z>2) {
      if(y-2>=0) a[x][y-2]++;
      if(y+2<10) a[x][y+2]++;
      if(x-2>=0) a[x-2][y]++;
      if(x+2<10) a[x+2][y]++;
    }
    if(z>1) {
      if(y+1<10 && x-1>=0) a[x-1][y+1]++;
      if(y+1<10 && x+1<10) a[x+1][y+1]++;
      if(y-1>=0 && x-1>=0) a[x-1][y-1]++;
      if(y-1>=0 && x+1<10) a[x+1][y-1]++;
    }
    if(z>0) {
      if(y+1<10) a[x][y+1]++;
      if(y-1>=0) a[x][y-1]++;
      if(x-1>=0) a[x-1][y]++;
      if(x+1<10) a[x+1][y]++;
      a[x][y]++;
    }
  }
  for(int i=0; i<10; i++) {
    for(int j=0; j<10; j++) {
      if(a[i][j]==0) count++;
      if(a[i][j]>max) max=a[i][j];
    }
  }
  cout << count << endl << max << endl;
  return 0;
}

C++: #include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};
int board[15][15];
int x,y,size;
int nx,ny;
int ans1,ans2;
int main()
{
  ans1 = 0;
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      board[i][j] = 0;
    }
  }
  while(scanf("%d,%d,%d",&x,&y,&size) !=EOF){
    if(x <0||y < 0||x >9 ||y >9){
      continue;
    }
    if(size ==1){
      board[y][x] +=1;
      for(int i = 0;i < 4;i++){
	nx = x +dx[i];
	ny = y +dy[i];
	board[ny][nx] +=1;
      }
    }else if(size ==2){
      for(int i = -1;i <=1;i++){
	for(int j = -1;j <=1;j++){
	  nx = x +j;
	  ny = y +i;
	  if(nx <0 ||nx >=10||ny <0||ny >=10)
	    continue;
	  board[ny][nx] +=1;
	}
      }
    }else if(size ==3){
      for(int i = -2;i <=2;i++){
	for(int j = -2;j <=2;j++){
	  if(i == -2&&j ==0){
	    board[y+i][x] +=1;
	  }else if(i == -1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i == 0){
	    board[y+i][x+j] +=1;
	  }else if(i == 1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i ==2&&j ==0){
	    board[y+i][x] +=1;
	  }
	}
      }
    }
  }
  ans2 = 0; 
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      if(board[i][j] == 0){
	ans1++;
      }
      if(board[i][j] > ans2){
	ans2 = board[i][j];
      }
    }
  }
 
  
  cout <<ans1<<endl;
  cout <<ans2<<endl;
  return 0;
}

C++: //Dropping Ink
#include<bits/stdc++.h>
using namespace std;

inline bool a(int y, int x){
  return (0<=x && x<=9 && 0<=y && y<=9);
}

int p[10][10];

void s1(int y, int x){
  p[y][x]++;
  if(a(y+1, x))p[y+1][x]++;
  if(a(y, x+1))p[y][x+1]++;
  if(a(y-1, x))p[y-1][x]++;
  if(a(y, x-1))p[y][x-1]++;
}

void s2(int y, int x){
  s1(y, x);
  if(a(y+1, x+1))p[y+1][x+1]++;
  if(a(y+1, x-1))p[y+1][x-1]++;
  if(a(y-1, x+1))p[y-1][x+1]++;
  if(a(y-1, x+1))p[y-1][x+1]++;
}

void s3(int y, int x){
  s2(y, x);
  if(a(y+2, x))p[y+2][x]++;
  if(a(y-2, x))p[y-2][x]++;
  if(a(y, x+2))p[y][x+2]++;
  if(a(y, x-2))p[y][x-2]++;
}

int main(){
  int x, y, z;
  int max=0, n=0;

  while(scanf("%d,%d,%d", &x, &y, &z)!=EOF){
    if(z==1)s1(y, x);
    if(z==2)s2(y, x);
    if(z==3)s3(y, x);
  }
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(p[i][j]==0) n++;
      else if(max<p[i][j])max=p[i][j];
    }
  }
  cout << n << endl;
  cout << max << endl;

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int field[10][10];
int sx[]={-1,0,0,0,1},sy[]={0,-1,0,1,0};
int bx[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2},by[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
bool f(int x,int y){
	return x>=0 && x<10 && y>=0 && y<10;
}
void small(int x,int y){
	for(int i=0;i<5;i++){
		if(f(x+sx[i],y+sy[i]))field[x+sx[i]][y+sy[i]]++;
	}
}
void middle(int x,int y){
	for(int i=-1;i<=1;i++){
		for(int j=-1;j<=1;j++){
			if(f(x+i,y+j))field[x+i][y+j]++;
		}
	}
}
void big(int x,int y){
	for(int i=0;i<13;i++){
		if(f(x+bx[i],y+by[i]))field[x+bx[i]][y+by[i]]++;
	}
} 
int main(){
	int x,y,size,ans=0,count=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			field[i][j]=0;
		}
	}
	while(cin>>x>>y>>size){
		if(size==1)small(x,y);
		else if(size==2)middle(x,y);
		else big(x,y);
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(field[i][j]==0)count++;
			else ans=max(ans,field[i][j]);
		}
	}
	cout<<count<<endl<<ans<<endl;
	return 0;
}