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

//int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0};

int main(){
	int x, y, s;
	int board[10][10] = {{0}};
	while( ~scanf("%d,%d,%d", &x, &y, &s) ){
		if( s == 3 ){
			for(int i=-2; i<3; i++){
				for(int j=-2; j<3; j++){
					if( abs(i)+abs(j) < 3 ) board[y+i][x+j]++;
				}
			}
		}else if( s == 2 ){
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					board[y+i][x+j]++;
				}
			}
		}else{
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( abs(i)+abs(j) < 2 ) board[y+i][x+j]++;
				}
			}
		}
	}
	int max_c = 0, white = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if( board[i][j] == 0 ) white++;
			max_c = max(max_c, board[i][j]);
		}
	}
	cout << white << endl;
	cout << max_c << endl;
}

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

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  // 5, 9, 13
  int dx1[] = {-1,0,0,0,1};
  int dy1[] = {0,-1,0,1,0};
  int dx2[] = {-1,-1,-1,0,0,0,1,1,1};
  int dy2[] = {-1,0,1,-1,0,1,-1,0,1};
  int dx3[] = {-2,-1,-1,-1,0,0,0,0,0,1,1,1,2};
  int dy3[] = {0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
  vector<int> dx[3];
  vector<int> dy[3];
  dx[0].assign(dx1,dx1+5);
  dx[1].assign(dx2,dx2+9);
  dx[2].assign(dx3,dx3+13);
  dy[0].assign(dy1,dy1+5);
  dy[1].assign(dy2,dy2+9);
  dy[2].assign(dy3,dy3+13);
  
  int x, y, s;
  int ans1 = 100;
  int ans2 = 0;
  int ma[10][10];
  memset(ma,0,sizeof(ma));
  while(scanf("%d,%d,%d", &x,&y,&s)==3) {
    s--;
    REP(i,dx[s].size()) {
      int xx = x + dx[s][i];
      int yy = y + dy[s][i];
      if (xx<0||10<=xx||yy<0||10<=yy) continue;
      if (ma[xx][yy]==0) ans1--;
      ma[xx][yy]++;
      ans2 = max(ma[xx][yy], ans2);
    }

  }
  cout << ans1 << endl;
  cout << ans2 << endl;
}

C++: #include "bits/stdc++.h"

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

using namespace std;

using LL = long long int;
using LD = long double;

using pii = pair<int, int>;
using pll = pair<LL, LL>;
using pdd = pair<double, double>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vl = vector<LL>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;

const int INF = (1 << 30) - 1;
const LL INF64 = ((LL)1 << 62) - 1;
const double PI = 3.1415926535897932384626433832795;

const int dy[] = { 0, 1, 0, -1 };
const int dx[] = { 1, 0, -1, 0 };

int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
LL gcd(LL x, LL y) { return y ? gcd(y, x % y) : x; }

int main() {

	vvi m(14, vi(14));

	char ch;
	int x, y, s;
	while (cin >> x >> ch >> y >> ch >> s){
		y += 2;
		x += 2;

		m[y][x]++;
		m[y + 1][x]++;
		m[y - 1][x]++;
		m[y][x + 1]++;
		m[y][x - 1]++;

		if (s == 1) {
			continue;
		}

		m[y + 1][x + 1]++;
		m[y + 1][x - 1]++;
		m[y - 1][x + 1]++;
		m[y - 1][x - 1]++;

		if (s == 2) {
			continue;
		}

		m[y + 2][x]++;
		m[y - 2][x]++;
		m[y][x + 2]++;
		m[y][x - 2]++;
	}

	int noInkGrid = 0;
	int maxInc = 0;
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (m[i][j] == 0) {
				noInkGrid++;
			}
			maxInc = max(maxInc, m[i][j]);
		}
	}

	cout << noInkGrid << endl;
	cout << maxInc << endl;
	return 0;
}

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

int main() {
	int x,y,s;
	int p[14][14]={};
	while(~scanf("%d,%d,%d",&x,&y,&s))
	{
		x+=2;y+=2;
		p[x][y]++;
		p[x-1][y]++;
		p[x+1][y]++;
		p[x][y-1]++;
		p[x][y+1]++;
		if(s!=1)
		{
			p[x-1][y-1]++;
			p[x-1][y+1]++;
			p[x+1][y-1]++;
			p[x+1][y+1]++;
		}
		if(s==3)
		{
			p[x-2][y]++;
			p[x+2][y]++;
			p[x][y-2]++;
			p[x][y+2]++;
		}
	}
	int white=0,max=0;
	for(int i=2;i<12;i++)
	{
		for(int j=2;j<12;j++)
		{
			if(p[i][j]==0)white++;
			else max=max<p[i][j]?p[i][j]:max;
		}
	}
	cout<<white<<endl<<max<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int x, y, s;
	vector<int> X, Y, S, m;
	vector<int> L1 = { -1,1 }, L2 = { -1,0,1 }, L3 = { -2,2 };
	while (scanf("%d,%d,%d",&x,&y,&s)) {
		X.push_back(x);
		Y.push_back(y);
		S.push_back(s);
	}
	vector<vector<int>> matrix;
	for (int i = 0; i < 30; i++) {
		for (int j = 0; i < 30; i++) {
			m.push_back(0);
		}
		matrix.push_back(m);
	}
	for (int i = 0; i < X.size(); i++) {
		if (S[i] == 1) {
			matrix[X[i] + 10][Y[i] + 10] += 1;
			for (int j = 0; j < L1.size(); j++) {
				matrix[X[i] + 10 + L1[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L1[j]] += 1;
			}
		}
		else if (S[i] == 2) {
			for (int j = 0; j < L2.size(); j++) {
				for (int k = 0; k < L2.size(); k++) {
					matrix[X[i] + 10 + L2[j]][Y[i] + 10 + L2[k]] += 1;
				}
			}
		}
		else {
			for (int k = 0; k < L2.size(); k++) {
				for (int j = 0; j < L2.size(); i++) {
					matrix[X[i] + 10 + L2[k]][Y[i] + 10 + L2[j]] += 1;
				}
			}
			for (int j = 0; j < L3.size(); j++) {
				matrix[X[i] + 10 + L3[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L3[j]] += 1;
			}
		}
	}
	int ctr1 = 0, max = INT_MAX;
	for (int i = 10; i < 20; i++) {
		for (int j = 10; j < 20; j++) {
			if (matrix[i][j] == 0) {
				ctr1++;
			}
			else {
				if (max < matrix[i][j])max = matrix[i][j];
			}
		}
	}
	cout << ctr1 << endl;
	cout << max << endl;
	return 0;
}