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\n", count, max)
}

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

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

void drop_ink(int x,int y,int size) {
	if (size == 1) {
		for (int i = 0; i < 3; i++) {
			if (x + i - 1 >= 0 && y >= 0)paper[x + i - 1][y] += 1;
		}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y + i - 1 >= 0) {
				if (y + i - 1 != y)paper[x][y + i - 1] += 1;
			}
		}
	}
	else if (size == 2) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y - 1 + i >= 0) {
				paper[x][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
				}
			}
	}
	else if (size == 3) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
			}
		}
		for (int i = 0; i < 5; i++) {
			if (x >= 0 && y - 2 + i >= 0) {
				paper[x][y - 2 + i] += 1;
			}
		}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
			}
		}
		if (x + 2 >= 0 && y >= 0)paper[x + 2][y] += 1;
		if (x - 2 >= 0 && y >= 0)paper[x - 2][y] += 1;
	}
}
int main() {
	char x[1], y[1], size[1]; char tem[5];
	int white = 0; int most_intense=0;
	while(cin>>tem) {
		x[0] = tem[0]; y[0] = tem[2]; size[0] = tem[4];
		drop_ink(atoi(x),atoi(y),atoi(size));
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[j][i] == 0)white += 1;
			if (most_intense < paper[j][i])most_intense = paper[j][i];
		}
	}
	cout << white << endl << most_intense ;
	return 0;
}

C++: #include<iostream>
#include<string>
int mem[14][14] = {}, i = 0, X[50], Y[50], S[50];
int main() {
	int x;
	char b;
	while (1) {
		int y, s;
		std::cin >>x>> b >> y >> b >> s;
		Y[i] = y, S[i] = s;
		X[i] = x;
		if (s == 0)
			break;
		i += 1;
	}
	for(int a=0;a<i;a+=1)
	if (S[a] == 1) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
	}
	else if (S[a] == 2) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
		mem[X[a] + 1][Y[a] + 1] += 1;
		mem[X[a] + 1][Y[a] + 3] += 1;
		mem[X[a] + 3][Y[a] + 1] += 1;
		mem[X[a] + 3][Y[a] + 3] += 1;
	}
	else if (S[a] == 3) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
		mem[X[a] + 1][Y[a] + 1] += 1;
		mem[X[a] + 1][Y[a] + 3] += 1;
		mem[X[a] + 3][Y[a] + 1] += 1;
		mem[X[a] + 3][Y[a] + 3] += 1;
		mem[X[a]][Y[a] + 2] += 1;
		mem[X[a] + 4][Y[a] + 2] += 1;
		mem[X[a]][Y[a] + 4] += 1;
		mem[X[a] + 4][Y[a] + 2] += 1;
	}
	int flag = 0, max = 0;
	for (int i = 0; i < 10; i += 1)
		for (int j = 0; j < 10; j += 1) {
			if (0 == mem[i + 2][j + 2])
				flag += 1;
			if (max < mem[i + 2][j + 2])
				max = mem[i + 2][j + 2];
		}
	std::cout << flag+1 << std::endl;
	std::cout << max << std::endl;
	return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

int fie[20][20]={};


void paint(int x,int y,int size){
    int dx[]={0,1,0,-1,0, 1,1,-1,-1, 2,0,-2,0};
    int dy[]={0,0,1,0,-1, 1,-1,1,-1, 0,2,0,-2};
    int n;
    if(size==1)n=5;
    else if(size==2)n=9;
    else if(size==3)n=13;
    
    rep(i,n){
        if( 0<=x+dx[i] && x+dx[i]<10  &&  0<=y+dy[i] && y+dy[i]<10 ){
            fie[ x+dx[i] ][ y+dy[i] ]++;
        }
    }
}



int main(){
    int x,y,size;
    char ch;
    while(cin>>x>>ch>>y>>ch>>size){
        paint(x,y,size);
    }
    
    int c=0;
    int maxi=-1;
    rep(i,10){
        rep(j,10){
            if(fie[i][j]==0)c++;
            maxi = max(maxi,fie[i][j]);
        }
    }
    cout<<c<<endl;
    cout<<maxi<<endl;
}