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 <bits/stdc++.h>
using namespace std;

int main(void){
    std::vector<std::vector<int>> vec(10,vector<int>(10,0));
    int x,y,s;
    char c;
    while (cin>>x>>c>>y>>c>>s) {
        if (s==1) {
            vec.at(y).at(x)++;
            if (y-1>=0) { //上
                vec.at(y-1).at(x)++;
            }
            if (x-1>=0) { //左
                vec.at(y).at(x-1)++;
            }
            if (x+1<=9) { //右
                vec.at(y).at(x+1)++;
            }
            if (y+1<=9) { //下
                vec.at(y+1).at(x)++;
            }
        } else if (s==2) {
            vec.at(y).at(x)++;
            if (y-1>=0&&x-1>=0) { //左上
                vec.at(y-1).at(x-1)++;
            }
            if (y-1>=0) { //上
                vec.at(y-1).at(x)++;
            }
            if (y-1>=0&&x+1<=9) { //右上
                vec.at(y-1).at(x+1)++;
            }
            if (x-1>=0) { //左
                vec.at(y).at(x-1)++;
            }
            if (x+1<=9) { //右
                vec.at(y).at(x+1)++;
            }
            if (x-1>=0&&y+1<=9) { //左下
                vec.at(y+1).at(x-1)++;
            }
            if (y+1<=9) { //下
                vec.at(y+1).at(x)++;
            }
            if (x+1<=9&&y+1<=9) { //右下
                vec.at(y+1).at(x+1)++;
            }
        } else if (s==3) {
            vec.at(y).at(x)++;
            if (y-1>=0&&x-1>=0) { //左上
                vec.at(y-1).at(x-1)++;
            }
            if (y-1>=0) { //上
                vec.at(y-1).at(x)++;
            }
            if (y-1>=0&&x+1<=9) { //右上
                vec.at(y-1).at(x+1)++;
            }
            if (x-1>=0) { //左
                vec.at(y).at(x-1)++;
            }
            if (x+1<=9) { //右
                vec.at(y).at(x+1)++;
            }
            if (x-1>=0&&y+1<=9) { //左下
                vec.at(y+1).at(x-1)++;
            }
            if (y+1<=9) { //下
                vec.at(y+1).at(x)++;
            }
            if (x+1<=9&&y+1<=9) { //右下
                vec.at(y+1).at(x+1)++;
            }
            if (y-2>=0) { //最上
                vec.at(y-2).at(x)++;
            }
            if (x+2<=9) { //最右
                vec.at(y).at(x+2)++;
            }
            if (x-2>=0) { //最左
                vec.at(y).at(x-2)++;
            }
            if (y+2<=9) { //最下
                vec.at(y+2).at(x)++;
            }
        }
    }
    int count=0;
    int max=0;
    for (int i=0;i<10;i++) {
        for (int j=0;j<10;j++) {
            if (vec.at(i).at(j)==0) {
                count++;
            }
            if (vec.at(i).at(j)>max) {
                max=vec.at(i).at(j);
            }
        }
    }
    cout<<count<<endl;
    cout<<max<<endl;
}

C++: #include<cstdio>

int main(){
	int p[14][14];
	int x, y, s, max = 0, sum = 100;
	for(int i = 0; i < 14; i++){
		for(int j = 0; j < 14; j++){
			p[i][j] = 0;
		}
	}

	while(scanf("%d,%d,%d", &x, &y, &s) + 1){
		if(s == 0){
			break;
		}
		p[x+2][y+2]++;
		p[x+1][y+2]++;
		p[x+2][y+1]++;
		p[x+3][y+2]++;
		p[x+2][y+3]++;
		s--;
		if(s){
			p[x+1][y+1]++;
			p[x+1][y+3]++;
			p[x+3][y+1]++;
			p[x+3][y+3]++;
			s--;
			if(s){
				p[x][y+2]++;
				p[x+2][y]++;
				p[x+2][y+4]++;
				p[x+4][y+2]++;
			}
		}
	}

	for(int i = 2; i < 12; i++){
		for(int j = 2; j < 12; j++){
			if(p[i][j]){
				sum--;
				if(max < p[i][j]){
					max = p[i][j];
				}
			}
		}
	}

	printf("%d\n%d\n", sum, max);
	return 0;
}

