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 <string>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <iomanip>
#include <vector>
#include <queue>

#define PI 3.14159265359

#define INF 1000000;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)

typedef long long ll;

using namespace std;


/*
class ElectronicPetEasy
{
public:
	string isDifficult(int st1, int p1, int t1, int st2, int p2, int t2)
	{
		
	}
};
*/




int main()
{
	int vx[]={ 0, 1,-1, 0, 0,-1,-1, 1, 1, 2,-2, 0, 0};
	int vy[]={ 0, 0, 0, 1,-1,-1, 1,-1, 1, 0, 0, 2,-2};
	int x, y, size, grid[10][10], nm_ans = 0, max_ans = 0;
	
	//grid初期化
	for (int i=0; i<10; i++)
	{
		for (int j=0; j<10; j++)
		{
			grid[i][j] = 0;
		}
	}
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF)
	{
		switch (size)
		{
		case 1:
			for (int i=0; i<5; i++)
			{
				if ((min(x+vx[i], y+vy[i]) >= 0) && (max(x+vx[i], y+vy[i]) < 10))
				{
					grid[x+vx[i]][y+vy[i]]++;
				}
			}
			break;
		case 2:
			for (int i=0; i<9; i++)
			{
				if ((min(x+vx[i], y+vy[i]) >= 0) && (max(x+vx[i], y+vy[i]) < 10))
				{
					grid[x+vx[i]][y+vy[i]]++;
				}
			}
			break;
		case 3:
			for (int i=0; i<13; i++)
			{
				if ((min(x+vx[i], y+vy[i]) >= 0) && (max(x+vx[i], y+vy[i]) < 10))
				{
					grid[x+vx[i]][y+vy[i]]++;
				}
			}
			break;
		}
	}
	
	for (int i=0; i<10; i++)
	{
		for (int j=0; j<10; j++)
		{
			max_ans = max(max_ans, grid[i][j]);
			if (grid[i][j] == 0) nm_ans++;
		}
	}
	
	cout << nm_ans << endl;
	cout << max_ans << endl;
	
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#define PAPER_C 10
#define PAPER_R 10
using namespace std;
void drop(int p[PAPER_C][PAPER_R], int x,int y){
	if(0<=x && x<PAPER_R && 0<=y && y<PAPER_C){
		p[y][x]++;
	}
	return;
}
int main(){
	int paper[PAPER_C][PAPER_R] = {0};
	int i, j, x, y, size, cnt, max;
	max = 0;
	cnt = PAPER_C * PAPER_R;
	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		if(size == 1){
			drop(paper, x, y);
			drop(paper, x-1, y);
			drop(paper, x+1, y);
			drop(paper, x, y-1);
			drop(paper, x, y+1);
		}else if(size == 2){
			for(i=-1;i<2;i++){
				for(j=-1;j<2;j++){
					drop(paper, x+j, y+i);
				}
			}
		}else if(size == 3){
			for(i=-1;i<2;i++){
				for(j=-1;j<2;j++){
					drop(paper, x+j, y+i);
				}
			}
			drop(paper, x-2, y);
			drop(paper, x+2, y);
			drop(paper, x, y-2);
			drop(paper, x, y+2);
		}
	}
	for(i=0;i<PAPER_C;i++){
		for(j=0;j<PAPER_R;j++){
			if(paper[i][j] != 0){
				cnt--;
				if(paper[i][j] > max){
					max = paper[i][j];
				}
			}
		}
	}
	cout << cnt << endl;
	cout << max << endl;
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <stdio.h>
using namespace std;
int main(){
	int x,y,s,count=0;
	int paper[14][14] = {0};
	while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
		if(s==1 || s==2 || s==3){
			paper[x+2][y+2]++;
			paper[x+1][y+2]++;
			paper[x+3][y+2]++;
			paper[x+2][y+1]++;
			paper[x+2][y+3]++;
		}
		if(s==2 || s==3){
			paper[x+1][y+1]++;
			paper[x+1][y+3]++;
			paper[x+3][y+1]++;
			paper[x+3][y+3]++;
		}
		if(s==3){
			paper[x+4][y+2]++;
			paper[x+2][y+4]++;
			paper[x][y+2]++;
			paper[x+2][y]++;
		}
	}
	int a = 1;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(paper[i][j] == 0) count++;
			if(a<paper[i][j]) a = paper[i][j];
		}
	}
	cout<<count<<endl;
	cout<<a<<endl;
	return 0;
}

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

int main(){

	int map[14][14] = {0};
	int x, y, size, m, cnt;
	char cnm;
	
	while(cin >> x >> cnm >> y >> cnm >> size){
		x += 2;
		y += 2;
		switch(size){
			case 3: map[y-2][x]++;
							map[y][x-2]++;
							map[y][x+2]++;
							map[y+2][x]++;
			case 2: map[y-1][x-1]++;
							map[y-1][x+1]++;
							map[y+1][x-1]++;
							map[y+1][x+1]++;
			case 1: map[y][x]++;
							map[y-1][x]++;
							map[y][x-1]++;
							map[y][x+1]++;
							map[y+1][x]++;
							break;
		}
	}
	
	cnt = 0;
	m = 0;
	for(int i=2; i<12; i++){
		for(int j=2; j<12; j++){
			if(map[i][j] == 0) cnt++;
			m = max(m, map[i][j]);
		}
	}
	
	cout << cnt << endl << m << endl;

	return 0;

}

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

int ds[3] = {4,9,13};
int dx[13] = { 0,-1, 0, 1, 0,-1, 1,-1, 1, 0,-2, 2, 0};
int dy[13] = {-1, 0, 0, 0, 1,-1,-1, 1, 1,-2, 0, 0, 2};

int main() {

  int x,y,size;
  char c;
  int map[14][14] = {0};

  int cnt = 0;
  int map_max = 0;

  while( cin >> x >> c >> y >> c >> size ) {

    for ( int i = 0; i < ds[size-1]; i++ ) {

      map[ x+2 + dx[i] ][ y+2 + dy[i] ]++;

    }

  }

  for ( int i = 2; i < 12; i++ ) {
    for ( int j = 2; j < 12; j++ ) {
      
      if ( map[i][j] == 0 ) cnt++;
      map_max = max( map_max, map[i][j] );
      
    }
  }

  cout << cnt << endl << map_max << endl;

  return 0;

}