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;

const int SMALL = 1;
const int MIDDLE = 2;
const int BIG = 3;
int paper[10][10] = {0};

void Dropping_Ink(int x, int y, int size)
{
		if(x-1 > -1)    paper[y][x-1]++;
		if(x+1 < 10)    paper[y][x+1]++;
		if(y-1 > -1)    paper[y-1][x]++;
		if(y+1 < 10)    paper[y+1][x]++;

		if(size >= MIDDLE)
		{
			if(x-1 > -1)
			{
				if(y-1 > -1)    paper[y-1][x-1]++;
				if(y+1 < 10)    paper[y+1][x-1]++;
			}
			if(x+1 < 10)
			{
				if(y-1 > -1)    paper[y-1][x+1]++;
				if(y+1 < 10)    paper[y+1][x+1]++;
			}
		}

		if(size >= BIG)
		{
			if(x-2 > -1)    paper[y-2][x]++;
			if(x+2 < 10)    paper[y+2][x]++;
			if(y-2 > -1)    paper[y][x-2]++;
			if(y+2 < 10)    paper[y][x+2]++;
		}
}

int main()
{
	int x, y, size, white, color;
	char c[2];

	while(cin >> x >> c[0] >> y >> c[1] >> size)
	{
		if(cin.eof())    break;

		Dropping_Ink(x, y, size);

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

	cout << white << endl << color << endl;
	
	return 0;
}

C++: #include <iostream>

using std::cin;

struct Ink {
    int x;
    int y;
    int size;
};

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

void size1(const Ink& drop);
void size2(const Ink& drop);
void size3(const Ink& drop);

int main()
{
    Ink dropped;
    char ch;
    while (cin >> dropped.x >> ch >> dropped.y >> ch >> dropped.size) {

        if (dropped.size == 1) {
            size1(dropped);
        } else if (dropped.size == 2) {
            size2(dropped);
        } else if (dropped.size == 3) {
            size3(dropped);
        } else {
            std::cout << "ERROR!" << std::endl;
        }
    }

    int white = 0, dropped_max = 0;
    for (auto i = 0; i < PAPER_SIZE; i++) {
        for (auto j = 0; j < PAPER_SIZE; j++) {
            if (paper[i][j] == 0) {
                white++;
            } else if (paper[i][j] > dropped_max) {
                dropped_max = paper[i][j];
            }
        }
    }

    std::cout << white << std::endl << dropped_max << std::endl;

    return 0;
}

void dropInk(const int x, const int y);

void size1(const Ink& dropped)
{
    int x = dropped.x;
    int y = dropped.y;

    dropInk(x, y);
    dropInk(x + 1, y);
    dropInk(x - 1, y);
    dropInk(x, y + 1);
    dropInk(x, y - 1);
}

void size2(const Ink& dropped)
{
    int x = dropped.x;
    int y = dropped.y;

    size1(dropped);
    dropInk(x + 1, y + 1);
    dropInk(x + 1, y - 1);
    dropInk(x - 1, y + 1);
    dropInk(x - 1, y - 1);
}

void size3(const Ink& dropped)
{
    int x = dropped.x;
    int y = dropped.y;

    size2(dropped);
    dropInk(x, y + 2);
    dropInk(x, y - 2);
    dropInk(x + 2, y);
    dropInk(x - 2, y);
}

void dropInk(int x, int y)
{
    if (x >= 0 && x < 10 && y >= 0 && y < 10) {
        paper[x][y]++;
    }
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int x, y, s;
    char c;
    vector<vector<int>> v(14, vector<int>(14, 0));
    while (cin >> x >> c >> y >> c >> s) {
        x += 2; y += 2;
        switch (s) {
            case 3:
                v[x][y-2]++; v[x][y+2]++;
                v[x-2][y]++; v[x+2][y]++;
            case 2:
                v[x-1][y-1]++; v[x-1][y+1]++;
                v[x+1][y-1]++; v[x+1][y+1]++;
            case 1:
                v[x+1][y]++; v[x-1][y]++;
                v[x][y-1]++; v[x][y+1]++;
                break;
        }
    }
    
    int mx = 0, cnt = 0;
    for (int i = 2; i < 12; i++) {
        for (int j = 2; j < 12; j++) {
            mx = max(mx, v[i][j]);
            if (v[i][j] == 0) cnt++;
        }
    }
    cout << cnt << "\n" << mx << endl;
    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>

char *inputStr(char *str, int len) {
	char *rtn;
	if ((rtn = fgets(str, len, stdin)) == NULL) { return NULL; }
	if (str[(len = (strnlen(str, len) - 1))] == '\n') {
		str[len] = '\0';
	} else {
		fflush(stdin);
	}
	return rtn;
}

int inputXYS(int &x, int &y, int &siz) {
	char str[8], *ptok;
	if (inputStr(str, sizeof(str) / sizeof(str[0])) == NULL) { return 1; }
	if ((ptok = strtok(str, ",")) != NULL) {
		x = atoi(ptok);
		if ((ptok = strtok(NULL, ",")) != NULL) {
			y = atoi(ptok);
			if ((ptok = strtok(NULL, ",")) != NULL) {
				siz = atoi(ptok);
			} else {
				return 1;
			}
		} else {
			return 1;
		}
	} else {
		return 1;
	}
	return 0;
}

int main() {
	int bitmap[10][10], max = 0;
	int white = 10 * 10;
	int cx, cy, size, mx, my, i;
	static const int inkX[] = {0,1,0,-1,0,1,-1,-1,1,2,0,-2,0};
	static const int inkY[] = {0,0,1,0,-1,1,1,-1,-1,0,2,0,-2};
	static const int inkN[] = {5, 9, 13};
	for (cx = 0; cx < 10; ++cx) {
		for (cy = 0; cy < 10; ++cy) {
			bitmap[cy][cx] = 0;
		}
	}
	while (inputXYS(cx, cy, size) == 0) {
		for (i = 0; i < inkN[size - 1]; ++i) {
			mx = cx + inkX[i];
			my = cy + inkY[i];
			if (mx < 0 || mx >= 10 || my < 0 || my >= 10) { continue; }
			if (bitmap[my][mx] == 0) {
				--white;
			}
			++bitmap[my][mx];
			if (bitmap[my][mx] > max) {
				max = bitmap[my][mx];
			}
		}
	}
	printf("%d\n%d\n", white, max);
	return 0;
}