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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		
		while(1){
			data[x][y]++;
			if(y-1>=0)data[x][y-1]++;
			if(x+1<10)data[x+1][y]++;
			if(y+1<10)data[x][y+1]++;
			if(x-1>=0)data[x-1][y]++;
			if(s==1)break;
			if(x+1<10 && y+1<10)data[x+1][y+1]++;
			if(x+1<10 && y-1>=0)data[x+1][y-1]++;
			if(x-1>=0 && y-1>=0)data[x-1][y-1]++;
			if(x-1>=0 && y+1<10)data[x-1][y+1]++;
			if(s==2)break;
			if(x+2<10)data[x+2][y]++;
			if(y-2>=0)data[x][y-2]++;
			if(y+2<10)data[x][y+2]++;
			if(x-2>=0)data[x-2][y]++;
			break;
		}
		
	}
	int white=0,ma=0;
	for(int i=0;i<i<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<" "<<ma<<endl;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>

using namespace std;

int sdy[]={-1,0,0,1,0};
int sdx[]={0,-1,1,0,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){
		//field[y][x]++;
		if(size==1){
			for(int i = 0; i < 5; 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;
}