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 <algorithm>
#include <cmath>

using namespace std;

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

int main() {
  string line;
  while (getline(cin, line)) {
    int x, y, size;
    sscanf(line.c_str(), "%d,%d,%d", &x, &y, &size);
    if (size == 1) {
      sink(x+0,y+0);
      sink(x+1,y+0);
      sink(x-1,y+0);
      sink(x+0,y+1);
      sink(x+0,y-1);
    } else if (size == 2) {
      sink(x+0,y+0);
      sink(x+1,y+0);
      sink(x-1,y+0);
      sink(x+0,y+1);
      sink(x+0,y-1);
      sink(x+1,y+1);
      sink(x-1,y+1);
      sink(x+1,y-1);
      sink(x-1,y-1);
    } else if (size == 3) {
      sink(x+0,y+0);
      sink(x+1,y+0);
      sink(x-1,y+0);
      sink(x+0,y+1);
      sink(x+0,y-1);
      sink(x+1,y+1);
      sink(x-1,y+1);
      sink(x+1,y-1);
      sink(x-1,y-1);
      sink(x+2,y+0);
      sink(x-2,y+0);
      sink(x+0,y+2);
      sink(x+0,y-2);
    }
  }
  int m = 0;
  int count = 0;
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) {
      if (dens[i][j] == 0) count++;
      m = max(m, dens[i][j]);
    }
  }
  cout << count << endl;
  cout << m << endl;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <queue>

using namespace std;

int main(void){

	int p[10][10] = {};
	int l[4] = { 0, 5, 9, 13 };
	int d[13][2] = { { 0, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 },		//ここまで小
					{ 1, 1 } , { 1, -1 }, { -1, 1 }, { -1, -1 },	//ここまで中
					{ 2, 0 }, { 0, 2 }, { -2, 0 }, { 0, -2 } };		//ここまで大
	int x, y, s;

	while( scanf("%d,%d,%d", &x, &y, &s) != EOF ) {
		for( int i = 0; i < l[s]; i++ ) {
			int tx = x + d[i][0], ty = y + d[i][1];
			if( tx < 0 || tx >= 9 || ty < 0 || ty >= 9 ) continue;
			p[tx][ty] ++;
		}
	}

	int cnt = 0, max = 0;
	for( int i = 0; i < 100; i++ ) {
		if( p[i%10][i/10] > max ) max = p[i%10][i/10];
		if( p[i%10][i/10] == 0 ) cnt ++;
	}
	cout << cnt << endl;
	cout << max << endl;

    return 0;
}

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