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<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 
 using namespace std;
 
 double abs(double x)
 {
   if(x<0) return -x;
   else return x;       
 }
 
 bool judge(int x,int y)
 {
   if(x>=0&&x<10&&y>=0&&y<10) return true;
   else return false;     
 }
  
 int main()
 {
   int map[10][10]={{0}};
   int x,y,s;
   int dep=0;
   int blank=0;
   char temp,temp2;
   while(cin>>x>>temp>>y>>temp2>>s)
   {
     if(s==1)
     {
       if(judge(x-1,y)) map[x-1][y]++;
       if(judge(x+1,y)) map[x+1][y]++;
       if(judge(x,y+1)) map[x][y+1]++;
       if(judge(x,y-1)) map[x][y-1]++;
       if(judge(x,y)) map[x][y]++;        
     }                   
     else if(s==2)
     {
       for(int i=-1;i<=1;i++)
       {
         for(int j=-1;j<=1;j++)
         {
           if(judge(x+i,y+j)) map[x+i][y+j]++;       
         }        
       }     
     }
     else
     {
       for(int i=-1;i<=1;i++)
       {
         for(int j=-1;j<=1;j++)
         {
           if(judge(x+i,y+j)) map[x+i][y+j]++;       
         }        
       }   
       if(judge(x-2,y)) map[x-2][y]++;
       if(judge(x+2,y)) map[x+2][y]++;
       if(judge(x,y+2)) map[x][y+2]++;
       if(judge(x,y-2)) map[x][y-2]++;    
     }
   }
   for(int i=0;i<10;i++)
   {
     for(int j=0;j<10;j++)
     {
       if(!map[i][j]) blank++;
       if(map[i][j]>dep) dep=map[i][j];        
     }        
   }
   cout<<blank<<endl;
   cout<<dep<<endl;
   //while(1);      
   return 0;    
 }

C++: #include<iostream>

using namespace std;

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

void serch1(int xx,int yy)
{
	map[xx][yy]=-1;
	
	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)
			{
				ans++;
				serch1(xx+dx[i],yy+dy[i]);
			}
		}
	}
}
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);
			}
		}
	}
}
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 ;
}
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 ;
}
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=1;
	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 <stdio.h>
using namespace std;

int main()
{
	int size, x, y, coord[10][10], noink, max;

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

C++: #include<iostream>

using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(cin>>x>>c>>y>>c>>s){
		
		while(1){
			data[x][y]++;
			if(y-1>=0)data[x][y-1]++;
			if(x+1<10)data[x+1][y]++;
			if(y+1<10)data[x][y+1]++;
			if(x-1>=0)data[x-1][y]++;
			if(s==1)break;
			if(x+1<10 && y+1<10)data[x+1][y+1]++;
			if(x+1<10 && y-1>=0)data[x+1][y-1]++;
			if(x-1>=0 && y-1>=0)data[x-1][y-1]++;
			if(x-1>=0 && y+1<10)data[x-1][y+1]++;
			if(s==2)break;
			if(x+2<10)data[x+2][y]++;
			if(y-2>=0)data[x][y-2]++;
			if(y+2<10)data[x][y+2]++;
			if(x-2>=0)data[x-2][y]++;
			break;
		}
		
	}
	int white=0,ma=0;
	for(int i=0;i<i<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<" "<<ma<<endl;
}