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>

using namespace std;

int ans;
int ans_max;
int map[10][10];
int x,y,s;

///////////////////////serch1////////////////////
void serch1(int xx,int yy)
{
	map[xx][yy]=-1;
	ans++;
	
	int dx[4]={1,0,-1,0};
	int dy[4]={0,1,0,-1};
/*
	getchar();
	
	system("cls");
	
	for(int i=0;i<10;i++)
	{
		for(int j=0;j<10;j++)
		{
			cout << map[j][i] << " " ;
		}
		cout << endl;
	}
	cout << ans << endl;
//*/
	if(map[xx+1][yy]!=0 && map[xx][yy+1]!=0 && map[xx-1][yy]!=0 && map[xx][yy-1]!=0)
	{
		return ;
	}
	
	
	for(int i=0;i<4;i++)
	{
		if(xx+dx[i]>=0 && yy+dy[i]>=0 && xx+dx[i]<10 && yy+dy[i]<10)
		{
			if(map[xx+dx[i]][yy+dy[i]]==0)
			{
				serch1(xx+dx[i],yy+dy[i]);
			}
		}
	}
}
///////////////////////serch2////////////////////
void serch2(int xx2,int yy2,int way)
{
	if(way==99)
		return ;
	if(ans_max<map[xx2][yy2])
		ans_max=map[xx2][yy2];
	
	map[xx2][yy2]=-2;
	
	int dx[4]={1,0,-1,0};
	int dy[4]={0,1,0,-1};
	
	for(int i=0;i<4;i++)
	{
		if(xx2+dx[i]>=0 && yy2+dy[i]>=0 && xx2+dx[i]<10 && yy2+dy[i]<10)
		{
			if(map[xx2+dx[i]][yy2+dy[i]]!=-2)
			{
				serch2(xx2+dx[i],yy2+dy[i],way+1);
			}
		}
	}
}
///////////////////////s_s////////////////////
void s_s(int s_x,int s_y)
{
	map[s_x][s_y]++;
	
	int dx[4]={1,0,-1,0};
	int dy[4]={0,1,0,-1};
	
	for(int i=0;i<4;i++)
	{
		if(s_x+dx[i]>=0 && s_y+dy[i]>=0 && s_x+dx[i]<10 && s_y+dy[i]<10)
			map[s_x+dx[i]][s_y+dy[i]]++;
	}
	
	return ;
}
///////////////////////s_m////////////////////
void s_m(int m_x,int m_y)
{
	map[m_x][m_y]++;
	int dx[8]={1,0,-1,0,-1,1,1,-1};
	int dy[8]={0,1,0,-1,-1,1,-1,1};
	
	for(int i=0;i<8;i++)
	{
		if(m_x+dx[i]>=0 && m_y+dy[i]>=0 && m_x+dx[i]<10 && m_y+dy[i]<10)
			map[m_x+dx[i]][m_y+dy[i]]++;
	}
	return ;
}
///////////////////////s_l////////////////////
void s_l(int l_x,int l_y)
{
	map[l_x][l_y]++;
	int dx[12]={1,0,-1,0,1,-1,-1,1,2,0,-2,0};
	int dy[12]={0,1,0,-1,-1,1,-1,1,0,2,0,-2};
	
	for(int i=0;i<12;i++)
	{
		if(l_x+dx[i]>=0 && l_y+dy[i]>=0 && l_x+dx[i]<10 && l_y+dy[i]<10)
			map[l_x+dx[i]][l_y+dy[i]]++;
	}
	return ;
}


int main()
{
	int i,j;
	char a;
	
	for(i=0;i<10;i++)
		for(j=0;j<10;j++)
			map[i][j]=0;
	
	for(;cin >> x ;)
	{
		cin >> a >> y >> a >> s ;
		if(s==1)
		{
			s_s(x,y);
		}
		else if(s==2)
		{
			s_m(x,y);
		}
		else if(s==3)
		{
			s_l(x,y);
		}
	}
	
	ans=0;
	ans_max=0;
	
	for(i=0;i<10;i++)
	{
		for(j=0;j<10;j++)
		{
			if(map[i][j]==0)
			{
				serch1(i,j);
			}
		}
	}
	
	serch2(0,0,0);
	
	cout << ans << "\n" << ans_max << endl;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int f[10][10];

int main()
{
	int x,y,s;
	int sx[]={-1,0,1,0},sy[]={0,1,0,-1},
			mx[]={-1,-1,-1,0,0,1,1,1},my[]={-1,0,1,-1,1,-1,0,1},
			lx[]={-2,-1,-1,-1,0,0,0,0,1,1,1,2},ly[]={0,-1,0,1,-2,-1,1,2,-1,0,1,0};

	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF)
	{
		f[y][x]++;
		if(s==1)
		{
			for (int i = 0; i < 4; ++i)
			{
				int nx=x+sx[i],ny=y+sy[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)
				{
					f[ny][nx]++;
				}
			}
		}
		else if(s==2)
		{
			for (int i = 0; i < 8; ++i)
			{
				int nx=x+mx[i],ny=y+my[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)
				{
					f[ny][nx]++;
				}
			}
		}
		else
		{
			for (int i = 0; i < 12; ++i)
			{
				int nx=x+lx[i],ny=y+ly[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)
				{
					f[ny][nx]++;
				}
			}
		}
	}
	int ans=0,zero=0;
	for (int i = 0; i < 10; ++i)
	{
		for (int j = 0; j < 10; ++j)
		{
			ans=max(ans,f[i][j]);
			if(f[i][j]==0) zero++;
		}
	}
	cout<<zero<<endl;
	cout<<ans<<endl;
	return 0;
}

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

int main() {
  int x, y, s;
  int nd[] = {5, 9, 13};
  int smallX[] = {0, -1, 0, 1, 0};
  int smallY[] = {-1, 0, 0, 0, 1};
  int mediumX[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
  int mediumY[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1};
  int largeX[] = {0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0};
  int largeY[] = {-2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2};
  int *dropX[3] = {smallX, mediumX, largeX};
  int *dropY[3] = {smallY, mediumY, largeY};
  int paper[10][10];
  int dx, dy;
  int count;
  int max;

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

  while (scanf("%d,%d,%d", &x, &y, &s) == 3) {
    --s;
    for (int i=0; i<nd[s]; i++) {
      dx = x + dropX[s][i];
      dy = y + dropY[s][i];
      if (dx>=0 && dx<10 && dy>=0 && dy<10) ++paper[dx][dy];
    }
  }

  count = 0;
  max = 0;
  for (int i=0; i<10; i++) {
    for (int j=0; j<10; j++) {
      if (!paper[i][j]) count++;
      if (paper[i][j] > max) max = paper[i][j];
    }
  }
  printf("%d\n", count);
  printf("%d\n", max);

  return 0;
}