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

int p[10][10], x, y, s, md;

bool inpaper(int x, int y){
    return x >= 0 && x < 10 && y >= 0 && y < 10;
}

void drop(int x, int y, int s){
    int i, j;
    if( s == 1 ){
        for(i = -1; i <= 1; i++){
            for(j = -1; j <= 1;  j++){
                if( inpaper(x+i, y+j) &&
                    i + j >= -1 && i + j <= 1 &&
                    i - j >= -1 && i - j <= 1 ){
                    p[x+i][y+j]++;
                    if(p[x+i][y+j] > md) md = p[x+i][y+j];
                }
            }
        }
    }else if( s == 2 ){
        for(i = -1; i <= 1; i++){
            for(j = -1; j <= 1; j++){
                if( inpaper(x+i, y+j) ){
                    p[x+i][y+j]++;
                    if(p[x+i][y+j] > md) md = p[x+i][y+j];
                }
            }
        }
    }else{
        for(i = -2; i <= 2; i++){
            for(j = -2; j <= 2; j++){
                if( inpaper(x+i, y+j) && 
                    i+j >= -2 && i+j <= 2 &&
                    i-j >= -2 && i-j <= 2){
                    p[x+i][y+j]++;
                    if(p[x+i][y+j] > md) md = p[x+i][y+j];
                }
            }
        }
    }
}

int main(){
    md = 0;
    for(int i = 0; i < 10; i++){
        for(int j = 0; j < 10;j++){
            p[i][j] = 0;
        }
    }
    while( scanf("%d,%d,%d", &x, &y, &s) != EOF ){
        drop(x, y, s);
    }
    int empt = 0;
    for(int i = 0; i < 10; i++){
        for(int j = 0; j < 10;j++){
            empt += p[i][j]?0:1;
        }
    }
    printf("%d\n%d\n", empt, md);
    
    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define int long long
signed main(){
	int x,y,t;
	int v[14][14];
	while( scanf("%lld,%lld,%lld", &x, &y, &t) != EOF ){
		x+=2;
		y+=2;
		switch (t) {
			case 3:
				v[x][y-2]++;
				v[x][y+2]++;
				v[x-2][y]++;
				v[x+2][y]++;
			case 2:
				v[x-1][y-1]++;
				v[x-1][y+1]++;
				v[x+1][y-1]++;
				v[x+1][y+1]++;
			case 1:
				v[x+1][y]++;
				v[x-1][y]++;
				v[x][y-1]++;
				v[x][y+1]++;
				v[x][y]++;
				break;
		}
	}
	int z=0;
	int mx=-1;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(v[i][j]==0) z++;
			mx = max(mx, v[i][j]);
		}
	}
	cout << z << endl;
	cout << mx << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int k[10][10]={0};
  int x,y,s;
  int w=0,d=0;
  char c;
  int X[]={0,1, 0,-1,1, 1,-1,-1,2,0,-2, 0};
  int Y[]={1,0,-1, 0,1,-1, 1,-1,0,2, 0,-2};
  int S[]={0,4,8,12};
  while(cin>>x>>c>>y>>c>>s){
    // cout<<x<<y<<s<<endl;
    k[x][y]++;
    for(int i=0;i<S[s];i++){
      k[x+X[i]][y+Y[i]]++;
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(k[i][j]==0){
	w++;
      }
      if(k[i][j]>d){
	d=k[i][j];
      }
    }
  }
  if(d!=0){
    cout<<w<<'\n'<<d<<endl;
  }
  return 0;
}

C++: #include <cstdio>

using namespace std;

int main(){
	
	int yx[14][14]={0};
	int x,y,s;
	int count=0;
	int max=0;
	
	while (scanf("%d,%d,%d",&x,&y,&s)!=EOF) {
		x+=2;
		y+=2;
		if (s==1) {
			for (int i=0; i<3; i++) {
				yx[y+i-1][x]++;
				yx[y][x+i-1]++;
			}
			yx[y][x]--;
		}
		else if(s==2){
			for (int i=0; i<3; i++) {
				for(int j=0;j<3;j++){
					yx[y+i-1][x+j-1]++;
				}
			}
		}
		else {
			for (int i=0; i<3; i++) {
				for(int j=0;j<3;j++){
					yx[y+i-1][x+j-1]++;
				}
			}
			yx[y][x-2]++;
			yx[y][x+2]++;
			yx[y-2][x]++;
			yx[y+2][x]++;
			
		}
	}
	
	for (int i=2; i<12; i++) {
		for (int j=2; j<12; j++) {
			if(yx[i][j]==0)count++;
			if (yx[i][j]>max) {
				max=yx[i][j];
			}
		}
	}
	printf("%d\n%d\n",count,max);
	
	return 0;
}

