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\n", count, max)
}

C++: #include<cstdio>

using namespace std;

int main(void){
	int pa[14][14];
	int i,j;
	int x,y,size,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,&size)!=EOF){
		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;
		}
	}
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(pa[i][j]==0)
				not++;
			if(pa[i][j]>da)
				da=pa[i][j];
		}
	}
	printf("%d\n%d\n",not,da);

	return 0;
}

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

int map[14][14];

void inkM( int x, int y ){
	for( int i=-1; i<=1; i++ ){
		for( int j=-1; j<=1; j++ ){
			map[x+i][y+j]++;
		}
	}
}

void inkL( int x, int y ){
	inkM( x, y );
	map[x-2][y]++;
	map[x+2][y]++;
	map[x][y-2]++;
	map[x][y+2]++;
}

void inkS( int x, int y ){
	map[x][y]++;
	map[x-1][y]++;
	map[x+1][y]++;
	map[x][y+1]++;
	map[x][y-1]++;
}

int main(){
	int x,y,s;
	string str;
	while(1){
		getline( cin, str );
		if( str.length()==0 ) 	break;
		sscanf( str.c_str(), "%d,%d,%d", &x, &y, &s );
		x+=2; y+=2;
		if( s==1 )		inkS( x, y );
		else if( s==2 )	inkM( x, y );
		else if( s==3 )	inkL( x, y );
	}
	int max=0, cnt=0;
	for( int y=2; y<12; y++ ){
		for( int x=2; x<12; x++ ){
			if( map[x][y] == 0 )	cnt++;
			if( max < map[x][y] )	max = map[x][y];
		}
	}
	cout << cnt << endl;
	cout << max << endl;
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
  int dec[10][10];
  int x,y,size,num,max;
  char a;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
       dec[i][j]=0;
    }
  }
                
  while(cin >> y >> a>> x>> a>> size){
    if(size == 1){
      if(x+1 < 10 && x+1 >= 0 && y>=0 && y<10) dec[x+1][y] += 1;
      if(x-1 >=0 && x-1 < 10 && y>=0 && y<10) dec[x-1][y] += 1;
      if(x >= 0 && x < 10 && y+1<10 && y+1 >= 0) dec[x][y+1] += 1;
	 if(x >=0 && x< 10 && y-1 <10 && y-1 >=0) dec[x][y-1] += 1;
	    dec[x][y] += 1;
	    } else if(size == 2){
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  if(x+i >=0&& x+i<10 && y+j>=0&& y+j<10) dec[x+i][y+j] +=1;
	}
      }
    }else if(size==3){
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  if(x+i >=0&& x+i<10 && y+j>=0&& y+j<10)  dec[x+i][y+j] +=1;
	}
      }
      if(x+2<10 && x+2 >=0 && y>=0 && y<10  )dec[x+2][y] +=1;
      if(x-2>=0 &&x-2 <10 && y>=0 && y<10  )dec[x-2][y] +=1;
      if(x<10 && x >=0 && y+2>=0 && y+2<10  )dec[x][y+2] +=1;
      if(x>=0 && x<10 && y-2>=0 && y-2<10  )dec[x][y-2] +=1;
    }
  }
  max = dec[0][0];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){ 
      if(dec[i][j]==0)
	num +=1; 
      if(max < dec[i][j])
	max=dec[i][j];
    }
  }
  cout << num << endl << max<<endl;
}

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

int board[10][10];

void fill(int x, int y){
	if(0<=x && x<10 && 0<=y && y<10){
		board[y][x]++;
	}
}

int main(){
	int x, y, size;
	while(scanf("%d,%d,%d", &x, &y, &size)+1){
		if(size >= 1){ // small
			fill(x, y);
			fill(x+1, y);
			fill(x-1, y);
			fill(x, y+1);
			fill(x, y-1);
		}
		if (size >= 2) { // medium
			fill(x+1, y+1);
			fill(x+1, y-1);
			fill(x-1, y+1);
			fill(x-1, y+1);
		}
		if(size >= 3){ // large
			fill(x+2, y);
			fill(x-2, y);
			fill(x, y+2);
			fill(x, y-2);
		}
	}
	int num_zero = 0;
	int deepest = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if(board[j][i] == 0){
				num_zero++;
			}
			if(deepest < board[j][i]){
				deepest = board[j][i];
			}
		}
	}
	cout << num_zero << endl;
	cout << deepest << endl;

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(void)
{
	int paper[30][30]={};
	int x,y,size;
	char c;
	while(cin>>x>>c>>y>>c>>size)
	{
		x+=10;
		y+=10;
		if(size>=1)
		{
			paper[x][y]++;
			paper[x+1][y]++;
			paper[x-1][y]++;
			paper[x][y+1]++;
			paper[x][y-1]++;
		}
		if(size>=2)
		{
			paper[x-1][y-1]++;
			paper[x-1][y+1]++;
			paper[x+1][y-1]++;
			paper[x+1][y+1]++;
		}
		if(size>=3)
		{
			paper[x+2][y]++;
			paper[x-2][y]++;
			paper[x][y+2]++;
			paper[x][y-2]++;
		}
	}
	int white,max;
	white=max=0;
	for(int i=10;i<20;i++){
		for(int j=10;j<20;j++){
			if(paper[i][j]==0)white++;
			else if(paper[i][j]>max)max=paper[i][j];
		}
	}
	cout<<white<<endl<<max<<endl;
}

C++: #include <bits/stdc++.h>
using namespace std;

/* {{{ */
#define PI(N) ((M_PI * (N)) / 180) //?§???????????????¢??????????????????
#define CL(N) (cout << (N) << endl)
#define DCT(N) (cout << "debug " << (N) << endl)
#define REP(i, N) for (int i = 0; i < (N); i++)
/* }}} */

int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
int seet[10][10];

void ink(int y, int x)
{
    if (0 <= y && y < 10 && 0 <= x && x < 10) seet[y][x]++;
}

int main()
{
    int x, y, s, zero = 0, m = 0;

    while (scanf("%d,%d,%d", &x, &y, &s) != EOF){

        if (1 <= s){
            ink(y, x);
            REP(i, 4){
                ink(y + dy[i], x + dx[i]);
            }
        }
        if (2 <= s){
           ink(y - 1, x - 1);
           ink(y - 1, x + 1);
           ink(y + 1, x - 1);
           ink(y + 1, x + 1);
        }
        if (3 == s){
            REP(i, 4){
                ink(y + (dy[i] * 2), x + (dx[i] * 2));
            }
        }
    }

    REP(i, 10){
        REP(j, 10){
            if (seet[i][j] == 0){
                zero++;
            }
            m = max(m, seet[i][j]);
        }
    }

    CL(zero);
    CL(m);

    return (0);
}