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>
#include <vector>
#include <algorithm>
#include <cstring>

using namespace std;

int sdy[]={-1,0,0,1};
int sdx[]={0,-1,1,0};
int mdy[]={0,0,0,-1,-1,-1,1,1,1};
int mdx[]={-1,0,1,-1,0,1,-1,0,1};
int ldy[]={0,0,0,-1,-1,-1,1,1,1,2,0,0,-2};
int ldx[]={-1,0,1,-1,0,1,-1,0,1,0,-2,2,0};


int main(){

	int field[10][10];
	memset(field,0,sizeof(field));

	int x,y,size;
	char cm;
	while(cin>>x>>cm>>y>>cm>>size){
		if(size==1){
			for(int i = 0; i < 4; i++){
				int py=y+sdy[i];
				int px=x+sdx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
		else if(size==2){
			for(int i = 0; i < 9; i++){
				int py=y+mdy[i];
				int px=x+mdx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
		else{
			for(int i = 0; i < 13; i++){
				int py=y+ldy[i];
				int px=x+ldx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
	}

	int maxConcentration=0;
	int cnt=0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(field[i][j]==0)
				cnt++;
			maxConcentration=max(maxConcentration,field[i][j]);
		}
	}
	cout<<cnt<<endl;
	cout<<maxConcentration<<endl;

	return 0;
}

C++: #include <cstdio>
#include <cstring>

using namespace std;

const int dy[3][13] = {
	{-1,0,0,0,1},
	{-1,-1,-1,0,0,0,1,1,1,},
	{-2,-1,-1,-1,0,0,0,0,0,1,1,1,2}},
		  dx[3][13] = {
	{0,-1,0,1,0},
	{-1,0,1,-1,0,1,-1,0,1},
	{0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}},
	dnum[3] = {5,9,13};


int main(void){
	int p[10][10], x, y, size, i, j, ans1, ans2;
		memset(p,0,sizeof(p));
	while(scanf("%d%*c%d%*c%d",&x,&y,&size) != EOF){
		size--;
		for(i = 0;i < dnum[size];i++){
			if(0 <= y + dy[size][i] && y + dy[size][i] < 10 && 0 <= x + dx[size][i] && x + dx[size][i] < 10){
				p[y + dy[size][i]][x + dx[size][i]]++;
			}
		}
		ans1 = ans2 = 0;
	}
	for(i = 0;i < 10;i++){
		for(j = 0;j < 10;j++){
			if(p[i][j] == 0){
				ans1++;
			}
			if(ans2 < p[i][j]){
				ans2 = p[i][j];
			}
		}
	}
	printf("%d\n%d\n",ans1,ans2);
	return 0;
}

C++: #include<iostream>
#include<string>
int mem[14][14] = {}, i = 0, X[50], Y[50], S[50], flag = 0, max = 0, x, y, s;
int main() {
	char b;
	while (std::cin >> x >> b >> y >> b >> s) {
		Y[i] = y, S[i] = s, X[i] = x;
		i += 1;
	}
		for (int a = 0; a < i; a += 1) {
			if (S[a] >= 1) {
				mem[X[a] + 2][Y[a] + 2] += 1;
				mem[X[a] + 1][Y[a] + 2] += 1;
				mem[X[a] + 3][Y[a] + 2] += 1;
				mem[X[a] + 2][Y[a] + 1] += 1;
				mem[X[a] + 2][Y[a] + 3] += 1;
			}
			if (S[a] >= 2) {
				mem[X[a] + 1][Y[a] + 1] += 1;
				mem[X[a] + 1][Y[a] + 3] += 1;
				mem[X[a] + 3][Y[a] + 1] += 1;
				mem[X[a] + 3][Y[a] + 3] += 1;
			}
			if (S[a] >= 3) {
				mem[X[a]][Y[a] + 2] += 1;
				mem[X[a] + 4][Y[a] + 2] += 1;
				mem[X[a] + 2][Y[a] + 4] += 1;
				mem[X[a] + 2][Y[a]] += 1;
			}
		}
		for (int i = 0; i < 10; i += 1)
			for (int j = 0; j < 10; j += 1) {
				if (0 == mem[i + 2][j + 2])
					flag += 1;
				if (max < mem[i + 2][j + 2])
					max = mem[i + 2][j + 2];
			}
		std::cout << flag << std::endl;
		std::cout << max << std::endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;

int main(void) {
    string s;
    int rect = 0, rhom = 0;
    while (cin >> s) {
        replace(s.begin(), s.end(), ',', ' ');
        stringstream ss(s);
        int x, y, z;
        ss >> x >> y >> z;

        if (x == y || y == z || z == x) rhom++;
        else if (x*x + y*y == z*z) rect++;
    }

    cout << rect << endl;
    cout << rhom << endl;

    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=10000009;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };
int dx2[4] = { 0,-2,0,2 };
int dy2[4] = { -2,0,2,0 };
int m[15][15];
int main() {
	int x[10000],y[10000],z[10000];
	char s,t;
	int count=0,M=0;
	int n=0;
	while(true){
		cin>>x[n]>>s>>y[n]>>t>>z[n];
		if (cin.eof())break;
		n++;
	}
	for(int i=0;i<=n;i++){
		if(z[i]==1){
			m[y[i]][x[i]]++;
			for(int j=0;j<4;j++){
				if(value(y[i]+dy[j],x[i]+dx[j],10,10)){
					m[y[i]+dy[j]][x[i]+dx[j]]++;
				}
			}
		}
		else if(z[i]==2){
			for(int j=-1;j<=1;j++){
				for(int k=-1;k<=1;k++){
					if(value(y[i]+k,x[i]+j,10,10)){
						m[y[i]+k][x[i]+j]++;
					}
				}
			}
		}
		else{
			for(int j=-1;j<=1;j++){
				for(int k=-1;k<=1;k++){
					if(value(y[i]+k,x[i]+j,10,10)){
						m[y[i]+k][x[i]+j]++;
					}
				}
			}
			for(int j=0;j<4;j++){
				if(value(y[i]+dy2[j],x[i]+dx2[j],10,10)){
					m[y[i]+dy2[j]][x[i]+dx2[j]]++;
				}
			}
		}
	}
	for(int i=0;i<=9;i++){
		for(int j=0;j<=9;j++){
			if(m[i][j]==0) count++;
			if(m[i][j]>M) M=m[i][j];
		}
	}
	cout<<count<<M<<endl;
}