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 <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <climits>
 
#define REP(i,b,n) for(int i=b;i<n;++i)
#define REPR(i,b,n) for(int i=n-1;i>=b;--i)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define NCLR(mat) memset(mat, -1, sizeof(mat))
#define EACH(i, c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define BIT(n, b) ((n>>b) & 1)
#define PI acos(-1.0)

using namespace std;

static const double EPS = 1e-9;
typedef pair<int, int> pii;
typedef long long ll;

int sz[]={0, 5, 9, 13};
int dx[] = {0, 0, 0, 1, -1, 1, 1, -1, -1, 0, 0, 2, -2};
int dy[] = {0, 1, -1, 0, 0, 1, -1, 1, -1, 2, -2, 0, 0}; 
int fld[11][11]={{0}};
int cnt = 100;
int mx = 0;

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

int main(){

	int x, y, siz;
	char c;

	while(cin >> x >> c >> y >> c >> siz, !cin.eof()){
		
		for(int i=0; i<sz[siz]; i++){
			
			int nx = x+dx[i], ny = y+dy[i];
			
			if( inborder(nx, ny) ){
				
				if(fld[nx][ny]==0)
					cnt--;
				
				mx = max(mx, ++fld[nx][ny]);
			}
		}
	}
	
	cout << cnt << '\n' << mx << endl;

	return 0;
}

C++: #include <stdio.h>

int main()
{
	int ans1 = 0;
	int ans2 = 0;
	int x,y,size;
	int paper[14][14];
	for(int i = 0; i < 14; i++){
		for(int j = 0; j < 14; j++){
			paper[i][j] = 0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
		paper[x + 2][y + 2] ++;
		paper[x + 1][y + 2] ++;
		paper[x + 2][y + 1] ++;
		paper[x + 3][y + 2] ++;
		paper[x + 2][y + 3] ++;
		if(size > 1){
			paper[x + 1][y + 3] ++;
			paper[x + 1][y + 1] ++;
			paper[x + 3][y + 1] ++;
			paper[x + 3][y + 3] ++;
		}
		if(size > 2){
			paper[x + 2][y + 4] ++;
			paper[x + 2][y] ++;
			paper[x + 4][y + 2] ++;
			paper[x][y + 2] ++;
		}
	}
	for(int i = 2; i < 12; i++){
		for(int j = 2; j < 12; j++){
			if(paper[i][j] == 0){
				ans1++;
			}
			if(ans2 < paper[i][j]){
				ans2 = paper[i][j];
			}

		}
	}
	printf("%d\n%d\n",ans1,ans2);
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;

int G[10][10];

void draw(int x, int y) {
  if(0<=x<10 && 0<=y<10) {
    G[y][x] ++;
  }
}

int main() {
  int a, b, c;

  fill(G[0], G[10], 0);
  
  while(scanf("%d,%d,%d", &a, &b, &c)) {
    draw(a, b);
    switch(c) {
    case 1:
      draw(a-1, b);
      draw(a+1, b);
      draw(a, b-1);
      draw(a, b+1);
    case 2:
      draw(a-1, b-1);
      draw(a+1, b-1);
      draw(a-1, b+1);
      draw(a+1, b+1);
    case 3:
      draw(a-2, b);
      draw(a+2, b);
      draw(a, b-2);
      draw(a, b+2);
      break;
    }
  }
  
  int clrNum = 0, mx=0;  
  
  for(int i=0; i<10; i++) {
    for(int j=0; j<10; j++) {
      mx = max(mx, G[i][j]);
    }
  }

  cout << mx << endl << clrNum << endl;
  
  return 0;
}

C++: #include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int x,y,size;
	unsigned char arr[ 14 * 14 ];

	while ( scanf("%d,%d,%d", &x, &y, &size ) != EOF ) {
		x+=2; y+=2;
		arr[ 14 * ( x - 1 ) + y ]++;
		arr[ 14 * x + y ]++;
		arr[ 14 * ( x + 1 ) + y ]++;
		arr[ 14 * x  + y - 1 ]++;
		arr[ 14 * x + y ]++;
		arr[ 14 * x  + y + 1 ]++;
		if( size == 2 ) {
			arr[ 14 * ( x - 1 ) + y - 1 ]++;
			arr[ 14 * ( x - 1 ) + y + 1 ]++;
			arr[ 14 * ( x + 1 ) + y - 1 ]++;
			arr[ 14 * ( x + 1 ) + y + 1 ]++;
		}
		if( size == 3 ) {
			arr[ 14 * ( x - 2 ) + y  ]++;
			arr[ 14 * ( x + 2 ) + y  ]++;
			arr[ 14 * x + y - 2  ]++;
			arr[ 14 * x + y + 2 + y  ]++;
		}
	}
	
	int cnt = 0;
	int maxv = 0;

	for( int i = 2; i < 12; i++ ) {
		for( int j = 2; j < 12; j++ ) {
			if( arr[ 14 * j + i ] == 0 ) {
				cnt++;
			}
			else if( maxv < arr[ 14 * j + i ] ) {
				maxv = arr[ 14 * j + i ] ;
			}
		}
	}

	printf("%d\n%d\n", cnt, maxv);
        return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <functional>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
//#define scanf scanf_s

int i, j, s;
int p[15][15];

void nuri(int i, int j)
{
	if (i >= 0 && i < 10 && j >= 0 && j < 10) p[i][j]++;
}

void shou(int i, int j)
{
	nuri(i, j);
	nuri(i - 1, j);
	nuri(i, j - 1);
	nuri(i, j + 1);
	nuri(i + 1, j);
}

void chu(int i, int j)
{
	shou(i, j);
	nuri(i - 1, j - 1);
	nuri(i - 1, j + 1);
	nuri(i + 1, j - 1);
	nuri(i + 1, j + 1);
}

void dai(int i, int j)
{
	chu(i, j);
	nuri(i - 2, j);
	nuri(i, j - 2);
	nuri(i, j + 2);
	nuri(i + 2, j);
}

int main()
{
	REP(i, 15)REP(j, 15) p[i][j] = 0;
	while (scanf("%d,%d,%d", &i, &j, &s) != EOF)
	{
		if (s == 1) shou(i, j);
		if (s == 2) chu(i, j);
		if (s == 3) dai(i, j);
	}
	int cnt = 0; int mx = 0;
	REP(i, 10)REP(j, 10)
	{
		if (p[i][j] == 0) cnt++;
		mx = max(p[i][j], mx);
	}
	cout << cnt << endl << mx << endl;
	return 0;
}