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

void ink(char[][10],int,int,int);
void change(char[][10],int,int,int);

int main(void){
	char paper[10][10]={0};
	int white=0,max_ink=0;

	for(int x,y,size;scanf("%d,%d,%d",&x,&y,&size)!=EOF;)
		ink(paper,x,y,size);

	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++){
			if(paper[i][j]==0)
				white++;
			max_ink=std::max(max_ink,int(paper[i][j]));
		}

	printf("%d\n%d",white,max_ink);
	return 0;
}

void ink(char paper[][10],int x,int y,int size){
	switch(size){
		case 1:
			ink(paper,x,y,2);
			for(int i=-1;i<=1;i+=2)
				for(int j=-1;j<=1;j+=2)
					change(paper,x+i,y+j,-1);
			change(paper,x,y,-1);
			break;
		case 2:
			for(int i=-1;i<=1;i++)
				for(int j=-1;j<=1;j++)
					change(paper,x+i,y+j,1);
			break;
		case 3:
			ink(paper,x,y,2);
			change(paper,x-2,y,1);
			change(paper,x+2,y,1);
			change(paper,x,y-2,1);
			change(paper,x,y+2,1);
			break;
	}
}

void change(char paper[][10],int x,int y,int inc){
	if(x>=0&&x<10&&y>=0&&y<10)
		paper[x][y]+=inc;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <complex>
using namespace std;
int main() {
	int paper[14][14] = { 0 };
	int fl, x, y;
	char split;
	while (cin >> y >> split >> x >> split >> fl) {
		if (fl == 2) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
		}
		if (fl == 1) {
			paper[x + 2][y + 2] += 1;
			paper[x + 1][y + 2] += 1;
			paper[x + 2][y + 1] += 1;
			paper[x + 3][y + 1] += 1;
			paper[x + 1][y + 3] += 1;
		}
		if (fl == 3) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
			paper[x][y + 2] += 1;
			paper[x + 4][y + 2] += 1;
			paper[x + 2][y + 4] += 1;
			paper[x + 2][y] += 1;

		}
	}
		int count = 0;
		int ans = 0;
		for (int i = 2;i < 12;i++) {
			for (int j = 2;j < 12;j++) {
				if (paper[i][j] == 0) count += 1;
				ans = max(ans, paper[i][j]);
			}
		}
	cout << count << endl;
	cout << ans << 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[y][x]++;
	}
}

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

C++: #include<iostream>
#include<string>
#include<math.h>
using namespace std;
bool in(int x,int y){
  if(x<0||x>9||y<0||y>9) return false;
  return true;
}
int main(){
  int pa[10][10]={{}};
  string str;
  int i,j;
  while(cin >> str){
    int x=str[0]-'0',y=str[2]-'0',s=str[4]-'0';
    if(s==1){
      for(i=-1;i<=1;i++){
	for(j=-1+abs(i);j<=1-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==2){
      for(i=-1;i<=1;i++){
	for(j=-1;j<=1;j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==3){
      for(i=-2;i<=2;i++){
	for(j=-2+abs(i);j<=2-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }
  }
  int o=0,m=0;
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      //cout << pa[i][j];
      m=max(m,pa[i][j]);
      if(pa[i][j]==0) o++;
    }
    //cout << endl;
  }
  cout << o << endl << m << endl;
  return 0;
}

C++: #include<functional>
#include<algorithm>
#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,x,n) for(int i=x;i<n;i++)
#define pf push_front
#define pb push_back
#define int long long
using namespace std;
const int INF=1000000007;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ex[4]={1,-1,1,-1};
int ey[4]={1,1,-1,-1};
int fx[4]={2,0,-2,0};
int fy[4]={0,2,0,-2};

int mp[20][20]={};

signed main(){
  int x,y,s;
  char z;
  while(cin>>x>>z>>y>>z>>s){
    x--;y--;
    if(s==1){
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
      }
    }
    else if(s==2){
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
        if(y-ey[i]>=0&&x-ex[i]>=0){
          mp[y+ey[i]][x+ex[i]]+=1;
        }
      }
    }
    else{
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
        if(y-ey[i]>=0&&x-ex[i]>=0){
          mp[y+ey[i]][x+ex[i]]+=1;
        }
        if(y-fy[i]>=0&&x-fx[i]>=0){
          mp[y+fy[i]][x+fx[i]]+=1;
        }
      }
    }
  }
  int ans1=0,ans2=0;
  rep(i,10){
    rep(j,10){
      if(mp[i][j]==0)ans1++;
      if(ans2<mp[i][j])ans2=mp[i][j];
    }
  }
  cout<<ans1<<ans2<<endl;
  return 0;
}