Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int x,y,size,maxm,cnt;
int t[10][10];
char ch;
void pl(int y,int x){
  if(y<0||y==10||x<0||x==10)return;
  t[y][x]++;
  maxm=max(maxm,t[y][x]);
}

int main(){
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      t[i][j]=0;
  maxm=-1;
  while(cin>>x>>ch>>y>>ch>>size){
    if(size==1){
      pl(y,x),pl(y+1,x),pl(y-1,x),pl(y,x+1),pl(y,x-1);
    }else if(size==2){
      for(int i=y-1;i<y+2;i++){
	for(int j=x-1;j<x+2;j++){
	  pl(i,j);
	}
      }
    }else{
      for(int i=y-2;i<y+3;i++){
	for(int j=x-2;j<x+3;j++){
	  if((i-y)*(i-y)+(j-x)*(j-x)<=4)pl(i,j);
	}
      }
    }
  }
  cnt=0;
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      if(t[i][j]==0)cnt++;
  cout<<cnt<<endl;
  cout<<maxm<<endl;
  return 0;
}

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;
}