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>
using namespace std;

int main() {
	int x, y, size;
	int sol[10][10];
	char c;
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			sol[i][j] = 0;
		}
	}
	while(cin >> x >> c >> y >> c >> size) {
		if(size == 1) {
			sol[x][y]++;
			if(x - 1 >= 0) sol[x-1][y]++;
			if(y - 1 >= 0) sol[x][y-1]++;
			if(x + 1 < 10) sol[x+1][y]++;
			if(y + 1 < 10) sol[x][y+1]++;
		}
		else if(size == 2) {
			sol[x][y]++;
			if(x - 1 >= 0) sol[x-1][y]++;
			if(y - 1 >= 0) sol[x][y-1]++;
			if(x + 1 >= 0) sol[x+1][y]++;
			if(y + 1 >= 0) sol[x][y+1]++;
			if(x-1 >= 0 && y-1 >= 0) sol[x-1][y-1]++;
			if(x+1 < 10 && y-1 >= 0) sol[x+1][y-1]++;
			if(x-1 >= 0 && y+1 < 10) sol[x-1][y+1]++;
			if(x+1 < 10 && y+1 < 10) sol[x+1][y+1]++;
		}
		else {
			sol[x][y]++;
			if(x - 1 >= 0) sol[x-1][y]++;
			if(y - 1 >= 0) sol[x][y-1]++;
			if(x + 1 >= 0) sol[x+1][y]++;
			if(y + 1 >= 0) sol[x][y+1]++;
			if(x-1 >= 0 && y-1 >= 0) sol[x-1][y-1]++;
			if(x+1 < 10 && y-1 >= 0) sol[x+1][y-1]++;
			if(x-1 >= 0 && y+1 < 10) sol[x-1][y+1]++;
			if(x+1 < 10 && y+1 < 10) sol[x+1][y+1]++;
			if(y - 2 >= 0) sol[x][y-2]++;
			if(y + 2 < 10) sol[x][y+2]++;
			if(x - 2 >= 0) sol[x-2][y]++;
			if(x + 2 < 10) sol[x+2][y]++; 
		}
		/*
		for(int i = 0; i < 10; i++) {
			for(int j = 0; j < 10; j++) {
				cout << sol[i][j] << " " ;
			}
			cout << endl;
		}
		*/
	}
	int count = 0;
	int max = 0;
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			if(sol[i][j] == 0) count++;
			if(sol[i][j] > max) max = sol[i][j];
		}
	}
	cout << count << endl;
	cout << max << 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;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
    int mapi[10][10],x,y,high=0,none=0;
    int penx1[]={-1,0,0,1},peny1[]={0,1,-1,0};
    int penx2[]={-1,-1,-1,0,0,1,1,1},peny2[]={-1,0,1,-1,1,-1,0,1};
    int penx3[]={-2,-1,-1,-1,0,0,0,0,1,1,1,2},peny3[]={0,-1,0,1,2,1,-1,-2,1,0,-1,0};
    char str[7];
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            mapi[i][j]=0;
        }
    }
    while(cin>>str){
        for(int i=0;i<10;i++){
            if(str[0]-48==i)x=i;
            if(str[2]-48==i)y=i;
        }
        if(str[4]=='1'){
            for(int i=0;i<4;i++){
                if(x+penx1[i]<10&&x+penx1[i]>=0&&y+peny1[i]<10&&y+peny1>=0)mapi[y+peny1[i]][x+penx1[i]]++;

            }
        }
        else if(str[4]=='2'){
            for(int i=0;i<8;i++){
                if(x+penx2[i]<10&&x+penx2[i]>=0&&y+peny2[i]<10&&y+peny2>=0)mapi[y+peny2[i]][x+penx2[i]]++;

            }
        }
        else{
            for(int i=0;i<12;i++){
                if(x+penx3[i]<10&&x+penx3[i]>=0&&y+peny3[i]<10&&y+peny3>=0)mapi[y+peny3[i]][x+penx3[i]]++;

            }
        }
        mapi[y][x]++;
    /*    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(high<mapi[i][j])high=mapi[i][j];
            if(mapi[i][j]==0)none++;
        }
    }
    cout<<none<<endl<<high<<endl;
    none=0;high=0;
    /*for(int i=0;i<10;i++){
            for(int j=0;j<10;j++){
                    cout<<mapi[i][j];
            }
            cout<<endl;
    }*/
    }

    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(high<mapi[i][j])high=mapi[i][j];
            if(mapi[i][j]==0)none++;
        }
    }
    cout<<none<<endl<<high<<endl;
}