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 <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	int dx1[] = {0, 1, 0, -1, 0};
	int dy1[] = {0, 0, 1, 0, -1};
	int dx2[] = {0, 0, 0, 1, 1, 1, -1, -1, -1};
	int dy2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	int dx3[] = {0, 0, 0, 0, 0, 1, 1, 1, 2, -1, -1, -1, -2};
	int dy3[] = {-2, -1, 0, 1, 2, -1, 0, 1, 0, -1, 0, 1, 0};

	int a[14][14] = {0};
	int x, y, size;
	char c[2];
	while(cin>>x){
		cin>> c[0]>> y>> c[1]>> size;
		x += 2;
		y += 2;
		switch(size){
			case 1:
				for(int i=0;i<5;i++){
					a[x+dx1[i]][y+dy1[i]]++;
				}
				break;
			case 2:
				for(int i=0;i<9;i++){
					a[x+dx2[i]][y+dy2[i]]++;
				}
				break;
			case 3:
				for(int i=0;i<13;i++){
					a[x+dx3[i]][y+dy3[i]]++;
				}
				break;
			default: 
				cout<< "default"<< endl;
				break;
		}
	}
	int ans = 0;
	int ans2 = 0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(a[i][j] == 0) ans++;
			ans2 = max(ans2, a[i][j]);
		}
	}
	cout<< ans<< endl
	cout<< ans2<< endl;
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

using namespace std;

int main() {

	int hyou[14][14] = {0};

	int a,b,c;
	int counter1 = 0;
	int counter2 = 0;
	char d;

	while (cin >> a >> d >> b >> d >> c) {
		a += 2;
		b += 2;
		if (c == 1) {
			hyou[a][b] += 1;
			hyou[a - 1][b] += 1;
			hyou[a + 1][b] += 1;
			hyou[a][b - 1] += 1;
			hyou[a][b + 1] += 1;
		} else if(c == 2) {
			for (int i = a - 1; i < a + 2; i++) {
				for (int j = b - 1; j < b + 2; j++) {
					hyou[i][j] += 1;
				}
			}
		} else {
			for (int i = a - 1; i < a + 2; i++) {
				for (int j = b - 1; j < b + 2; j++) {
					hyou[i][j] += 1;
				}
			}
			hyou[a - 2][b] += 1;
			hyou[a + 2][b] += 1;
			hyou[a][b - 2] += 1;
			hyou[a][b + 2] += 1;
		}
	}

	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (hyou[i][j] == 0) {
				counter1++;
			}
			counter2 = max(counter2,hyou[i][j]);
		}
	}

	cout << counter1 << endl << counter2 << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
#define W 10+2+2
#define H 10+2+2

int main()
{
  int field[W][H]={0},x,y,size,max,cnt,i,j;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    x+=2;y+=2;
    if(size==1){
      field[x][y]++;
      field[x-1][y]++;
      field[x+1][y]++;
      field[x][y-1]++;
      field[x][y+1]++;
    }else if(size==2){
      field[x][y]++;
      field[x-1][y]++;
      field[x+1][y]++;
      field[x][y-1]++;
      field[x][y+1]++;
      field[x-1][y-1]++;
      field[x-1][y+1]++;
      field[x+1][y-1]++;
      field[x+1][y+1]++;
    }else{
      field[x][y]++;
      field[x-1][y]++;
      field[x+1][y]++;
      field[x][y-1]++;
      field[x][y+1]++;
      field[x-1][y-1]++;
      field[x-1][y+1]++;
      field[x+1][y-1]++;
      field[x+1][y+1]++;
      field[x-2][y]++;
      field[x+2][y]++;
      field[x][y-2]++;
      field[x][y+2]++;
    }
  }
  max=0;
  cnt=0;
  for(i=2;i<12;i++)for(j=2;j<12;j++){
    cnt+=field[i][j]==0;
    if(max<field[i][j])max=field[i][j];
  }
  cout<<cnt<<endl<<max<<endl;
}

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

int board[10][10];

void small(int x, int y){
	board[x][y]++;
	if(x>=1) board[x-1][y]++;
	if(x<=9) board[x+1][y]++;
	if(y>=1) board[x][y-1]++;
	if(y<=9) board[x][y+1]++;
}

void middle(int x, int y){
	small(x, y);
	if(x>=1 && y>=1) board[x-1][y-1]++;
	if(x>=1 && y<=9) board[x-1][y+1]++;
	if(x<=9 && y>=1) board[x+1][y-1]++;
	if(x<=9 && y<=9) board[x+1][y+1]++;
}

void large(int x, int y){
	middle(x, y);
	if(x>=2) board[x-2][y]++;
	if(x<=8) board[x+2][y]++;
	if(y>=2) board[x][y-2]++;
	if(y<=8) board[x][y+2]++;
}

int main(void){
	
	for(int i=0; i<10; i++)
		for(int j=0; j<10; j++)
			board[i][j] = 0;

	int x, y, size;
	char c1, c2;

	while(cin >> x >> c1 >> y >> c2 >> size){
		switch(size){
		case 1:
			small(x, y);
			break;
		case 2:
			middle(x, y);
			break;
		case 3:
			large(x, y);
			break;
		}
	}

	int max = 0;
	int count = 0;

	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if(board[i][j] > max) max = board[i][j];
			if(board[i][j] == 0) count++;
		}
	}

	cout << count << endl << max << endl;

	return 0;
}