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 (nx >= 0 && ny >= 0) {
                        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<string>
#include<cstdio>
#include<iostream>

using namespace std;
 
int main(){
	int a[15][15]={0};
	int x,y,s;

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		a[x+2][y+2]++; a[x+1][y+2]++; a[x+3][y+2]++; a[x+2][y+1]++; a[x+2][y+3]++;
		if(1<s){ a[x+1][y+1]++; a[x+3][y+3]++; a[x+1][y+3]++; a[x+3][y+1]++; }
		if(2<s){ a[x][y+2]++; a[x+4][y+2]++; a[x+2][y]++; a[x+2][y+4]++; }
	}

	int br=0, max=0;
	for(int i=2; i<12; i++){
		for(int j=2; j<12; j++){
			if(0==a[i][j]) br++;
			if(max<a[i][j]) max=a[i][j];
		}
	}

		cout<<br<<endl;
		cout<<max<<endl;

    return 0;
}

C++: #include <iostream>

using namespace std;

int paper[10][10];

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

void drop_small(int x, int y) {
    paper[y][x]++;
    int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
    for (int i = 0; i < 4; i++) {
        paper[ y+dy[i] ][ x+dx[i] ]++;
    }
}

void drop_middle(int x, int y) {
    drop_small(x, y);
    int dx[4] = {1, 1, -1, -1}, dy[4] = {1, -1, 1, -1};
    for (int i = 0; i < 4; i++) {
        paper[ y+dy[i] ][ x+dx[i] ]++;
    }
}
    
void drop_large(int x, int y) {
    drop_middle(x, y);
    int dx[4] = {2, 0, -2, 0}, dy[4] = {0, 2, 0, -2};
    for (int i = 0; i < 4; i++) {
        paper[ y+dy[i] ][ x+dx[i] ]++;
    }
}

int main() {
    init();
    int x, y, s;
    char d;
    while (cin >> x >> d >> y >> d >> s) {
        switch (s) {
            case 1:
                drop_small(x, y);
                break;
            case 2:
                drop_middle(x, y);
                break;
            case 3:
                drop_large(x, y);
                break;
        }
    }

    int most = 0;
    int clean = 0;

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

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