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<cstdio>
using namespace std;

int main(){
  int x,y,size;
  int map[10][10]={};
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    switch(size){
    case 3:
      if(x>1) map[x-2][y]++;
      if(x<8) map[x+2][y]++;
      if(y>1) map[x][y-2]++;
      if(y<8) map[x][y+2]++;
    case 2:
      if(x>0 && y>0) map[x-1][y-1]++;
      if(x>0 && y<9) map[x-1][y+1]++;
      if(x<9 && y>0) map[x+1][y-1]++;
      if(x<9 && y<9) map[x+1][y+1]++;
    case 1:
      map[x][y]++;
      if(x>0) map[x-1][y]++;
      if(x<9) map[x+1][y]++;
      if(y>0) map[x][y-1]++;
      if(y<9) map[x][y+1]++;
    }
  }
  int max=0;
  int clear=0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(map[i][j]==0) clear++;
      if(max < map[i][j]) max= map[i][j];
    }
  }
  cout<<clear<<endl<<max<<endl;
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int x[2000][2000], a, b, c, sum, maxn; char f;
int main() {
	while (cin >> a >> f >> b >> f >> c) {
		for (int i = -c; i <= c; i++) {
			for (int j = -c; j <= c; j++) {
				if (a + i >= 0 && b + j >= 0) {
					if (i + j >= -c && i + j <= c) {
						x[a + i][b + j]++;
					}
				}
			}
		}
	}
	sum = 0;
	maxn = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (x[i][j] == 0) { sum++; }
			maxn = max(maxn, x[i][j]);
		}
	}
	cout << sum << endl << maxn << endl;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int map[10][10];
    int white = 0;
    int max_den = 0;
    int x, y, size;
    char comma;
    
    for (int i = 0; i < 10; i++) 
        for (int j = 0; j < 10; j++)
            map[i][j] = 0;

    while (cin >> x >> comma >> y >> comma >> size) {
        if (size == 1) {  // 小
            for (int i = -1; i <= 1; i++) {
                for (int j = -1; j <= 1; j++) {
                    if ((i == -1 && j == -1) || (i == 1 && j == -1) ||
                        (i == -1 && j == 1) || (i == 1 && j == 1)) 
                        continue;
                    
                    if ((x + i < 0) || (x + i > 9) || 
                        (y + j < 0) || (y + j > 9))
                        continue;

                    map[x + i][y + j]++;
                }
            }
        }
        else if (size == 2 || size == 3) {  // 中
            for (int i = -1; i <= 1; i++) {
                for (int j = -1; j <= 1; j++) {
                    if ((x + i < 0) || (x + i > 9) || 
                        (y + j < 0) || (y + j > 9))
                        continue;

                    map[x + i][y + j]++;
                }
            }
        }

        if (size == 3) {
            if (y >= 0 && y <= 9) {
                if (x - 2 >= 0 && x - 2 <= 9)
                    map[x - 2][y]++;
                if (x + 2 >= 0 && x + 2 <= 9)
                    map[x + 2][y]++;
            }
            if (x >= 0 && x <= 9) {
                if (y - 2 >= 0 && y - 2 <= 9)
                    map[x][y - 2]++;
                if (y + 2 >= 0 && y + 2 <= 9)
                    map[x][y + 2]++;
            }
        }
    }

    for (int i = 0; i < 10; i++)
        for (int j = 0; j < 10; j++) {
            if (map[i][j] == 0)
                white++;
            else
                max_den = max(max_den, map[i][j]);
        }

    cout << white << '\n' << max_den << endl;

    return 0;
}

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

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

void small_ink(int x,int y){
  paper[y][x]++;
  if(x+1<10)paper[y][x+1];
  if(x-1>=0)paper[y][x-1];
  if(y+1<10)paper[y+1][x];
  if(y-1>=0)paper[y-1][x];
}
void midium_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
}
void big_ink(int x,int y){
  for(int i=-1;i<2;i++){
    for(int j=-1;j<2;j++){
      if(y+i>=0 && y+i<10 && x+j>=0 && x+j<10)paper[y+i][x+j]++;
    }
  }
  for(int i=-1;i<2;i=i+2){
    for(int j=-1;j<2;j=j+2){
      if(y+i*2>=0 && y+i*2<10 && x+j*2>=0 && x+j*2<10)paper[y+i*2][x+j*2]++;
    }
  }
}

int main(){
  int x,y,s;
  int white=0;
  int darkest=0;
  while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
    if(s==1)small_ink(x,y);
    else if(s==2)midium_ink(x,y);
    else if(s==3)big_ink(x,y);
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(paper[i][j]==0)white++;
      if(paper[i][j]>darkest)darkest=paper[i][j];
    }
  }
  cout<<white<<endl<<darkest<<endl;
}

C++: #include <iostream>
using namespace std;
int cell[30][30];
int main(){
	while(true){
		char dum;
		int x,y,size;
		cin >> x;
		if(cin.eof())break;
		cin >> dum;
		x +=10;
		cin >> y;
		y +=10;
		cin >> dum;
		cin >> size;
		if(size == 1){
			cell[x][y-1]++;cell[x-1][y]++;cell[x][y]++;cell[x+1][y]++;cell[x][y+1]++;
		}
		else if(size == 2){
			for(int i= -1;i<=1;i++)
				for(int j = -1;j<=1;j++)
					cell[x+i][y+j]++;
		
		}
		else
		{
			for(int i= -1;i<=1;i++)
				for(int j = -1;j<=1;j++)cell[x+i][y+j]++;
			cell[x][y-2]++;cell[x-2][y]++;cell[x+2][y]++;cell[x][y+2]++;
		}
	}
	int max = 0,empty = 0;
	for(int i=10;i<=19;i++)
		for(int j = 10;j<=19;j++)
		{
			if(cell[i][j] == 0) empty++;
			else if(max < cell[i][j]) max=cell[i][j];
		}
	cout << empty << endl;
	cout << max << endl;
	return 0;
}