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 <vector>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  // 5, 9, 13
  int dx1[] = {-1,0,0,0,1};
  int dy1[] = {0,-1,0,1,0};
  int dx2[] = {-1,-1,-1,0,0,0,1,1,1};
  int dy2[] = {-1,0,1,-1,0,1,-1,0,1};
  int dx3[] = {-2,-1,-1,-1,0,0,0,0,0,1,1,1,0};
  int dy3[] = {0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
  vector<int> dx[3];
  vector<int> dy[3];
  dx[0].assign(dx1,dx1+5);
  dx[1].assign(dx2,dx2+9);
  dx[2].assign(dx3,dx3+13);
  dy[0].assign(dy1,dy1+5);
  dy[1].assign(dy2,dy2+9);
  dy[2].assign(dy3,dy3+13);
  
  int x, y, s;
  int ans1 = 100;
  int ans2 = 0;
  int ma[10][10];
  memset(ma,0,sizeof(ma));
  while(scanf("%d,%d,%d", &x,&y,&s)==3) {
    s--;
    REP(i,dx[s].size()) {
      int xx = x + dx[s][i];
      int yy = y + dy[s][i];
      if (xx<0||10<=xx||yy<0||10<=yy) continue;
      if (ma[xx][yy]==0) ans1--;
      ma[xx][yy]++;
      ans2 = max(ma[xx][yy], ans2);
    }
  }
  cout << ans1 << endl;
  cout << ans2 << endl;
}

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

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

  while (~scanf("%d,%d,%d", &x, &y, &size)){
    if ((0 <= x && x <= 9) && (0 <= y && y <= 9)) map[y][x]++;
    switch (size){
      case 1:
        if (0 <= y - 1 && y - 1 <= 9) map[y-1][x]++;
        if (0 <= y + 1 && y + 1 <= 9) map[y+1][x]++;
        if (0 <= x - 1 && x - 1 <= 9) map[y][x-1]++;
        if (0 <= x + 1 && x + 1 <= 9) map[y][x+1]++;
        break;
      case 2:
        if (0 <= y - 1 && y - 1 <= 9) map[y-1][x]++;
        if (0 <= y + 1 && y + 1 <= 9) map[y+1][x]++;
        if (0 <= x - 1 && x - 1 <= 9) map[y][x-1]++;
        if (0 <= x + 1 && x + 1 <= 9) map[y][x+1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x-1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x-1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x+1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x+1]++;
        break;
      case 3:
        if (0 <= y - 1 && y - 1 <= 9) map[y-1][x]++;
        if (0 <= y + 1 && y + 1 <= 9) map[y+1][x]++;
        if (0 <= x - 1 && x - 1 <= 9) map[y][x-1]++;
        if (0 <= x + 1 && x + 1 <= 9) map[y][x+1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x-1]++;
        if ((0 <= x - 1 && x - 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x-1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y - 1 && y - 1 <= 9)) map[y-1][x+1]++;
        if ((0 <= x + 1 && x + 1 <= 9) && (0 <= y + 1 && y + 1 <= 9)) map[y+1][x+1]++; 
        if (0 <= x + 2 && x + 2 <= 9) map[y][x+2]++;
        if (0 <= x - 2 && x - 2 <= 9) map[y][x-2]++;
        if (0 <= y + 2 && y + 2 <= 9) map[y+2][x]++;
        if (0 <= y - 2 && y - 2 <= 9) map[y-2][x]++;
        break;
    }
  }
  int w = 0, max = 0;
  for (int i = 0; i < 10; i++){
    for (int j = 0; j < 10; j++){
      if (!map[i][j]) w++;
      if (max < map[i][j]) max = map[i][j];
    }
  }
  printf("%d\n%d\n", w, max);

  return (0);
}

C++: #include <iostream>
#include <stdlib.h>
//using namespace System;
using namespace std;
int main()
{
	int map[10][10]={};
	int x,y,s,nx,ny;
	int dx1[]={-1,0,0,0,1};
	int dy1[]={0,-1,0,1,0};
	int dx2[]={-1,-1,-1,0,0,0,1,1,1};
	int dy2[]={-1,0,1,-1,0,1,-1,0,1};
	int dx3[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2};
	int dy3[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
	char c;
	while(cin>>x>>c>>y>>c>>s){
		if(cin.eof())break;
		if(s==1){
			for(int i=0;i<5;i++){
				nx=x+dx1[i];
				ny=y+dy1[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}else if(s==2){
			for(int i=0;i<9;i++){
				nx=x+dx2[i];
				ny=y+dy2[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}else{
			for(int i=0;i<13;i++){
				nx=x+dx3[i];
				ny=y+dy3[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}
	}
	int res=0,m=0;
	for(int i=0;i<10;i++)for(int j=0;j<10;j++)if(!map[i][j])res++;else if(map[i][j]>m)m=map[i][j];
	printf("%d\n%d\n",res,m);
	//system("pause");
    return 0;
}

C++: #include<stdio.h>
int main()
{
	int x,y,s,p[10][10]={0},nou=0,nul=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		p[x][y]++;
		if(x!=0){
			p[x-1][y]++;
		}
		if(x<9){
			p[x+1][y]++;
		}
		if(y!=0){
			p[x][y-1]++;
		}
		if(y<9){
			p[x][y+1]++;
		}
		if(s!=1){
			if(x!=0){
				if(y!=0){
					p[x-1][y-1]++;
				}
				if(y<9){
					p[x-1][y+1]++;
					}

			}
			if(x<9){
				if(y!=0){
					p[x+1][y-1]++;
				}
				if(y<9){
					p[x+1][y+1]++;
				}
			}
		}
		if(s==3){
			if(x>2){
				p[x-2][y]++;
			}
			if(y>2){
				p[x][y-2]++;
			}


			if(x<8){
				p[x+2][y]++;
			}
			if(y<8){
				p[x][y+2]++;
			}
		}

	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(p[i][j]==0){
				nul++;
			}
			if(p[i][j]>nou){
				nou=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",nul-1,nou);
	return 0;
}