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>

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

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
#define bv vector<bool>
using namespace std;
typedef pair<int, int>PA;
using namespace std;
#define MAX 1e7
int sx[] = {0,0,-1,1};
int sy[] = {1,-1,0,0};
int my[] = {0,0,1,1,1,-1,-1,-1};
int mx[] = {1,-1,0,1,-1,0,1,-1};
int lx[] = {0,0,0,0,1,1,1,2,-1,-1,-1,-2};
int ly[] = {1,-1,2,-2,0,1,-1,0,0,-1,1,0};
int  main(){
    
    vvi v(12,vi(12,0));
    vi x(100,0); vi y(100,0); vi ink(100,0);
    int i =0; char c,d;
    while(cin >> x[i] >>c>>y[i] >>d >> ink[i]){
        v[y[i]][x[i]]+=1;
        if(ink[i] == 1){
            rep(j,4){
                int tx =x[i]+sx[j]; int ty = y[i]+sy[j];
                if(0<=tx && tx<10 && 0<=ty && ty<10)
                    v[ty][tx]+=1;
            }
        }else if(ink[i] == 2){
            rep(j,8){
                int tx =x[i]+mx[j]; int ty = y[i]+my[j];
                if(0<=tx && tx<10 && 0<=ty && ty<10)
                    v[ty][tx]+=1;
                }
        }else if(ink[i] == 3){
                rep(j,12){
                    int tx =x[i]+lx[j]; int ty = y[i]+ly[j];
                    if(0<=tx && tx<10 && 0<=ty && ty<10)
                        v[ty][tx]+=1;
                }
        }
        i++;
    }
        int ans1 = -INF; int ans2 = 0;
        rep(i,10) rep(j,10){
            ans1 = max(ans1,v[i][j]);
            if(v[i][j]  == 0)
                ans2++;
        }
    cout << ans2<< endl;
    cout << ans1<< endl;
        
    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;

int paper[10][10];

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

void dropMedium(int x, int y)
{
	for (int dy = -1; dy <= 1; ++dy)
	{
		for (int dx = -1; dx <= 1; ++dx)
		{
			int xx = x+dx;
			int yy = y+dy;
			if (range(xx, yy))
				++paper[yy][xx];
		}
	}
}
void dropSmall(int x, int y, int d = 1)
{
	int dx[] = { 0, 0, 1, 0, -1 };
	int dy[] = { 0, 1, 0, -1, 0 };
	for (int i = 0; i < 5; ++i)
	{
		int xx = x+d*dx[i];
		int yy = y+d*dy[i];
		if (range(xx, yy))
			++paper[yy][xx];
	}
}
void dropLarge(int x, int y)
{
	dropSmall(x, y, 2);
	dropMedium(x, y);
	--paper[y][x];
}


int main()
{
	int x, y, s;
	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		switch (s)
		{
			case 1: dropSmall(x, y); break;
			case 2: dropMedium(x, y); break;
			case 3: dropLarge(x, y); break;
		}
	}
	int empties = 0;
	int m = 0;
	for (int y = 0; y < 10; ++y)
	{
		for (int x = 0; x < 10; ++x)
		{
			if (paper[y][x] == 0)
				++empties;
			m = max(m, paper[y][x]);
		}
	}
	printf("%d\n%d\n", empties, m);

	return 0;
}