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;
void big(int x,int y,int a[10][10]);
void middle(int x,int y,int a[10][10]);
void small(int x,int y,int a[10][10]);
int main(){
	int a[10][10]={0};
	int x,y,s;
	char c;
	int cnt=0,max=0;
	while(cin>>x>>c>>y>>c>>s){
	if(s==3)big(x,y,a);
	else if(s==2)middle(x,y,a);
	else if(s==1)small(x,y,a);
	
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)cnt++;
			if(a[i][j]>max)max=a[i][j];
			//cout<<a[i][j]<<" ";
		}
		//cout<<endl;
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

void big(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x-2][y]++;a[x][y-2]++;
	a[x-1][y]++;a[x][y-1]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x+2][y]++;a[x][y+2]++;	
	a[x+1][y+1]++;a[x-1][y-1]++;
	a[x+1][y-1]++;a[x-1][y+1]++;
	return ;
}

void middle(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x-1][y]++;a[x][y-1]++;
	a[x+1][y+1]++;a[x-1][y-1]++;
	a[x+1][y-1]++;a[x-1][y+1]++;
}
void small(int x,int y,int a[10][10]){
	a[x][y]++;
	a[x+1][y]++;a[x][y+1]++;
	a[x-1][y]++;a[x][y-1]++;
}

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

class Paper
{
private :
    int data [10] [10];
private :
    static auto isValidX (int x) -> bool
    {
        return 0 <= x && x < 10;
    }
    static auto isValidY (int y) -> bool
    {
        return 0 <= y && y < 10;
    }
public :
    Paper ()
        : data {{{}}}
    {
    }
    auto increase (int x , int y) -> void
    {
        if (isValidX (x) && isValidY (y))
        {
            ++ data [x] [y];
        }
    }
    auto dropSmall (int x, int y) -> void
    {
        increase (x , y);
        increase (x - 1 , y);
        increase (x + 1 , y);
        increase (x , y - 1);
        increase (x , y + 1);
    }
    auto dropMidium (int x , int y) -> void
    {
        dropSmall (x , y);
        increase (x - 1 , y - 1);
        increase (x + 1 , y - 1);
        increase (x - 1 , y + 1);
        increase (x + 1 , y + 1);
    }
    auto dropLarge (int x , int y) -> void
    {
        dropMidium (x , y);
        increase (x - 2 , y);
        increase (x + 2 , y);
        increase (x , y - 2);
        increase (x , y + 2);
    }
    auto getResult () -> std::pair <int , int>
    {
        int zeroCellNum = 0;
        int maxValue = 0;
        for (auto && line : data)
        {
            for (auto && elem : line)
            {
                zeroCellNum += (elem == 0);
                maxValue = std::max (maxValue , elem);
            }
        }
        return std::make_pair (zeroCellNum , maxValue);
    }
};

auto main () -> int
{
    Paper paper;
    int x , y , size;
    while (std::scanf ("%d,%d,%d" , & x , & y , & size) == 3)
    {
        switch (size)
        {
        case 1:
            paper.dropSmall (x , y);
            break;
        case 2:
            paper.dropMidium (x , y);
            break;
        case 3:
            paper.dropLarge (x , y);
            break;
        }
    }
    auto res = paper.getResult ();
    std::cout << res.first << std::endl;
    std::cout << res.second << std::endl;
}

C++: #include <cstdio>

using namespace std;

const int MAX = 10;

int map[MAX][MAX] = {0};

const int def[12][2] = {
  {1, 0}, {-1, 0}, {0, 1}, {0, -1},
  {1, 1}, {-1, 1}, {1, 1}, {1, -1},
  {2, 0}, {-2, 0}, {0, 2}, {0, -2}
};

void drop(int *p, int size) {
  int x , y;
  for (int i = 0; i < size * 4; i++) {
    x = p[0] + def[i][0];
    y = p[1] + def[i][1];
    if (x < MAX && x >= 0 && y < MAX && y >= 0)
      map[x][y] += 1;
  }
}

int main() {
  
  int p[2], size, sum, max;

  while (scanf("%d,%d,%d", &p[0], &p[1], &size) != EOF)
    drop(p, size);

  for (int i = sum = max = 0; i < MAX; i++) {
    for (int j = 0; j < MAX; j++) {
      if (map[i][j] == 0) sum++;
      if (map[i][j] > max) max = map[i][j];
    }
  }
  printf("%d\n%d\n", sum, max);
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int char_to_int(char c) {
    if (c == '0')return 0;
    else if (c == '1')return 1;
    else if (c == '2')return 2;
    else if (c == '3')return 3;
    else if (c == '4')return 4;
    else if (c == '5')return 5;
    else if (c == '6')return 6;
    else if (c == '7')return 7;
    else if (c == '8')return 8;
    else if (c == '9')return 9;
}
int p[11][11];
int main() {
	string str;
	while(cin >> str){
		int x = char_to_int(str[0]);
        int y = char_to_int(str[2]);
        int s = char_to_int(str[4]);
        if(s>=1){
        	p[x][y]++;
        	if(x-1>=0)p[x-1][y]++;
        	if(x+1<=9)p[x+1][y]++;
        	if(y-1>=0)p[x][y-1]++;
        	if(y+1<=9)p[x][y+1]++;
        	if(s>=2){
        		if(x-1>=0&&y-1>=0)p[x-1][y-1]++;
        		if(x-1>=0&&y+1<=9)p[x-1][y+1]++;
        		if(x+1<=9&&y-1>=0)p[x+1][y-1]++;
        		if(x+1<=9&&y+1<=9)p[x+1][y+1]++;
        		if(s>=3){
        		 	if(x+2>=0)p[x-2][y]++;
        			if(x+2<=9)p[x+2][y]++;
        			if(y-2>=0)p[x][y-2]++;
        			if(y+2<=9)p[x][y+2]++;
        		}
        	}
        }
	}
	int sum=0,dr=0;
	for (int i = 0; i < 10; i++){
        for (int j = 0; j < 10; j++) {
            if (p[i][j] == 0)sum++;
            dr = max(dr, p[i][j]);
        }
    }
    cout<<sum<<endl<<dr<<endl;
	return 0;
}