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;
	
	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]);
			}
		}
	}
}
///////////////////////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=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 <stdio.h>
int main(){
    int a[14][14],x,y,k,ans=0,top=0;
    for(int i=0;i<14;i++)
        for(int j=0;j<14;j++)
            a[i][j]=0;
    while(scanf("%d,%d,%d",&x,&y,&k)!=EOF){
        a[x+1][y+2]++;
        a[x+2][y+2]++;
        a[x+3][y+2]++;
        a[x+2][y+1]++;
        a[x+2][y+3]++;
        if(k>1){
            a[x+3][y+3]++;
            a[x+1][y+1]++;
            a[x+3][y+1]++;
            a[x+1][y+3]++;
        }
        if(k>2) {
            a[x+4][y+2]++;
            a[x][y+2]++;
            a[x+2][y]++;
            a[x+2][y+4]++;
        }
    }
    for(int i=2;i<12;i++){
        for(int j=2;j<12;j++){
            ans+=a[i][j];
            if(a[i][j]>top)top=a[i][j];
        }
    }
    printf("%d\n%d\n",ans,top);
}

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

int main(void){
	int map[10][10];
	int x,y,s;
	int n=0,m=0;
	memset(map,0,sizeof(map));
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s>=1){
			map[x][y]+=1;
			map[x-1][y]+=1;
			map[x+1][y]+=1;
			map[x][y-1]+=1;
			map[x][y+1]+=1;
		}
		if(s>=2){
			map[x-1][y-1]+=1;
			map[x+1][y-1]+=1;
			map[x-1][y+1]+=1;
			map[x+1][y+1]+=1;
		}
		if(s>=3){
			map[x][y-2]+=1;
			map[x][y+2]+=1;
			map[x-2][y]+=1;
			map[x+2][y]+=1;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(map[i][j]==0)n++;
			if(map[i][j]>m)m=map[i][j];
		}
	}
	printf("%d\n",n);
	printf("%d\n",m);
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
	int paper[10][10] = {};
	int x, y, siz;
	char c;
	while (cin >> x >> c >> y >> c >> siz) {
		switch (siz) {
			case 3:
				paper[y-2][x] ++;
				paper[y][x-2] ++;
				paper[y][x+2] ++;
				paper[y+2][x] ++;
			case 2:
				paper[y-1][x-1] ++;
				paper[y-1][x+1] ++;
				paper[y+1][x-1] ++;
				paper[y+1][x+1] ++;
			case 1:
				paper[y-1][x] ++;
				paper[y][x-1] ++;
				paper[y][x] ++;
				paper[y][x+1] ++;
				paper[y+1][x] ++;
		}
	}
	int empty = 0, mx = 0;
	for (int i=0; i<10; ++i) {
		for (int j=0; j<10; ++j) {
			empty += !paper[i][j];
			mx = max(mx, paper[i][j]);
		}
	}
	cout << empty << endl;
	cout << mx << endl;

	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

constexpr auto N=10;

int main()
{
  int p[N*N]={};
  vector<int> inc[] = {
    { -N, -1, 0, 1, N },
    { -N-1, -N, -N+1, -1, 0, 1, N-1, N, N+1 },
    { -N-N, -N-1, -N, -N+1, -2, -1, 0, 1, 2, N-1, N, N+1, N+N }
  };

  int x, y, s;
  while( scanf( "%d,%d,%d", &x, &y, &s ) != EOF ) {
    {
      auto const base = y*N+x;
      for( auto const i : inc[s-1] ) {
        if ( base+i >= 0 && base+i < N*N )
          ++p[base+i];
      }
    };
  }
  cout
    << count( p, p+N*N, 0 ) << endl
    << *max_element( p, p+N*N ) << endl;
}