C++: #include<iostream>
int main(){
  int paper[10][10],x,y,a,max=0;
  std::string s;
  for(x=0; x<10; x++)
    for(y=0; y<10; y++)
      paper[x][y]=0;

  while(std::cin>>s){
    x=s.at(0)-'0';
    y=s.at(2)-'0';
    a=s.at(4)-'0';
      paper[x][y]++;
      if(x>0) paper[x-1][y]++;
      if(x<9) paper[x+1][y]++;
      if(y>0) paper[x][y-1]++;
      if(y<9) paper[x][y+1]++;

    if(a>1){
      if(x>0&&y>0) paper[x-1][y-1]++;
      if(x<9&&y>0) paper[x+1][y-1]++;
      if(x>0&&y<9) paper[x-1][y+1]++;
      if(x<9&&y<9) paper[x+1][y+1]++;
    }
    if(a>2){
      if(x>1)paper[x-2][y]++;
      if(y>1)paper[x][y-2]++;
      if(x<8)paper[x+2][y]++;
      if(y<8)paper[x][y+2]++;
    }
  }

  for(x=0,a=0;x<10;x++)
    for(y=0;y<10;y++){
      paper[x][y]==0 ? a++:,
      paper[x][y]>max ? max=paper[x][y]:;
    }
      std::cout<<a<<"\n"<<max<<"\n";
}

C++: //インクを落とす
#include<cstdio>

using namespace std;

int main(void){
	int pa[10][10];
	int i,j;	//ループカウンタ
	int x,y,size,da=0,not=0;
	
	//二次元配列の初期化
	for(i=0;i<10;i++){
		for(j=0;j<10;j++)
			pa[i][j]=0;
	}

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
			case 1:	//小
				pa[x][y]++;
				pa[x-1][y]++;
				pa[x+1][y]++;
				pa[x][y-1]++;
				pa[x][y+1]++;
				break;
			case 2:	//中
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[x+i][y+j]++;
				}
				break;
			case 3:	//大
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[x+i][y+j]++;
				}
				pa[x-2][y]++;
				pa[x+2][y]++;
				pa[x][y-2]++;
				pa[x][y+2]++;
				break;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(pa[i][j]==0)
				not++;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(pa[i][j]>da)
				da=pa[i][j];
		}
	}
	printf("%d\n%d\n",not,da);

	return 0;
}

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

typedef complex<double> P;

int f[10][10];
void g(int x,int y){
	if( x < 0 or y < 0 or x >= 10 or y >= 10 ) return;
	f[y][x]++;
}
int main(){
	int x,y,s;
	while( scanf("%d,%d,%d",&x,&y,&s) != -1 ){
		if( s == 1 ){
			for(int i = -1 ; i <= 1 ; i++)
				for(int j = -1 ; j <= 1 ; j++)
					if( abs(i)+abs(j) <= 1 )
						g(y+i,x+j);
		}else if( s == 2 ){
			for(int i = -1 ; i <= 1 ; i++)
				for(int j = -1 ; j <= 1 ; j++)
					g(y+i,x+j);
		}else{
			for(int i = -2 ; i <= 2 ; i++)
				for(int j = -2 ; j <= 2 ; j++)
					if( abs(i)+abs(j) <= 2 )
						g(y+i,x+j);
		}
	}
	int sum = 0;
	int mx = 0;
	for(int i = 0 ; i < 10 ; i++){
		for(int j = 0 ; j < 10 ; j++){
			if( f[i][j] ) sum++;
			mx = max(f[i][j],mx);
		}
	}
	cout << 100-sum << endl;
	cout << mx << endl;
			
			
}