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>

using namespace std;


main(){
  
  int map[10][10];
  int x,y,size;
  //initialize
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      map[i][j]=0;
    }
  }
  int white=0,Max=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    
    if(size==1){
      map[x][y-1]++;    
      map[x-1][y]++;map[x][y]++;map[x+1][y]++;
                    map[x][y+1]++;
      
    }
    if(size==2){
      map[x-1][y-1]++;map[x][y-1]++;map[x+1][y-1]++;
      map[x-1][y]++;  map[x][y]++;  map[x+1][y]++;
      map[x-1][y+1]++;map[x][y+1]++;map[x+1][y+1]++;
      
    }
    if(size==3){                      map[x][y-2]++;
                      map[x-1][y-1]++;map[x][y-1]++;map[x+1][y-1]++;
      map[x-2][y]++;  map[x-1][y]++;  map[x][y]++;  map[x+1][y]++; map[x+2][y]++;
                      map[x-1][y+1]++;map[x][y+1]++;map[x+1][y+1]++;
                                      map[x][y+2]++;
    }
    
    
  }

    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	if(map[i][j]==0)white++;
	if(map[i][j]>Max)Max=map[i][j];
      }
      
    }
  cout << white<<" "<< Max << endl;

  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int pap[11][11],dx[]={0,1,0,-1,1,-1,1,-1,2,0,-2,0},dy[]={1,0,-1,0,1,-1,-1,1,0,2,0,-2};
int main(){
int x,y,si,l,ma,cou;
fill(pap[0],pap[0]+11*11,0);
while(scanf("%d,%d,%d",&x,&y,&si)!=EOF){
    if(si==1)l=4;
    if(si==2)l=8;
    if(si==3)l=12;
    pap[x][y]+=1;
    for(int i=0;i<l;i++){
        pap[x+dx[i]][y+dy[i]]+=1;
    }
    /*for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        cout<<pap[i][j];
    }
    cout<<endl;
    }*/
}
for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        cout<<pap[i][j];
        ma=max(ma,pap[i][j]);
        if(pap[i][j]==0){
            cou++;
        }
    }
    cout<<endl;
}
cout<<cou+2<<endl<<ma<<endl;
return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main(){
	int x1[] = {0, -1, 0, 1, 0};
	int y1[] = {-1, 0, 0, 0, 1};
	int x2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	int y2[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1};
	int x3[] = {0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0};
	int y3[] = {-2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2};
	int l[] = {5, 9, 13};
	int *xs[] = {x1, x2, x3};
	int *ys[] = {y1, y2, y3};
	char c;
	int m[100][100];
	rep(i, 100) rep(j, 100) m[i][j] = 0;
	for (int x, y, s; cin >> x >> c >> y >> c >> s; ) {
		rep(i, l[s - 1]) {
			m[y + ys[s - 1][i] + 20][x + xs[s - 1][i] + 20]++;
		}
	}
	int minc = 0, cnt = 0;
	rep(i, 10) rep(j, 10) {
		minc = max(minc, m[i + 20][j + 20]);
		if (m[i + 20][j + 20] == 0) cnt++;
	}
	cout << cnt << endl << minc << endl;
	
	return 0;
}

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

int main(void){

	int map[10][10],ink,x,y,max=0,count=0;
	int dx[] = {0,0,-1,1,-1,-1,1,1,0,0,-2,2};
	int dy[] = {-1,1,0,0,-1,1,-1,1,-2,2,0,0};


	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,&ink)){
		map[y][x]++;
		for(int i=0;i<ink*4;i++){
			int mx=x+dx[i];
			int my=y+dy[i];
			if(mx>=0 && mx<10 && my>=0 && my<=10){
				map[my][mx]++;
			}
		}
	}
	
	
	for(int y=0;y<10;y++){
		for(int x=0;x<10;x++){
			if(map[y][x]==0){
				count++;
			}
			if(map[y][x]>max){
				max=map[y][x];
			}
		}
	}
	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 << " " << b << endl;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int dc[3] = {4,10,13};
int dx[3][13] = {
	{-1,0,-1,0,0},
	{-1,-1,-1,0,0,0,1,1,1},
	{-2,-1,-1,-1,0,0,0,0,0,1,1,1,2}
};
int dy[3][13] = {
	{0,0,0,-1,1},
	{-1,0,1,-1,0,1,-1,0,1},
	{0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}
};

int main(){
	int a,b,c;
	int d[10][10] = {0};
	while(~scanf("%d,%d,%d",&a,&b,&c)){
		rep(i,dc[c]){
			int tx = a + dx[c][i] , ty = b + dy[c][i];
			if(tx < 0 || ty < 0 || ty > 9 || tx > 9) continue;
			d[ty][tx]++;
		}
	}
	int white = 0;
	int ans = 0;
	rep(i,10)rep(j,10){
		if(d[i][j]==0)white++;
		else ans = max(d[i][j],ans);
	}
	cout << white << endl << ans << endl;
}