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\n", count, max)
}

C++: #include<iostream>
#include<vector>
#include<string>
using namespace std;
int parse(string a) {
	int s = 0;
	for (int b = 0; b < a.length(); b++) {
		s *= 10;
		s += a[b] - 48;
	}
	return s;
}
vector<int>split(string a) {
	vector<int>s;
	string b = "";
	for (int c = 0; c < a.length(); c++) {
		if (a[c] == ',') { s.push_back(parse(b)); b = ""; }
		else b += a[c];
	}
	s.push_back(parse(b));
	return s;
}
int main() {
	vector<vector<int>>masu(10,vector<int>(10));
	int xp[4]{ 1,-1,1,-1 };
	int yp[4]{ 1,1,-1,-1 };
	int xq[12]{ -2,-1,-1,-1,0,0,0,0,1,1,1,2 };
	int yq[12]{ 0,-1,0,1,-2,-1,1,2,-1,0,1,0 };
	string a;
	while (cin >> a) {
		vector<int>b;
		b = split(a);
		if (b[2] == 1){
			for (int l = 0; l < 4; l++) {
				if (b[0] + xp[l] < 10 && b[0] + xp[l]>0 && b[1] + yp[l] < 10 && b[1] + yp[l] < 10)masu[b[0] + xp[l]][b[1] + yp[l]]++;
		}
		}
		else if (b[2] == 2) {
			for (int l = b[0] - 1; l < b[0] + 2; l++) {
				for (int r = b[1] - 1; r < b[1] + 2; r++) {
					if (l < 10 && l>-1 && r < 10 && r>-1) masu[l][r]++;
				}
			}
		}
		else {
			for (int l = 0; l < 12; l++) {
				if (b[0] + xq[l] < 10 && b[0] + xq[l]>0 && b[1] + yq[l] < 10 && b[1] + yq[l] < 10)masu[b[0] + xq[l]][b[1] + yq[l]]++;
			}
		}
	}
	int zero, n;
	zero = n = 0;
	for (auto j : masu) {
		for (int i : j) {
			if (i==0) zero++;
			else if (i > n)n = i;
		}
	}
	cout << zero << endl << n << endl;
}

C++: #include<stdio.h>

int table[14][14];

int main(){
	int a,b,c;
	while(~scanf("%d,%d,%d",&a,&b,&c)){
		a+=2;
		b+=2;
		switch(c){
			case 3:
				table[a-2][b]++;
				table[a+2][b]++;
				table[a][b-2]++;
				table[a][b+2]++;
			case 2:
				table[a+1][b+1]++;
				table[a-1][b-1]++;
				table[a+1][b-1]++;
				table[a-1][b+1]++;
			case 1:
				table[a][b+1]++;
				table[a][b-1]++;
				table[a-1][b]++;
				table[a+1][b]++;
				table[a][b]++;
		}
	}
	int max=0;
	int ans=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(table[i][j]>0)ans++;
			if(table[i][j]>max)max=table[i][j];
		}
	}
	printf("%d\n%d\n",100-ans,max);
}

C++: // class point	の練習（クラスの高度な実装）
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cmath>
#include <vector>
#include <queue>


typedef long long llong;
using namespace std;

int paper[10][10] = { 0 };

void add(int x, int y) {
	if (x >= 0 && y >= 0 && x < 10 && y < 10)paper[x][y]++;
	return;
}

int small(int x, int y) {
	add(x, y);
	add(x + 1, y); add(x - 1, y);
	add(x, y + 1); add(x, y - 1);
	return 0;
}

int medi(int x, int y) {
	for (int i = x - 1; i <= x + 1; i++) {
		for (int j = y - 1; j <= y + 1; j++) {
			add(i, j);
		}
	}
	return 0;
}

int large(int x, int y) {
	add(x, y + 2); add(x, y - 2);
	for (int i = x - 1; i <= x + 1; i++) {
		add(i, y + 1); add(i, y - 1);
	}
	for (int i = x - 2; i <= x + 2; i++) {
		add(i, y);
	}
	return 0;
}
int main() {
	int x, y, s;

	while (cin >> x&&getchar()&&cin >> y&&getchar()&&cin >> s) {
		if (s == 1)small(x, y);
		else if (s == 2)medi(x, y);
		else if (s == 3)large(x, y);
	}

	int cnt = 0; int maxim = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[i][j] == 0)cnt++;
			if (paper[i][j] > maxim)maxim = paper[i][j];
			
		}
	}
	cout << cnt << endl << maxim << endl;

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
#include <cstdio>
using namespace std;

void drop1(int s[][14] , int x , int y){
	s[x][y]++;
	s[x-1][y]++;
	s[x][y-1]++;
	s[x+1][y]++;
	s[x][y+1]++;
}

void drop2(int s[][14] , int x , int y){
	drop1(s , x , y);
	s[x-1][y-1]++;
	s[x+1][y-1]++;
	s[x-1][y+1]++;
	s[x+1][y+1]++;
}

void drop3(int s[][14] , int x , int y){
	drop2(s , x , y);
	s[x-2][y]++;
	s[x][y-2]++;
	s[x+2][y]++;
	s[x][y+2]++;
}


int main(){
	int square[14][14]={0};
	int x , y , s , mx=0 ,cnt=0;
	while(scanf("%d,%d,%d",&x,&y,&s)){
		switch(s){
			case 1:
			drop1(square , x+2 , y+2);
			break;
			case 2:
			drop2(square , x+2 , y+2);
			break;
			case 3:
			drop3(square , x+2 , y+2);
		}
	}
		for(int i=2;i<12;++i){
			for(int j=2;j<12;++j){
				if(square[i][j]==0) cnt++;
				mx=max(mx , square[i][j]);
			}
		}
		cout << cnt << endl << mx << endl;	
	return 0; 
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>

#define f first
#define s second
#define mp make_pair

#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()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int w[30][30];
int &pos(int y,int x){
  return w[y+10][x+10];
}

int main(){
  const int d[3][5][5] ={
    {
      {0,0,0,0,0},
      {0,0,1,0,0},
      {0,1,1,1,0},
      {0,0,1,0,0},
      {0,0,0,0,0}
    },
    {
      {0,0,0,0,0},
      {0,1,1,1,0},
      {0,1,1,1,0},
      {0,1,1,1,0},
      {0,0,0,0,0}
    },
    {
      {0,0,1,0,0},
      {0,1,1,1,0},
      {1,1,1,1,1},
      {0,1,1,1,0},
      {0,0,1,0,0}
    }
  };
  int x,y,s;

  while(~scanf("%d,%d,%d",&x,&y,&s)){
    s -= 1;
    x -= 2;
    y -= 2;
    REP(i,5) REP(j,5)
      pos(x+i,y+j) += d[s][i][j];
  }
  int bl = 0;
  int mx = 0;
  REP(i,10) REP(j,10){
    if(pos(i,j) == 0) bl++;
    mx = max(mx, pos(i,j));
  }
  cout << bl << endl << mx << endl;
  return 0;
}