Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

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;
}

C++: #include <cstdio>

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size,mx,my;
	int dx[] = {0,-1,1,0,-1,1,-1,1,0,-2,2,0};
	int dy[] = {-1,0,0,1,-1,-1,1,1,-2,0,0,2};
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		for (int i=0; i<size*4; i++) {
			mx=x+dx[i];
			my=x+dy[i];
			if (mx>=0&&mx<10&&my>=0&&my<10) p[mx][my]++;
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) c++;
			else if (p[i][j]>m) m=p[i][j];
		}
	}
	scanf("%d\n%d\n",c,m);
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	string buf;
	vector< vector<int> > paper(14,vector<int>(14,0));
	while((cin>>buf)!=NULL){
		vector<int> a(3);
		for(int i=0;i<3;++i){
			a[i]=buf[2*i]-'0';
		}
		if(a[2]==1){
			const int dx[]={0,0,0,1,-1};
			const int dy[]={0,1,-1,0,0};
			for(int i=0;i<5;++i){
				++paper[a[0]+2+dx[i]][a[1]+2+dy[i]];
			}
		}else if(a[2]==2){
			const int dx[]={0,0,0,1,1,1,-1,-1,-1};
			const int dy[]={0,1,-1,0,1,-1,0,1,-1};
			for(int i=0;i<9;++i){
				++paper[a[0]+2+dx[i]][a[1]+2+dy[i]];
			}
		}else if(a[2]==3){
			const int dx[]={0,0,0,1,1,1,-1,-1,-1,0,2,0,-2};
			const int dy[]={0,1,-1,0,1,-1,0,1,-1,2,0,-2,0};
			for(int i=0;i<13;++i){
				++paper[a[0]+2+dx[i]][a[1]+2+dy[i]];
			}
		}
	}
	int cnt=0;
	int max=0;
	for(int i=2;i<12;++i){
		for(int j=2;j<12;++j){
			if(paper[i][j]==0){
				++cnt;
			}else{
				if(paper[i][j]>max) max=paper[i][j];
			}
		}
	}
	cout << cnt << endl;
	cout << max << endl;
	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;     

int ta[100][100];
const int BAN=10;
int main(){
 char ttmp;
int y,x,s,cnt=0,ma=0;
while(cin>>x>>ttmp>>y>>ttmp>>s){
	x+=2,y+=2;
	if(s==1){
	 ta[y][x]++;
	 ta[y+1][x]++;
	 ta[y][x-1]++;
	 ta[y-1][x]++;
	 ta[y][x+1]++;
	}
	if(s==2||s==3){
	for(int i=-1;i<=1;i++)for(int j=-1;j<=1;j++)ta[y+i][x+j]++;
	}
	if(s==3){
	ta[y+2][x]++;
	ta[y][x+2]++;
	ta[y-2][x]++;
	ta[y][x-2]++;
	}
}//endwhile
/*for(int i=2;i<BAN+2;i++){
	for(int j=2;j<BAN+2;j++){
	cout<<ta[i][j];
	}
	cout<<endl;
}*/
for(int i=0+2;i<BAN+2;i++){
	for(int j=0+2;j<BAN+2;j++){
	if(ta[i][j]==0)cnt++;
	ma=max(ma,ta[i][j]);
	}
}
cout<<cnt<<endl<<ma<<endl;
return 0;
}