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", count, max)
}

C++: #include <iostream>
#include <cstdio>
#include <math.h>
#include <vector>

using namespace std;

int main(void){
    int a[10][10]={0};
    int x,y,size;
    char z;
    
    while (cin>>x>>z>>y>>z>>size) {
        a[y][x]+=1;
        if (size==1)
        {
            if(x+1<10){a[y][x+1]+=1;}
            if(y+1<10){a[y+1][x]+=1;}
            if(0<=x-1){a[y][x-1]+=1;}
            if(0<=y-1){a[y-1][x]+=1;}
        }
        else if (size==2)
        {
            if(x+1<10){a[y][x+1]+=1;}
            if(y+1<10){a[y+1][x]+=1;}
            if(0<=x-1){a[y][x-1]+=1;}
            if(0<=y-1){a[y-1][x]+=1;}
            if(0<=y-1 && 0<=x-1){a[y-1][x-1]+=1;}
            if(0<=y-1 && x+1<10){a[y-1][x+1]+=1;}
            if(y+1<10 && 0<=x-1){a[y+1][x-1]+=1;}
            if(y+1<10 && x+1<10){a[y+1][x+1]+=1;}
        }
        else
        {
            if(y+1<10){a[y+1][x]+=1;}
            if(y+2<10){a[y+2][x]+=1;}
            if(x+1<10){a[y][x+1]+=1;}
            if(x+2<10){a[y][x+2]+=1;}
            if(0<=x-1){a[y][x-1]+=1;}
            if(0<=x-2){a[y][x-2]+=1;}
            if(0<=y-1){a[y-1][x]+=1;}
            if(0<=y-2){a[y-2][x]+=1;}
            if(0<=y-1 && 0<=x-1){a[y-1][x-1]+=1;}
            if(0<=y-1 && x+1<10){a[y-1][x+1]+=1;}
            if(y+1<10 && 0<=x-1){a[y+1][x-1]+=1;}
            if(y+1<10 && x+1<10){a[y+1][x+1]+=1;}
        }
    }
    int sum=0,age=0;
    for(int i=0; i<10; i++)
    {
        for (int j=0; j<10; j++)
        {
            if(a[i][j]==0){sum++;}
            if(age<a[i][j]){age=a[i][j];}
        }
    }
    
    printf("%d\n%d\n",sum,age);
    
    return 0;
}

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

using namespace std;

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

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		x = x + 2;
		y = y + 2;
		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 = 2; i < 12; i ++){
		for(j = 2; j < 12; 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 <cstring>
#include <cstdio>

using namespace std;

int main(void){
  int i,j;
  int field[16][16]={0};
  int x,y;
  int size;
  int max=0;
  int none=0;

  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    if(size>=1){
      field[x+2][y+2]++;
      field[x+1][y+2]++;
      field[x+3][y+2]++;
      field[x+2][y+1]++;
      field[x+2][y+3]++;
    }
    if(size>=2){
      field[x+1][y+1]++;
      field[x+1][y+3]++;
      field[x+3][y+1]++;
      field[x+3][y+3]++;
    }
    if(size>=3){
      field[x+2][y]++;
      field[x+2][y+4]++;
      field[x][y+2]++;
      field[x+4][y+2]++;
    }
  }

  for(i=2;i<12;i++){
    for(j=2;j<12;j++){
      if(field[i][j]>max){
	max=field[i][j];
      }
      if(field[i][j]==0){
	none++;
      }
    }
  }

  cout<<none<<endl;
  cout<<max<<endl;

  return(0);
}

C++: #include<iostream>
using namespace std;
int mas[10][10]={{0}};
void dot(int x,int y){
  if(x>=0&&y>=0&&x<=9&&y<=9) mas[y][x]++;
}
void small(int x,int y){
  dot(x,y);
  dot(x+1,y);
  dot(x,y+1);
  dot(x-1,y);
  dot(x,y-1);
}
void mid(int x,int y){
  small(x,y);
  dot(x+1,y+1);
  dot(x-1,y-1);
  dot(x+1,y-1);
  dot(x-1,y+1);
}
void big(int x,int y){
  mid(x,y);
  dot(x+2,y);
  dot(x-2,y);
  dot(x,y+2);
  dot(x,y-2);
}
int main(){
  int count=0,max=0,x,y,size;
  char a,b;
  while(cin>>x>>a>>y>>b>>size){
    if(size==1) small(x,y);
    else if(size==2) mid(x,y);
    else big(x,y);
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j]==0) count++;
      if(mas[i][j]>max) max = mas[i][j];
    }
  }
  cout << count << endl << max << endl;
  return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int mp[100][100];
  int x,y,size;
  int siro=100;
  int kosa=0;
  for(int i=20;i<30;i++){
    for(int j=20;j<30;j++){
      mp[i][j]=0;
    }
  }

  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    x=x+20;
    y=y+20;
    if(size==1){
      if(20<=x && x<=29 && 20<=y && y<=29){
	mp[x][y]++;
	mp[x+1][y]++;
	mp[x][y+1]++;
	mp[x-1][y]++;
	mp[x][y-1]++;
      }
    }
    else if(size==2){
      if(20<=x && x<=29 && 20<=y && y<=29){
	mp[x][y]++;
	mp[x][y-1]++;
	mp[x+1][y-1]++;
	mp[x+1][y]++;
	mp[x+1][y+1]++;
	mp[x][y+1]++;
	mp[x-1][y+1]++;
	mp[x-1][y]++;
	mp[x-1][y-1]++;
      }
    }
    else if(size==3){
      if(20<=x && x<=29 && 20<=y && y<=29){
	mp[x][y]++;
	mp[x][y-1]++;
	mp[x+1][y-1]++;
	mp[x+1][y]++;
	mp[x+1][y+1]++;
	mp[x][y+1]++;
	mp[x-1][y+1]++;
	mp[x-1][y]++;
	mp[x-1][y-1]++;
	mp[x][y-2]++;
	mp[x+2][y]++;
	mp[x][y+2]++;
	mp[x-2][y]++;
      }
    }
  }
  for(int i=20;i<30;i++){
    for(int j=20;j<30;j++){
      if(mp[i][j]!=0) siro--;
      if(kosa<mp[i][j]) kosa=mp[i][j];
    }
  }
  printf("%d\n",siro);
  printf("%d\n",kosa);
}