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<iostream>
#include<cstdio>
using namespace std;
#define loop(i,a,b) for(int i = a ; i < b ; i++)
#define rep(i,a) for(int i = 0 ; i < a ; i++) 

int maze[10][10];
int smallx[5] = { 1,-1, 0, 0, 0};
int smally[5] = { 0, 0, 0, 1,-1};
int midx[4] = { 1, 1,-1,-1};
int midy[4] = { 1,-1, 1,-1};
int largex[4] = { 2,-2, 0, 0};
int largey[4] = { 0, 0, 2,-2};

bool inmaze(int x,int y){
  return (0<=x && x<10) && (0<=y && y<10);
	     
}
void Fsmall(int x,int y){
  rep(i,5)
    if(inmaze(x+smallx[i],y+smally[i]))
       maze[x+smallx[i]][y+smally[i]]++;
       
}
void Fmid(int x,int y){
  rep(i,4)
    if(inmaze(x+midx[i],y+midy[i]))
       maze[x+midx[i]][y+midy[i]]++;
}
void Flarge(int x,int y){
  rep(i,4)
    if(inmaze(x+largex[i],y+largey[i]))
    maze[x+largex[i]][y+largey[i]]++;
}
int main(void){
  int x,y,size;
  rep(i,10)rep(j,10)maze[i][j] = 0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF)
    switch(size){
    case 3:
      Flarge(x,y);
    case 2:
      Fmid(x,y);
    case 1:
      Fsmall(x,y);
    }
    
  int no = 0,ma = -1;
  rep(i,10)rep(j,10){
    if(maze[i][j] == 0)no ++;
    ma = max(ma,maze[i][j]);
  }
  cout<<no<<endl<<ma<<endl;
  
}

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

using namespace std;

void small(int kami[10][10], int x, int y){
	kami[y][x]++;
	if(x-1>=0){
		kami[y][x-1]++;
	}
	if(x+1<=9){
		kami[y][x+1]++;
	}
	if(y-1>=0){
		kami[y-1][x]++;
	}
	if(y+1<=9){
		kami[y+1][x]++;
	}
}

void middle(int kami[10][10], int x, int y){
	if(x-1>=0 && y-1>=0){
		kami[y-1][x-1]++;
	}
	if(x-1>=0 && y+1<=9){
		kami[y+1][x-1]++;
	}
	if(x+1<=9 && y-1>=0){
		kami[y-1][x+1]++;
	}
	if(x+1<=9 && y+1<=9){
		kami[y+1][x+1]++;
	}
}

void large(int kami[10][10], int x, int y){
	if(x-2>=0){
		kami[y][x-2]++;
	}
	if(x+2<=9){
		kami[y][x+2]++;
	}
	if(y-2>=0){
		kami[y-2][x]++;
	}
	if(y+2<=9){
		kami[y+2][x]++;
	}
}

int main(){
	int kami[10][10]={0};
	char c;
	int x, y, s;

	while( cin>> x >> c >> y >> c >> s ){
		switch( s ){
		case 3:
			large(kami, x, y);
		case 2:
			middle(kami, x, y);
		case 1:
			small(kami, x, y);
		}
	}

	int max = 0;
	int count = 0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(kami[i][j]==0){
				count++;
			}else if(max<kami[i][j]){
				max=kami[i][j];
			}
		}
	}

	cout << count << endl;
	cout << max << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    const int s = 10;
	int paper[10+s+s][10+s+s] = {};
	int x, y, siz;
	char c;
	while (cin >> x >> c >> y >> c >> siz) {
        x += s; y += s;
		switch (siz) {
			case 3:
				paper[y-2][x] ++;
				paper[y][x-2] ++;
				paper[y][x+2] ++;
				paper[y+2][x] ++;
			case 2:
				paper[y-1][x-1] ++;
				paper[y-1][x+1] ++;
				paper[y+1][x-1] ++;
				paper[y+1][x+1] ++;
			case 1:
				paper[y-1][x] ++;
				paper[y][x-1] ++;
				paper[y][x] ++;
				paper[y][x+1] ++;
				paper[y+1][x] ++;
		}
	}
	int empty = 0, mx = 0;
	for (int i=s; i<s+10; ++i) {
		for (int j=s; j<s+10; ++j) {
			empty += !paper[i][j];
			mx = max(mx, paper[i][j]);
		}
	}
	cout << empty << endl;
	cout << mx << endl;

	return 0;
}

C++: #include <iostream>
#include <list>
#include <string>
#include <sstream>
#include <typeinfo>
#include <stdlib.h>
#include <cmath>

using namespace std;

void drip1(int x, int y,int square[10][10]){
    int i;
    for(i=x-1;i<=x+1;i++){
        if(i>=0)square[i][y] += 1;
    }
    for(i=y-1;i<=y+1;i+=2){
        if(i>=0)square[x][i] += 1;
    }
    
}

void drip2(int x, int y,int square[10][10]){
    for(int i=x-1;i<=x+1;i++){
        for(int j=y-1;j<=y+1;j++){
            if(i>=0 && j>=0){
                square[i][j] += 1;
                cout <<"2 " << i << "," << j << endl;
            }
        }
    }

}

void drip3(int x, int y,int square[10][10]){
    
    for(int i=x-2;i<=x+2;i++){
        for(int j=y-2+abs(x-i); j<=y+2-abs(x-i); j++){
            if(i>=0 && j>=0){
                square[i][j] += 1;
                //cout << "3 " << i << "," << j << endl;
            }
        }
    }
}



int main (int argc, char const* argv[]){
    int square[10][10]={};
    int size,x,y, count=0, max=0;
    string str, tmp;
    list<int> xysize;
    
    while(getline(cin,str)){
        stringstream ss(str);
        xysize.clear();
        
        while(getline(ss,tmp,',')){
            xysize.push_back(atoi(tmp.c_str()));
        }
        list<int>::iterator it = xysize.begin();
        x = *(it++);
        y = *(it++);
        size = *(it);
        
        cout << x<< " "<<y <<" "<<size <<endl;
        
        if(size==1){
            drip1(x,y,square);
        }else if(size==2){
            drip2(x,y,square);
        }else if(size==3){
            drip3(x,y,square);
        }
    }
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(square[i][j]==0)count++;
            if(max < square[i][j]) max = square[i][j];
        }
    }

    
    cout << count << endl << max << endl;
    
    return 0;
}