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 <cmath>
#include <iostream>

#pragma warning(disable : 4996)

int x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q))
	{
		x--; y--;

		if (q == 1)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (abs(i) + abs(j) <= 1)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}

		if (q == 2)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
					{
						ok[y + i][x + j]++;
					}
				}
			}
		}

		if (q == 3)
		{
			for (int i = -2; i <= 2; i++)
			{
				for (int j = -2; j <= 2; j++)
				{
					if (abs(i) + abs(j) <= 2)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}
	}

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (ok[i][j] == 0)
			{
				r1++;
			}

			if (ok[i][j] > r2)
			{
				r2 = ok[i][j];
			}
		}
	}

	printf("%d\n", r1);
	printf("%d\n", r2);

	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

#define M 14

int main() {
	int A[M][M] = {};

	for (int x, y, size; scanf("%d,%d,%d", &x, &y, &size) != EOF&&x;) {
		x += 2; y += 2;
		A[x][y]++;
		A[x + 1][y]++;
		A[x][y + 1]++;
		A[x - 1][y]++;
		A[x][y - 1]++;
		if (size == 1)continue;
		A[x + 1][y + 1]++;
		A[x + 1][y - 1]++;
		A[x - 1][y + 1]++;
		A[x - 1][y - 1]++;
		if (size == 2)continue;
		A[x + 2][y]++;
		A[x][y + 2]++;
		A[x - 2][y]++;
		A[x][y - 2]++;
	}

	int cnt = 100, MAX = 0;

	for (int x = 0; x < 10; x++) {
		for (int y = 0; y < 10; y++) {
			if (A[x + 2][y + 2]) {
				cnt--;
				MAX = max(MAX, A[x + 2][y + 2]);
			}
		}
	}
	cout << cnt << endl;
	cout << MAX << endl;
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int pos[10][10];
/*void p(){
	for(int i=0;i<10;++i){
		for(int j=0;j<10;++j){
			cout<<pos[i][j]<<" ";
		}
		cout<<endl;
	}
	cout<<endl;
}*/
main(){
	int tmp[3],ink2[3]={1,1,2};
	int ink[3][5][5]={
		{{0,1,0,0,0},{1,1,1,0,0},{0,1,0,0,0},{0,0,0,0,0},{0,0,0,0,0}},
		{{1,1,1,0,0},{1,1,1,0,0},{1,1,1,0,0},{0,0,0,0,0},{0,0,0,0,0}},
		{{0,0,1,0,0},{0,1,1,1,0},{1,1,1,1,1},{0,1,1,1,0},{0,0,1,0,0}}
	};
	for(int i=0;i<10;++i)
		for(int j=0;j<10;++j)
			pos[i][j]=0;
	for(int loop=0;loop<6;++loop){
		scanf("%d,%d,%d",&tmp[0],&tmp[1],&tmp[2]);
		for(int i=0;i<5;++i){
			for(int j=0;j<5;++j){
				int t[2]={tmp[0]-ink2[tmp[2]-1]+i,tmp[1]-ink2[tmp[2]-1]+j};
				if(t[0]>=0 && t[0]<=9 && t[1]>=0 && t[1]<=9){
					pos[t[0]][t[1]]+=ink[tmp[2]-1][i][j];
				}
			}
		}
	}
	int ans[2]={0,0};
	for(int i=0;i<10;++i){
		for(int j=0;j<10;++j){
			if(pos[i][j]==0)ans[0]++;
			ans[1]=max(pos[i][j],ans[1]);
		}
	}
	cout<<ans[0]<<" "<<ans[1]<<endl;
}

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

int main(){
	int x,y,board[12][12],c=0,k=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			board[i][j]=0;
		}
	}	
	char input[5];
	while( scanf("%s",&input)!=EOF){
		x=input[0]-'0';
		y=input[2]-'0';
		if(input[4]=='1'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
		}
		if(input[4]=='2'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
			board[x+1][y+1]++;
			board[x-1][y-1]++;
			board[x-1][y+1]++;
			board[x+1][y-1]++;
		}
		if(input[4]=='3'){
			board[x][y]++;
			board[x+1][y]++;
			board[x-1][y]++;
			board[x][y+1]++;
			board[x][y-1]++;
			board[x+1][y+1]++;
			board[x-1][y-1]++;
			board[x-1][y+1]++;
			board[x+1][y-1]++;
			board[x+2][y]++;
			board[x-2][y]++;
			board[x][y+2]++;
			board[x][y-2]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(board[i][j]==0){
				c++;
			}
			if(board[i][j]>k){
				k=board[i][j];
			}
		}
	}
	printf("%d\n%d\n",c,k);
	
			
	return 0;
}

C++: #include<iostream>
#include<vector>
#include <algorithm>
#include<stdio.h>
int main(){
	std::vector<std::vector<int>> vec(10,std::vector<int>(10,0));
	while(1){
		int x,y,size;
		scanf("%d,%d,%d",&x,&y,&size);
		//std::cin>>x>>y>>size;
		if(scanf.eof())break;
		//if(x==0&&y==0&&size==0)break;
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
	}
	std::cout<<no<<std::endl;
	sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;
	return 0;
}

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

int ary[10][10];
int dx[20]={0,1,0,-1,0,1,-1,-1,1,2,0,-2,0};
int dy[20]={0,0,1,0,-1,1,1,-1,-1,0,2,0,-2};
int main(){
	int x,y,s;

	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		for(int i=0;i<=s*4;i++){
			if(0<=x+dx[i]&&x+dx[i]<10&&0<=y+dy[i]&&y+dy[i]<10){
				ary[x+dx[i]][y+dy[i]]++;
			}
		}
	}
	int cnt=0,res=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(ary[i][j]==0) cnt++;
			res=max(res,ary[i][j]);
		}
	}
	cout<<cnt<<endl<<res<<endl;
	return 0;
}