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 main(){
  int k[10][10]={0};
  int x,y,s,i,j;
  char c;
  int d=0,w=0;
  int S[4]={0,5,9,13};
  int X[]={0,1,-1,0,0,1,-1,1,-1,2,-2,0,0};
  int Y[]={0,0,0,1,-1,1,-1,-1,1,0,0,2,-2};
  while(cin>>x>>c>>y>>c>>s){
    for(i=0;i<S[s];i++){
      
      if(-1<x&&x<10){
	if(-1<y&&y<10){
	
	  k[x+X[i]][y+Y[i]]++;
	  if(k[x+X[i]][y+Y[i]]>d){
	    d=k[x+X[i]][y+Y[i]];
	  }
	}
      }
    }
  }
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(k[i][j]==0)w++;
    }
  }
  if(d!=0){
    cout<<w<<"\n"<<d<<endl;
  }
  return 0;
}

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

int main(){
  int x,y,size;
  int map[10][10]={};
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    switch(size){
    case 3:
      if(x>1) map[x-2][y]++;
      if(x<8) map[x+2][y]++;
      if(y>1) map[x][y-2]++;
      if(y<8) map[x][y+2]++;
    case 2:
      if(x>0 && y>0) map[x-1][y-1]++;
      if(x>0 && y<9) map[x-1][y+1]++;
      if(x<9 && y>0) map[x+1][y-1]++;
      if(x<9 && y<9) map[x+1][y+1]++;
    case 1:
      map[x][y]++;
      if(x>0) map[x-1][y]++;
      if(x<9) map[x+1][y]++;
      if(y>0) map[x][y-1]++;
      if(y<9) map[x][y+1]++;
    }
  }
  int max=0;
  int clear=0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(map[i][j]==0) clear++;
      if(max < map[i][j]) max= map[i][j];
    }
  }
  cout<<clear<<endl<<max<<endl;
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int x[2000][2000], a, b, c, sum, maxn; char f;
int main() {
	while (cin >> a >> f >> b >> f >> c) {
		for (int i = -c; i <= c; i++) {
			for (int j = -c; j <= c; j++) {
				if (a + i >= 0 && b + j >= 0) {
					if (i + j >= -c && i + j <= c) {
						x[a + i][b + j]++;
					}
				}
			}
		}
	}
	sum = 0;
	maxn = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (x[i][j] == 0) { sum++; }
			maxn = max(maxn, x[i][j]);
		}
	}
	cout << sum << endl << maxn << endl;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int map[10][10];
    int white = 0;
    int max_den = 0;
    int x, y, size;
    char comma;
    
    for (int i = 0; i < 10; i++) 
        for (int j = 0; j < 10; j++)
            map[i][j] = 0;

    while (cin >> x >> comma >> y >> comma >> size) {
        if (size == 1) {  // 小
            for (int i = -1; i <= 1; i++) {
                for (int j = -1; j <= 1; j++) {
                    if ((i == -1 && j == -1) || (i == 1 && j == -1) ||
                        (i == -1 && j == 1) || (i == 1 && j == 1)) 
                        continue;
                    
                    if ((x + i < 0) || (x + i > 9) || 
                        (y + j < 0) || (y + j > 9))
                        continue;

                    map[x + i][y + j]++;
                }
            }
        }
        else if (size == 2 || size == 3) {  // 中
            for (int i = -1; i <= 1; i++) {
                for (int j = -1; j <= 1; j++) {
                    if ((x + i < 0) || (x + i > 9) || 
                        (y + j < 0) || (y + j > 9))
                        continue;

                    map[x + i][y + j]++;
                }
            }
        }

        if (size == 3) {
            if (y >= 0 && y <= 9) {
                if (x - 2 >= 0 && x - 2 <= 9)
                    map[x - 2][y]++;
                if (x + 2 >= 0 && x + 2 <= 9)
                    map[x + 2][y]++;
            }
            if (x >= 0 && x <= 9) {
                if (y - 2 >= 0 && y - 2 <= 9)
                    map[x][y - 2]++;
                if (y + 2 >= 0 && y + 2 <= 9)
                    map[x][y + 2]++;
            }
        }
    }

    for (int i = 0; i < 10; i++)
        for (int j = 0; j < 10; j++) {
            if (map[i][j] == 0)
                white++;
            else
                max_den = max(max_den, map[i][j]);
        }

    cout << white << '\n' << max_den << endl;

    return 0;
}

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

int paper[10][10]={0};

void small_ink(int x,int y){
  paper[y][x]++;
  if(x+1<10)paper[y][x+1];
  if(x-1>=0)paper[y][x-1];
  if(y+1<10)paper[y+1][x];
  if(y-1>=0)paper[y-1][x];
}
void midium_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
}
void big_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
  for(int i=-1;i<2;i=i+2){
    for(int j=-1;j<2;j=j+2){
      if(y+i*2>=0 && y+i*2<10 && x+j*2>=0 && x+j*2<10)paper[y+i*2][x+j*2]++;
    }
  }
}

int main(){
  int x,y,s;
  int white=0;
  int darkest=0;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    if(s==1)small_ink(x,y);
    else if(s==2)midium_ink(x,y);
    else if(s==3)big_ink(x,y);
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(paper[i][j]==0)white++;
      if(paper[i][j]>darkest)darkest=paper[i][j];
    }
  }
  cout<<white<<endl<<darkest<<endl;
}