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<cstdio>

using namespace std;

int main(){
 int pa[14][14];
 int i,j;
 int x,y,size;
 int da=0,not=0;
 
 for(i=0;i<14;i++){
  for(j=0;j<14;j++)
   pa[i][j]=0;
 }

 while(scanf("%d,%d,%d",&x,&y,&s)!=-1){
  x=x+2;
  y=y+2;
  switch(size){
   case 1:
    pa[y][x]++;
    pa[y-1][x]++;
    pa[y+1][x]++;
    pa[y][x-1]++;
    pa[y][x+1]++;
    break;
   case 2:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++)
      pa[y+i][x+j]++;
    }
    break;
   case 3:
    for(i=-1;i<=1;i++){
     for(j=-1;j<=1;j++)
      pa[y+i][x+j]++;
    }
    pa[y-2][x]++;
    pa[y+2][x]++;
    pa[y][x-2]++;
    pa[y][x+2]++;
    break;
   default: break;
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]==0)
    not++;
  }
 }
 for(i=2;i<12;i++){
  for(j=2;j<12;j++){
   if(pa[i][j]>da)
    da=pa[i][j];
  }
 }
 printf("%d\n%d\n",not,da);
 return 0;
}

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

int paper[10][10];

void drop(int x, int y) {
    if (x >= 0 && x < 10 && y >= 0 && y < 10) {
        paper[x][y]++;
    }
}

int main() {
    int x1, y1, size;
    char temp;
    int zeroDensity = 0, maxDensity = 0;

    for (int i = 0; i != 10; ++i) {
        for (int j = 0; j != 10; ++j) {
            paper[i][j] = 0;
        }
    }

    while (cin >> x1 >> temp >> y1 >> temp >> size) {        
        switch (size) {
            case 1:
                drop(x1, y1);    // center
                drop(x1, y1-1);  // top
                drop(x1+1,y1);  // right
                drop(x1,y1+1);  // bottom
                drop(x1-1,y1);  // left
                break;
            case 2:
                for (int i = -1; i != 2; ++i) { drop(x1 + i, y1-1); }
                for (int i = -1; i != 2; ++i) { drop(x1 + i, y1); }
                for (int i = -1; i != 2; ++i) { drop(x1 + i, y1+1); }
                break;
            case 3:
                for (int i = -1; i != 2; ++i) { drop(x1 + i, y1-1); }
                for (int i = -1; i != 2; ++i) { drop(x1 + i, y1); }
                for (int i = -1; i != 2; ++i) { drop(x1 + i, y1+1); }
                drop(x1, y1-2);  // top
                drop(x1+2, y1);  // right
                drop(x1, y1+2);  // bottom
                drop(x1-2, y1);  // left
                break;
        }
    }

    for (int i = 0; i != 10; ++i) {
        for (int j = 0; j != 10; ++j) {
            if (paper[i][j] == 0) {
                ++zeroDensity;
            }
            if (paper[i][j] > maxDensity) {
                maxDensity = paper[i][j];
            }
        }
    }
    cout << zeroDensity << endl;
    cout << maxDensity << endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;

int field[10][10];
int x,y,size;


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

    char tmp;
    while(cin>>x>>tmp>>y>>tmp>>size) {
        if(size==1) {
            for(int dx=-1; dx<=1; dx++) {
                int nx = x + dx;
                if(0 <= nx && nx < 10)
                    field[y][nx]++;
            }
            for(int dy=-1; dy<=1; dy++) {
                int ny = y + dy;
                if(0 <= ny && ny < 10)
                    field[ny][x]++;
            }
            field[y][x]--;
        } else if(size == 2) {
            for(int dy=-1; dy<=1; dy++) {
                for(int dx=-1; dx<=1; dx++) {
                    int nx = x + dx, ny = y+dy;
                    if(0 <= nx && nx < 10)
                        if(0 <= ny && ny < 10)
                            field[ny][nx]++;
                }
            }
        } else if(size == 3) {
            for(int dy=-1; dy<=1; dy++) {
                for(int dx=-1; dx<=1; dx++) {
                    int nx = x + dx, ny = y+dy;
                    if(0 <= nx && nx < 10)
                        if(0 <= ny && ny < 10)
                            field[ny][nx]++;
                }
            }
            //field[y][x]--;
            for(int dx=-2; dx<=2; dx+=2) {
                int nx = x + dx;
                if(0 <= nx && nx < 10)
                    field[y][nx]++;
            }
            for(int dy=-2; dy<=2; dy+=2) {
                int ny = y + dy;
                if(0 <= ny && ny < 10)
                    field[ny][x]++;
            }
            field[y][x]--;

        }
    }

    int cnt=0, max=0;
    for(int i=0; i<10; i++) {
        for(int j=0; j<10; j++) {
            if(field[i][j] == 0) cnt++;
            if(max < field[i][j]) max = field[i][j];
        }
    }

    printf("%d\n%d\n", cnt, max);

    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int a[15][15];
int dx[] = { 0,0,1,-1 }, dy[] = { 1,-1,0,0 };
int nx[] = { 0,0,2,-2 }, ny[] = { 2,-2,0,0 };
int main() {
	string S;
	while (cin >> S) {
		int x, y, s;
		sscanf(S.data(), "%d,%d,%d", &x, &y, &s);
		if (s == 1) {
			a[x][y]++;
			rep(i, 4) {
				if (x + dx[i] >= 0 && y + dy[i] >= 0)
					a[x + dx[i]][y + dy[i]]++;
			}
		}
		else for (int i = -1; i <= 1; i++)for (int j = -1; j <= 1; j++) {
			if (x + i >= 0 && x + j >= 0)a[x + i][y + j]++;
		}
		if (s == 3)rep(i, 4) {
			if (x + nx[i] >= 0 && y + ny[i] >= 0)
				a[x + nx[i]][y + ny[i]]++;
		}
	}
	int cnt = 0, Max = 0;
	rep(i, 10) {
		rep(j, 10) {
			if (!a[i][j])cnt++;
			Max = max(Max, a[i][j]);
		}
	}
	cout << cnt << endl << Max << endl;
	return 0;
}