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,s;
	char com;
	int a[10][10];
	for(int i=0;i<100;i++) a[i/10][i%10] = 0;
	while(cin >> x >> com >> y >> com >> s){
		a[x][y]++;
		if(x>0) a[x-1][y]++;
		if(x<9) a[x+1][y]++;
		if(y>0) a[x][y-1]++;
		if(y<9) a[x][y+1]++;
		if(s>1){
			if(x>0 and y>0) a[x-1][y-1]++;
			if(x>0 and y<9) a[x-1][y+1]++;
			if(x<9 and y>0) a[x+1][y-1]++;
			if(x<9 and y<9) a[x+1][y+1]++;
		}
		if(s==3){
			if(x>1) a[x-2][y]++;
			if(x<8) a[x+2][y]++;
			if(y>1) a[x][y-2]++;
			if(y<8) a[x][y+2]++;
		}
	}
	int c = 0;
	int b = 0;
	for(int i=0;i<100;i++){
		int t = a[i/10][i%10];
		if(t==0) c++;
		if(b<t) b = t;
	}
	cout << c << endl;
	cout << b << endl;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
class Point{
public:
   int x,y;
   Point(){}
   Point(int _x,int _y){
      x = _x; y = _y;
   }
}ink[13] = {Point(0,-1),Point(-1,0),Point(0,0),Point(1,0),Point(0,1),
            Point(-1,-1),Point(1,-1),Point(-1,1),Point(1,1),
            Point(0,-2),Point(-2,0),Point(2,0),Point(0,2)
            };

int main(void){
   int x,y,sz,blank = 100,ma = 0;
   int field[11][11] = {0};
   while(scanf("%d,%d,%d",&x,&y,&sz) != EOF){
      for(int i = 0;i < 13;i++){
         if(sz == 1 && i >= 5) break;
         if(sz == 2 && i >= 9) break;
         int _x = x + ink[i].x,_y = y + ink[i].y;
         if(0 <= _x&&_x < 10 && 0 <= _y&&_y < 10){
               if(field[_x][_y] == 0) blank--;
               ma = max(++field[_x][_y],ma);
         }
      }
   }
   printf("%d\n%d\n",blank,ma);
   return 0;
}

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

int ds[] = {5, 9, 13};
int dx[] = {0, 0, -1, 0, 1, -1, -1, 1, 1, 0, -2, 0, 2};
int dy[] = {0, -1, 0, 1, 0, -1, 1, 1, -1, -2, 0, 2, 0};

int main()
{
  int x, y, s;
  vector<vector<int> > paper(10, vector<int>(10, 0));
  while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    for (int i = 0; i < ds[s-1]; ++i) {
      int xx = x + dx[i];
      int yy = y + dy[i];

      if (xx >= 0 && xx < 10 && yy >= 0 && yy < 10)
	++paper[yy][xx];
    }
  }

  int plain = 0, con = 0;
  for (int i = 0; i < paper.size(); ++i) {
    for (int j = 0; j < paper[0].size(); ++j) {
      if (paper[i][j] == 0)
	++plain;
      con = max(con, paper[i][j]);
    }
  }
  
  cout << plain << endl << con << endl;

  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int x,y,size,maxm,cnt;
int t[10][10];
char ch;
void pl(int y,int x){
  if(y<0||y==10||x<0||x==10)return;
  t[y][x]++;
  maxm=max(maxm,t[y][x]);
}

int main(){
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      t[i][j]=0;
  maxm=cnt=0;
  while(cin>>x>>ch>>y>>ch>>size){
    if(size==1){
      pl(y,x),pl(y+1,x),pl(y-1,x),pl(y,x+1),pl(y,x-1);
    }else if(size==2){
      for(int i=y-1;i<y+2;i++){
	for(int j=x-1;j<x+2;j++){
	  pl(i,j);
	}
      }
    }else{
      for(int i=y-2;i<y+3;i++){
	for(int j=x-2;j<x+3;j++){
	  if((i-y)*(i-y)+(j-x)*(j-x)<=4)pl(i,j);
	}
      }
    }
  }
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      cnt+=(t[i][j]==0);
  cout<<cnt<<endl<<maxm<<endl;
  return 0;
}

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

int m[10][10];
int ax[]={0,1,0,-1,1,1,-1,-1,0,2,0,-2};
int ay[]={-1,0,1,0,-1,1,1,-1,-2,0,2,0};

void dfs(int x,int y,int size){
  m[x][y]+=1;
  if(size==1){
    for(int i=0;i<4;i++){
      if(x-ax[i]<0 || x-ax[i]>9 || y-ay[i]<0 || y-ay[i]>9) continue;
      m[x-ax[i]][y-ay[i]]+=1;
    }
  }else if(size==2){
    for(int i=0;i<8;i++){
      if(x-ax[i]<0 || x-ax[i]>9 || y-ay[i]<0 || y-ay[i]>9) continue;
      m[x-ax[i]][y-ay[i]]+=1;
    }
  }else if(size==3){
    for(int i=0;i<12;i++){
      if(x-ax[i]<0 || x-ax[i]>9 || y-ay[i]<0 || y-ay[i]>9) continue;
      m[x-ax[i]][y-ay[i]]+=1;
    }
  }

}


int main(){
  int x,y,size,clear=0,color=0;

  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      m[i][j]=0;
    }
  }

  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    dfs(x,y,size);
  }

  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(m[i][j]==0){
	clear++;
      }else if(m[i][j]>color){
	color=m[i][j];
      }

    }
  }

  cout << clear << endl;
  cout << color << endl;

}

C++: #include<iostream>
#include<stdio.h>
using namespace std;

int paper[10][10]={0};

void small_ink(int x,int y){
  paper[y][x]++;
  if(x+1<10)paper[y][x+1]++;
  if(x-1>=0)paper[y][x-1]++;
  if(y+1<10)paper[y+1][x]++;
  if(y-1>=0)paper[y-1][x]++;
}
void midium_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
}
void big_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
  for(int i=-1;i<2;i=i+2){
      if(y+i*2>=0 && y+i*2<10)paper[y+i*2][x]++;
  }
  for(int i=-1;i<2;i=i+2){
      if(x+i*2>=0 && x+i*2<10)paper[y][x+i*2]++;
  }
}

int main(){
  int x,y,s;
  int white=0;
  int darkest=0;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    if(s==1)small_ink(x,y);
    else if(s==2)midium_ink(x,y);
    else if(s==3)big_ink(x,y);
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(paper[i][j]==0)white++;
      if(paper[i][j]>darkest)darkest=paper[i][j];
    }
  }
  cout<<white<<endl<<darkest<<endl;
}