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 <stdio.h>
#include <stdlib.h>
int main(void)
{
    int i,j,x,y,size,paper[10][10]={0},ans1=0,ans2=0;
    while(scanf("%d,%d,%d",&x,&y,&size)!=EOF)
    {
        if(x>=0&&x<10&&y>=0&&y<10)
        {
            paper[x][y]++;
            if(x!=0)
                paper[x-1][y]++;
            if(x!=9)
                paper[x+1][y]++;
            if(y!=0)
                paper[x][y-1]++;
            if(y!=9)
                paper[x][y+1]++;
            if(size>1)
            {
            if(x!=0&&y!=0)
                paper[x-1][y-1]++;
            if(x!=0&&y!=9)
                paper[x-1][y+1]++;
            if(x!=9&&y!=0)
                paper[x+1][y-1]++;
            if(x!=9&&y!=9)
                paper[x+1][y+1]++;
            }
            if(size>2)
            {
            if(x!=0&&x!=1)
                paper[x-2][y]++;
            if(x!=9&&x!=8)
                paper[x+2][y]++;
            if(y!=0&&y!=1)
                paper[x][y-2]++;
            if(y!=9&&y!=8)
                paper[x][y+2]++;
            }
        }
    }
    for(i=0;i<10;i++)
        for(j=0;j<10;j++)
        {
            if(paper[j][i]==0)
                ans1++;
            if(paper[j][i]>ans2)
                ans2=paper[j][i];
        }
    /*
    for(i=0;i<10;i++){
        for(j=0;j<10;j++)
            printf("%d ",paper[j][i]);
        printf("\n");
    }
    */

    printf("%d\n%d\n",ans1,ans2);
    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int imap[11][11];
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
int maxv, sum;

void color(const int &x, const int &y, const int &t) {
    int nx = x, ny = y;
    if (t == 1) {
        imap[x][y]++;
        for (int i = 0; i < 4; i++) {
            nx=x+dx[i], ny=y+dy[i];
            if (nx >= 0 && nx < 10 && ny >= 0 && ny < 10) imap[nx][ny]++;
        }
        return;
    }
    if (t == 2 || t == 3) {
        imap[x][y]++;
        for (int i = -1; i <= 1; i++) {
            for (int j = -1; j <= 1; j++) {
                if (i == 0 && j == 0) continue;
                nx=x+i, ny=y+j;
                if (nx >= 0 && nx < 10 && ny >= 0 && ny < 10) imap[nx][ny]++;
            }
        }
        if (t == 2) return;
    }
    if (t == 3) {
        for (int i = 0; i < 4; i++) {
            nx=x+dx[i]*2, ny=y+dy[i]*2;
            if (nx >= 0 && nx < 10 && ny >= 0 && ny < 10) imap[nx][ny]++;
        }
        return;
    }
}

void calc() {
    maxv = sum = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (imap[i][j] == 0) sum++;
            else maxv = max(imap[i][j], maxv);
        }
    }
}

int main(){
    memset(imap, 0, sizeof (imap));
    int x, y, t;
    while(scanf("%d,%d,%d", &y, &x, &t) != EOF) {
        color(x, y, t);
    }
    calc();

    /*for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) printf("%d ", imap[i][j]);
        printf("\n");
    }*/
    printf("%d\n%d\n", sum, maxv);
    return 0;
}

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

int main(){
  int x,y,size,cnt = 0,ma = -1;
  int mas[10][10] = {0};
  int dx1[4] = {0,1,0,-1},dy1[4] = {1,0,-1,0};
  int dx2[8] = {0,1,0,-1,1,1,-1,-1},dy2[8] = {1,0,-1,0,1,-1,1,-1};
  int dx3[12]={1,0,-1,0,1,1,-1,-1,0,0,2,-2},dy3[12]={0,1,0,-1,-1,1,1,-1,2,-2,0,0};
  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    if(size == 1){
      mas[y][x] += 1;
      for(int i=0;i<4;i++){
	int nx = x+dx1[i];
	int ny = y+dy1[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 2){
      mas[y][x] += 1;
      for(int i=0;i<8;i++){
	int nx = x+dx2[i];
	int ny = y+dy2[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
    if(size == 3){
      mas[y][x] += 1;
      for(int i=0;i<12;i++){
	int nx = x+dx3[i];
	int ny = y+dy3[i];
	if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10) mas[ny][nx] += 1;
      }
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j] == 0) cnt++;
      ma = max(ma,mas[i][j]);
    }
  }
  cout << cnt << endl << ma << endl;
}

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

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

int main() {

  int x,y,size;
  char c;
  int map[14][14] = {0};

  int cnt = 0;
  int map_max = 0;

  while( cin >> x >> c >> y >> c >> size ) {

    for ( int i = 0; i < ds[size-1]; i++ ) {

      map[ x+2 + dx[i] ][ y+2 + dy[i] ]++;

    }

  }

  for ( int i = 2; i < 12; i++ ) {
    for ( int j = 2; j < 12; j++ ) {
      
      if ( map[i][j] == 0 ) cnt++;
      map_max = max( map_max, map[i][j] );
      
    }
  }

  cout << cnt << endl << map_max << endl;

  return 0;

}

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)){
		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;
}