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 <cstdio>

using namespace std;

int paper[10][10];

void dropInk(int ary[][2], int size, int x, int y)
{
        int nx, ny;

        for (int i = 0; i < size; i++) {
                nx = x + ary[i][0];
                ny = y + ary[i][1];
                if ((0 <= nx && nx <= 10) && (0 <= ny && ny <= 10)) {
                        paper[nx][ny]++;
                }
        }
}

int main()
{
        int sm[5][2] = {{-1, 0}, {1, 0}, {0, -1},
                                   {0, 0}, {0, 1}},
                md[9][2] = {{-1, -1}, {-1, 0}, {-1, 1},
                                   {0, -1}, {0, 0}, {0, 1},
                                   {1, -1}, {1, 0}, {1, 1}},
                lr[13][2] = {{-2, 0}, {-1, -1}, {-1, 0}, {-1, 1},
                                        {0, -2}, {0, -1}, {0, 0}, {0, 1}, {0, 2}                                                      ,
                                        {1, -1}, {1, 0}, {1, 1}, {2, 0}};
        int x, y, s;

        for (int i = 0; i < 10; i++) {
                for (int j = 0; j < 10; j++) {
                        paper[i][j] = 0;
                }
        }
        while (scanf("%d%*c%d%*c%d", &x, &y, &s) != EOF) {
                switch (s) {
                case 1:
                        dropInk(sm, 5, x, y);
                        break;
                case 2:
                        dropInk(md, 9, x, y);
                        break;
                default:
                        dropInk(lr, 13, x, y);
                        break;
                }
        }

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

        return 0;
}

C++: #include<stdio.h>
bool rangeCheck(int x,int y){
    if(x >= 0 && x <= 9 && y>=0 && y <= 9)return true;
    else{
        return false;
    }
}
int main(){
	int x,y,s,i,j;
	int p[10][10];
	for(i=0;i<10;i++)
		for(j=0;j<10;j++)
			p[i][j]=0;
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s==1){
			p[x][y]++;            
			if(rangeCheck(x,y-1))p[x][y-1]++;
            if(rangeCheck(x,y+1))p[x][y+1]++;
            if(rangeCheck(x-1,y))p[x-1][y]++;
            if(rangeCheck(x+1,y))p[x+1][y]++;}
		if(s==2){
			p[x][y]++;            
			if(rangeCheck(x-1,y-1))p[x-1][y-1]++;
            if(rangeCheck(x,y-1))p[x][y-1]++;
            if(rangeCheck(x+1,y-1))p[x+1][y-1]++;
            if(rangeCheck(x-1,y))p[x-1][y]++;
            if(rangeCheck(x+1,y))p[x+1][y]++;
            if(rangeCheck(x-1,y+1))p[x-1][y+1]++;
            if(rangeCheck(x,y+1))p[x][y+1]++;
            if(rangeCheck(x+1,y+1))p[x+1][y+1]++;}
		if(s==3){
			p[x][y]++;
		    if(rangeCheck(x-1,y-1))p[x-1][y-1]++;
            if(rangeCheck(x,y-1))p[x][y-1]++;
            if(rangeCheck(x+1,y-1))p[x+1][y-1]++;
            if(rangeCheck(x-1,y))p[x-1][y]++;
            if(rangeCheck(x+1,y))p[x+1][y]++;
            if(rangeCheck(x-1,y+1))p[x-1][y+1]++;
            if(rangeCheck(x,y+1))p[x][y+1]++;
            if(rangeCheck(x+1,y+1))p[x+1][y+1]++;
            if(rangeCheck(x,y-2))p[x][y-2]++;
            if(rangeCheck(x-2,y))p[x-2][y]++;
            if(rangeCheck(x+2,y))p[x+2][y]++;
            if(rangeCheck(x,y+2))p[x][y+2]++;}}
	int max=0,sum=0;
	for(i=0;i<10;i++)
		for(j=0;j<10;j++){
			if(p[i][j]>max)max=p[i][j];
			if(p[i][j]==0)sum++;}
	printf("%d\n%d\n",sum,max);
	return 0;}

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

#define scanf scanf_s
#define SIZE 10

using namespace std;

int map[SIZE][SIZE];

void drop(int x, int y) {
	if (x < 0 || y < 0 || x >= SIZE || y >= SIZE) return;

	map[x][y]++;
}

int main() {
	int x, y, s, count = 0, most = 0;

	while (scanf("%d,%d,%d", &x, &y, &s)) {
		x--;
		y--;
		drop(x, y);
		drop(x, y + 1);
		drop(x + 1, y);
		drop(x, y - 1);
		drop(x - 1, y);

		if (s > 1) {
			drop(x + 1, y + 1);
			drop(x + 1, y - 1);
			drop(x - 1, y - 1);
			drop(x - 1, y + 1);

			if (s > 2) {
				drop(x, y + 2);
				drop(x, y - 2);
				drop(x + 2, y);
				drop(x - 2, y);
			}
		}
	}

	for (int i = 0; i < SIZE; i++) {
		for (int j = 0; j < SIZE; j++) {
			if (map[i][j] > most) {
				most = map[i][j];
			}

			if (map[i][j] == 0) {
				count++;
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}