C++: #include <iostream>

using namespace std;
 
int main(){
    char c;
    int x,y,sz,f[13][13],cnt = 0,max = 0; 
    for(int i = 0 ; i < 13 ; i++){
	for(int j = 0 ; j < 13 ; j++){
	    f[i][j] = 0;
	}
    }
    while(cin >> x >> c >> y >> c >> sz){
	x += 2; y += 2;
	switch(sz){
	case 3:
	    f[x][y-2]++; f[x][y+2]++;
	    f[x-2][y]++; f[x+2][y]++;
	case 2:
	    f[x-1][y-1]++; f[x+1][y+1]++;
	    f[x-1][y+1]++; f[x+1][y-1]++;
	case 1:
	    f[x][y]++; f[x-1][y]++; f[x][y-1]++; 
	    f[x+1][y]++; f[x][y+1]++;
	    break;
	}
    }
 
    for(int i = 2 ; i < 12 ; i++){
	for(int j = 2 ; j < 12 ; j++){
	    if(max < f[i][j]) max = f[i][j];
	    if(f[i][j] == 0) cnt++;
	}
    }
    cout << cnt << "\n" << max << endl; 
    return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(){

  int ink[10][10]={};
  int dx3[4] = {-2,2,0,0};
  int dy3[4] = {0,0,-2,2};
  int dx2[4] = {-1,-1,1,1};
  int dy2[4] = {-1,1,-1,1};
  int dx1[4] = {-1,1,0,0};
  int dy1[4] = {0,0,-1,1};

  int x,y,s,p=100,ma=0;
  
  while(scanf("%d",&x) != EOF){
    scanf(",%d,%d",&y,&s);
    
    if(ink[y][x] == 0) p--;
    ink[y][x]++;
    ma = max(ma,ink[y][x]);
    if(s == 3){
      for(int i=0;i<4;i++){
	if(dy3[i]+y < 0 || dy3[i]+y >= 10 || dx3[i]+x < 0 || dx3[i]+y >= 10) continue;
	if(ink[ dy3[i]+y ][ dx3[i]+x ] == 0) p--;
	ink[ dy3[i]+y ][ dx3[i]+x ]++;
	ma = max(ma,ink[ dy3[i]+y ][ dx3[i]+x ]);
      }
    }
    if(s >= 2){
      for(int i=0;i<4;i++){
	if(dy2[i]+y < 0 || dy2[i]+y >= 10 || dx2[i]+x < 0 || dx2[i]+y >= 10) continue;
	if(ink[ dy2[i]+y ][ dx2[i]+x ] == 0) p--;
	ink[ dy2[i]+y ][ dx2[i]+x ]++;
	ma = max(ma,ink[ dy2[i]+y ][ dx2[i]+x ]);
      }
    }
    if(s >= 1){
      for(int i=0;i<4;i++){
	if(dy1[i]+y < 0 || dy1[i]+y >= 10 || dx1[i]+x < 0 || dx1[i]+y >= 10) continue;
	if(ink[ dy1[i]+y ][ dx1[i]+x ] == 0) p--;
	ink[ dy1[i]+y ][ dx1[i]+x ]++;
	ma = max(ma,ink[ dy1[i]+y ][ dx1[i]+x ]);
      }
    }
  }
  printf("%d\n%d\n",p,ma);
  return (0);
}

C++: #include <iostream>
using namespace std;
int d[512];
#define N 10
int main( void )
{
  int x,y,s,a,mx=0,n=0;
  char c1,c2;
  int *p = d+256;
  while( 1 ){
    cin>>x>>c1>>y>>c2>>s;
    if( cin.eof() ) break;
    a = y*N+x;
    p[a]++; p[a-1]++; p[a+1]++; p[a+N]++; p[a-N]++;
    if( s > 1 ){ p[a+1+N]++; p[a-1+N]++; p[a+1-N]++; p[a-1-N]++; }
    if( s > 2 ){ p[a+2]++; p[a-2]++; p[a+2*N]++; p[a-2*N]++; }
  }
  for( y=0; y<N; y++ ) for( x=0; x<N; x++ ){
    a = p[y*N+x];
    if( mx < a ) mx = a;
    if( a == 0 ) n++;
  }
  cout << n << endl;
  cout << mx << endl;
  return 0;
}