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>
using namespace std;

int pa[20][20];

int main(void)
{
	int x,y,c;

	while(scanf("%d,%d,%d", &x,&y,&c) != EOF){

		if(c == 1){
			for(int i = -1; i <= 1; i++){
				pa[y][x-i]++;
				pa[y-i][x]++;

			}
			pa[y][x]--;
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
		}
		else if(c == 3){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
			pa[y+2][x+2]++;
			pa[y+2][x-2]++;
			pa[y-2][x-2]++;
			pa[y-2][x+2]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 1; i <= 10; i++){
		for(int j = 1; j <= 10; j++){
			if(pa[i][j] > 0)
				count++;
			if(max < pa[i][j])
				max = pa[i][j];
		}
	}
	count = 100 - count;
	cout << count << endl << max << endl;


	return 0;
}

C++: #include <stdio.h>
int main(){
    int a[14][14],x,y,k,ans=0,top=0;
    for(int i=0;i<14;i++)
        for(int j=0;j<14;j++)
            a[i][j]=0;
    while(scanf("%d,%d,%d",&x,&y,&k)!=EOF){
        a[x+1][y+2]++;
        a[x+2][y+2]++;
        a[x+3][y+2]++;
        a[x+2][y+1]++;
        a[x+2][y+3]++;
        if(k>1){
            a[x+3][y+3]++;
            a[x+1][y+1]++;
            a[x+3][y+1]++;
            a[x+1][y+3]++;
        }
        if(k>2) {
            a[x+4][y+2]++;
            a[x][y+2]++;
            a[x+2][y]++;
            a[x+2][y+4]++;
        }
    }
    for(int i=2;i<12;i++){
        for(int j=2;j<12;j++){
            if(a[i][j]==0)ans++;
            if(a[i][j]>top)top=a[i][j];
        }
    }
    printf("%d\n%d\n",ans,top);
}

C++: #include<iostream>
#include<cstdio>
int masu[11][11]={0};
int nx[4]={0,1,0,-1};
int ny[4]={-1,0,1,0};
int nxx[4]={0,2,0,-2};
int nyy[4]={-2,0,2,0};
int maxs=0,siro=100,dx,dy;
void sho(int x,int y);
void tyu(int x,int y);
void dai(int x,int y);
void hikakua(int x,int y,int i,int j);
void hikakub(int dx,int dy);
using namespace std;
int x,y,size;
main(){
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    if(size==1){
      sho(x,y);
    }
    else if(size==2){
      tyu(x,y);
    }
    else if(size==3){
      dai(x,y);
    }
  }
  cout<<siro<<endl<<maxs<<endl;
  return 0;
}
void sho(int x,int y){
  masu[y][x]=masu[y][x]+1;
  hikakub(x,y);
  for(int i=0;i<4;i++){
    dx=x+nx[i];
    dy=y+ny[i];
    if(dx<10&&dx>=0&&dy<10&&dy>=0){
      masu[dy][dx]=masu[dy][dx]+1;
      hikakub(dx,dy);
    }
  }
  return;
}
void tyu(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(x<10||x>=0||y<10||y>=0){
	masu[y+i][x+j]=masu[y+i][x+j]+1;
	hikakua(x,y,i,j);
      }
    }
  }
  return;
}
void dai(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(x<10||x>=0||y<10||y>=0){
	masu[y+i][x+j]=masu[y+i][x+j]+1;
	hikakua(x,y,i,j);
      }
    }
  }
  for(int i=0;i<4;i++){
    dx=x+nxx[i];
    dy=y+nyy[i];
    if(dx<10||dx>=0||dy<10||dy>=0){
      masu[dy][dx]=masu[dy][dx]+1;
      hikakub(dx,dy);
    }
  }
  return;
}
void hikakua(int x,int y,int i,int j){
  if(masu[y+i][x+j]==1){
    siro=siro-1;
  }
  if(maxs<masu[y+i][x+j]){
    maxs=masu[y+i][x+j];
  }
  return;
}
void hikakub(int dx,int dy){
  if(masu[dy][dx]==1){
    siro=siro-1;
  }
  if(maxs<masu[dy][dx]){
    maxs=masu[dy][dx];
  }
  return;
}

C++: #include <iostream>
#include <string>
#include <math.h>
#include <stdio.h>
#include <ctype.h>

using namespace std;

int main() {
    int a[10][10]={0};
    int x,y,size;
    while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
        //size=1
        if(size >= 1){
            a[x][y]++;
            if(x-1>-1){
                a[x-1][y]++;
            }
            if(y-1>-1){
                a[x][y-1]++;
            }
            if(x+1<10){
                a[x+1][y]++;
            }
            if(y+1<10){
                a[x][y+1]++;
            }
        }
        //size=2
        if(size >= 2){
            if(x-1>-1&&y-1>-1){
                a[x-1][y-1]++;
            }
            if(x+1<10&&y-1>-1){
                a[x+1][y-1]++;
            }
            if(x+1<10&&y+1<10){
                a[x+1][y+1]++;
            }
            if(x-1>-1&&y+1<10){
                a[x-1][y+1]++;
            }
        }
        //size=3
        if(size >= 3){
            if(x-2>-1){
                a[x-2][y]++;
            }
            if(y-2>-1){
                a[x][y-2]++;
            }
            if(x+2<10){
                a[x+2][y]++;
            }
            if(y+2<10){
                a[x][y+2]++;
            }
        }
    }
    int white=0;
    int max=0;
    for(int i=0; i<10; i++){
        for(int j=0; j<10; j++){
            if(a[i][j]==0){
                white++;
            }
            if(a[i][j]>max){
                max=a[i][j];
            }
        }
    }
    cout<<white<<endl<<max<<endl;
    return 0;
}

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

int cnt[10][10];

int main() {
	int x, y, s; char c;
	while(cin >> x >> c >> y >> c >> s) {
		for(int i = 0; i < 10; i ++)
			for(int j = 0; j < 10; j ++)
				if(s == 2) {
					if(abs(x - i) <= 1 && abs(y - j) <= 1)
						cnt[i][j] ++;
				} else {
					if(abs(x - i) + abs(y - j) <= s / 2 + 1)
						cnt[i][j] ++;
				}
	}
	auto a = (int*)cnt;
	cout << count(a, a + 100, 0) << '\n';
	cout << *max_element(a, a + 100) << '\n';
	return 0;
}