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>
using namespace std;
int main(){
	int masu[13][13],x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		x+=2,y+=2;
		if(s==1){
			for(int i=x-1;i<=x+1;i++)masu[i][y]++;
			masu[x][y-1]++;
			masu[x][y+1]++;
		}else if(s==2){
			for(int i=x-1;i<=x+1;i++){
				for(int j=y-1;j<=y+1;j++){
					masu[i][j]++;
				}
			}
		}else{
			for(int i=x-1;i<=x+1;i++){
				for(int j=y-1;j<=y+1;j++){
					masu[i][j]++;
				}
			}
			masu[x-2][y]++,masu[x+2][y]++;
			masu[x][y-2]++,masu[x][y+2]++;
		}
	}
	int siro=0,koi=0;
	for(int i=2;i<=11;i++){
		for(int j=2;j<=11;j++){
			if(masu[i][j]==0)siro++;
			if(koi<masu[i][j])koi=masu[i][j];
		}
	}
	cout<<siro<<endl<<koi<<endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <string>
#include <queue>
#include <algorithm>
#include <cctype>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const double pi=acos(-1);

int x,y,s,num=0,ans=-1,vx[9]={-1,-1,-1,0,0,0,1,1,1},vy[9]={1,0,-1,1,0,-1,1,0,-1};
char t;
vvi field(10,vi(10));

void func(int a,int b){
	for(int i=0;i<9;i++){
		int ca=a+vx[i],cb=b+vy[i];
		if(ca>=0&&ca<10&&cb>=0&&cb<10) field[ca][cb]++;
	}
}

int main(){
	while(cin>>x>>t>>y>>t>>s){
		func(x,y);
		if(s==2) continue;
		if(s==1){
			int dx[4]={-1,-1,1,1},dy[4]={1,-1,1,-1};
			for(int i=0;i<4;i++){
				int cax=x+dx[i],cay=y+dy[i];
				if(cax>=0&&cax<10&&cay>=0&&cay<10) field[cax][cay]--;
			}
		}
		else{
			int dx[4]={-2,0,0,2},dy[4]={0,2,-2,0};
			for(int i=0;i<4;i++){
				int cax=x+dx[i],cay=y+dy[i];
				if(cax>=0&&cax<10&&cay>=0&&cay<10) field[cax][cay]++;
			}
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(!field[i][j]) num++;
			ans=max(ans,field[i][j]);
		}
	}
	cout<<num<<endl;
	cout<<ans<<endl;
}

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

int G[10][10];

void draw(int x, int y) {
  if(0<=x<10 && 0<=y<10) {
    G[y][x] ++;
  }
}

int main() {
  int a, b, c;
  
  while(scanf("%d,%d,%d", &a, &b, &c)) {
    draw(a, b);
    switch(c) {
    case 1:
      draw(a-1, b);
      draw(a+1, b);
      draw(a, b-1);
      draw(a, b+1);
    case 2:
      draw(a-1, b-1);
      draw(a+1, b-1);
      draw(a-1, b+1);
      draw(a+1, b+1);
    case 3:
      draw(a-2, b);
      draw(a+2, b);
      draw(a, b-2);
      draw(a, b+2);
      break;
    }
  }
  
  int clrNum = 0, mx=0;  
  
  for(int i=0; i<10; i++) {
    for(int j=0; j<10; j++) {
      mx = max(mx, G[i][j]);
    }
  }

  cout << mx << endl << clrNum << endl;
  
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>

using namespace std;

int peper[11][11];

void paint(int x, int y)
{
	if (x * y >= 0 && x >= 0){
		peper[x][y]++;
	}
}

int main()
{
	int x, y;
	int size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		peper[y][x]++;
		
		paint(y - 1, x);
		paint(y + 1, x);
		paint(y, x - 1);
		paint(y, x + 1);
		
		if (size > 1){
			paint(y - 1, x + 1);
			paint(y + 1, x + 1);
			paint(y + 1, x - 1);
			paint(y - 1, x - 1);
		}
		if (size > 2){
			paint(y - 2, x);
			paint(y + 2, x);
			paint(y, x - 2);
			paint(y, x + 2);
		}
	}
	
	int dark = 0;
	int blank = 0;
	
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (peper[j][i] == 0)	blank++;
			dark = max(dark, peper[j][i]);
		}
	}
	printf("%d\n%d\n", blank, dark);
	return (0);
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(){
	int masu[10][10] = {0};
	int x, y, s, i, j, n = 0, cut = 0;
	int num[100] = {0};

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		masu[x][y] ++;
		if(s == 1){
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
		}
		else if(s == 2){
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
			masu[x-1][y-1] += 1, masu[x+1][y-1] += 1, masu[x-1][y+1] += 1, masu[x-1][y+1] += 1;
		}
		else{
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
			masu[x-1][y-1] += 1, masu[x+1][y-1] += 1, masu[x-1][y+1] += 1, masu[x-1][y+1] += 1;
			masu[x-2][y] += 1, masu[x+2][y] += 1, masu[x][y+2] += 1, masu[x][y-2] += 1;
		}
		
	}

	for(i = 0; i < 10; i ++){
		for(j = 0; j < 10; j ++){
			num[n] = masu[i][j];
			n ++;
		}
	}

	sort(num, num+100);

	for(i =0; i < 100; i ++){
		if(num[i] == 0) cut ++;
		else break;
	}

	cout << cut << endl << num[99] << endl;

	return 0;    
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<random>
using namespace std;

int main(){

  int s3x[12] = {0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2};
  int s3y[12] = {1, 0, -1, 0, 1, -1, 1, -1, 2, 0, -2, 0};

  vector< vector<int> > p( 10, vector<int> (10, 0) );
  int x, y, s;
  int cnt = 0;
  int mx = 0;

  while( scanf("%d,%d,%d", &x, &y, &s) != EOF ){
    p[ x ][ y ]++;
    mx = max(mx, p[x][y]);
    cnt++;
    for(int i=0; i<s*4; i++){
      int tx = x + s3x[i];
      int ty = y + s3y[i];
      if( tx < 0 || ty < 0 || tx >= 10 || ty >= 10 ) continue;
      p[tx][ty]++;
      cnt++;
      mx = max(mx, p[tx][ty]);
    }
    // cerr << cnt << endl;
  }
  cout << cnt << endl;
  cout << mx << endl;
  return 0;
}




// EOF