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<stdio.h>
using namespace std;
int main(){
  int dec[10][10][1];
  int x,y,size,num,max;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
       dec[i][j][0]=0;
    }
  }
                
  while(scanf("%d,%d,%d",&y,&x,&size)!=EOF){
  if(size == 1){
    if(x+1<10)dec[x+1][y][0] += 1;
    if(x-1>=0)  dec[x-1][y][0] += 1;
    if(y+1<10)  dec[x][y+1][0] += 1;
    if(x-1>=0)  dec[x][y-1][0] += 1;
      dec[x][y][0] += 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][0] +=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][0] +=1;
	}
      }
      if(x+2<10)dec[x+2][y][0] +=1;
      if(x-2>=0)dec[x-2][y][0] +=1;
      if(y+2<10)dec[x][y+2][0] +=1;
      if(y-2>=0)dec[x][y-2][0] +=1;
    }
  }
  max = dec[0][0][0];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){ 
      if(dec[i][j][0]==0){
	num +=1;
      }      
      if(max < dec[i][j][0])
	max=dec[i][j][0];
    }
  }
  cout << num << endl << max<<endl;
}

C++: #include <stdio.h>
#define B 13
#define M 9
#define S 5
void drop(int x,int y,int xy[][10]){
	if(x>-1&&x<10&&y>-1&&y<10) xy[y][x]++;
}


int main(){
	int x,y,size,max,num;
	int i,j;
	int xy[10][10];
	max=num=0;
	for(i=0;i<10;i++){
		for(j=0;j<10;j++) xy[i][j]=0;
	}
	int b[B][2] = {{0,-2},{-1,-1},{0,-1},{1,-1},{-2,0},{-1,0},{1,0},{2,0},{-1,1},{0,1},{1,1},{0,2},{0,0}};
	int m[M][2] = {{-1,-1},{0,-1},{1,-1},{-1,0},{1,0},{-1,1},{0,1},{1,1},{0,0}};
	int s[S][2] = {{0,-1},{-1,0},{0,1},{1,0},{0,0}};

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
		case 1:
			for(int i=0;i<S;i++) drop(x+s[i][0],y+s[i][1],xy);
			break;
		case 2:
			for(int i=0;i<M;i++) drop(x+m[i][0],y+m[i][1],xy);
			break;
		case 3:
			for(int i=0;i<B;i++) drop(x+b[i][0],y+b[i][1],xy);
			break;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(!xy[i][j]) num++;
			else if(xy[i][j]>max) max = xy[i][j];
		}
	}
	printf("%d\n%d\n",num,max);
	return 0;
}

C++: #include<stdio.h>

static int map[11][11];

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

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

void big(int x,int y){
	medium(x,y);
	map[y][x+2]+=1;
	map[y][x-2]+=1;
	map[y+2][x]+=1;
	map[y-2][x]+=1;
}


int main(){
	int x[1000],y[1000],select[1000];
	int i,j;
	int space=0,max=0;
	
	for(i=0;i<11;i++){
		for(j=0;j<11;j++)map[i][j]=0;
	}
	
	i=0;
	while(scanf("%d,%d,%d",&x[i],&y[i],&select[i])!=EOF){
		switch(select[i]){
		case 1:
			small(x[i]+1,y[i]+1);
			break;
		case 2:
			medium(x[i]+1,y[i]+1);
			break;
		case 3:
			big(x[i]+1,y[i]+1);
			break;
		}
		i++;
	}
	
	for(i=1;i<11;i++){
		for(j=1;j<11;j++){
			if(map[i][j]==0)space++;
			if(max<map[i][j])max=map[i][j];
		}
	}
	
	printf("%d\n%d\n",space,max);
	
	return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int x,y,size;
  int paper[15][15]={};
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){

    x+=2;
    y+=2;

    paper[y][x]++;
    paper[y+1][x]++;
    paper[y-1][x]++;
    paper[y][x-1]++;
    paper[y][x+1]++;

    if(size>1){

      paper[y-1][x-1]++;
      paper[y-1][x+1]++;
      paper[y+1][x-1]++;
      paper[y+1][x+1]++;

      if(size==2){

	paper[y][x-2]++;
	paper[y][x+2]++;
	paper[y-2][x]++;
	paper[y+2][x]++;

      }
    }
  }
  int white=0;
  int m=0;
  int i,j;

  for(i=2;i<12;i++)
    for(j=2;j<12;j++){
    if(paper[i][j]==0)white++;
    m=max(m,paper[i][j]);
  }
  cout<<white<<endl;
  cout<<m<<endl;
}

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

using namespace std;

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

int main(){

    rep(i,10)rep(j,10){
      p[i][j] = 0;
    }
    int x,y,size;
  while(~scanf("%d,%d,%d",&x,&y,&size)){

    if(size == 1){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
    }else  if(size == 2){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
    }else  if(size == 3){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
      ink(x+2,y);
      ink(x-2,y);
      ink(x,y+2);
      ink(x,y-2);
    }
     cnt =Max = 0;
    rep(i,10)rep(j,10){
      if(p[i][j]==0)cnt++;
      Max = max(Max,p[i][j]);
    }

}
    cout << cnt <<"\n" << Max << endl;

  return 0;
}