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<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){
      if(y+i*2>=0 && y+i*2<10)paper[y+i*2][x]++;
  }
  for(int i=-1;i<2;i=i+2){
      if(x+i*2>=0 && x+i*2<10)paper[y][x+i*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>
#include<stdio.h>
#include<math.h>
#include<vector>
using namespace std;
int main() {
	int i,j,k,l,m,n,o,x,y,z;
	int max = 0;
	int count = 0;
	vector< vector<int> > s;
	s.resize(14);
	for (i = 0; i < 14; i++) {
		s[i].resize(14);
	}
	for (j = 0; j < 14; j++) {
		for (k = 0; k < 14; k++) {
			s[j][k] = 0;
		}
	}
	while (scanf("%d,%d,%d", &x, &y, &z)!=EOF) {
		if (z == 1) {
			s[x + 2][y + 2] += 1;
			s[x + 1][y + 2] += 1;
			s[x + 3][y + 2] += 1;
			s[x + 2][y + 1] += 1;
			s[x + 2][y + 3] += 1;
		}
		else if (z == 2) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
				}
			}
		}
		else if (z == 3) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
					s[x][y + 2] += 1;
					s[x + 4][y + 2] += 1;
					s[x + 2][y] += 1;
					s[x + 2][y + 4] += 1;
				}
			}
		}
	}
	for (n = 2; n < 12; n++) {
		for (o = 2; o < 12; o++) {
			if (max < s[n][o]) {
				max = s[n][o];
			}
			if (s[n][o] == 0) {
				count += 1;
			}
		}
	}
	printf("%d\n", count);
	printf("%d\n", max);
	return 0;
}

C++: #include <iostream>
#include <stack>

using namespace std;

void Solution()
{

    int ink[][2] = {{0,0}, {-1, 0}, {1, 0}, {0, -1}, {0, 1}, {-1, -1}, {-1, 1}, {1, -1}, {1, 1}, {-2, 0}, {2, 0}, {0, 2}, {0, -2}}; // range from small size to big size
    
    int x;
    int y;
    int size;
    char comma;
    
    int a[10][10] = {0}; // the boundary, +1 for judging the spread of ink
    
    int count = 0;
    int density = 0;
    
    while (cin>>x>>comma>>y>>comma>>size)
    {
        for (int i = 0; i <= size * 4; i++)
        {
            if (x + ink[i][0] < 10 && x + ink[i][0] >= 0 && y + ink[i][1] < 10 && y + ink[i][1] >= 0)
            {
                a[x + ink[i][0]][y + ink[i][1]]++;
            }
        
        }
        
    }
    
    for (int i = 0; i < 10; i++)
    {
        for (int j = 0; j < 10; j++)
        {
            if(a[i][j] > 0)
            {
                count = count+1;
            }
            
            if (a[i][j] > density)
            {
                density = a[i][j];
            }
        }
    }

    
    cout<<100 - count<<endl;
    cout<<density<<endl;

}

int main()
{
    Solution();
    return 0;
}

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

int small[3][3] = {0, 1, 0,
		   1, 1, 1,
		   0, 1, 0};
int normal[3][3] = {1, 1, 1,
		    1, 1, 1,
		    1, 1, 1};
int big[5][5] = {0, 0, 1, 0, 0,
		 0, 1, 1, 1, 0,
		 1, 1, 1, 1, 1,
		 0, 1, 1, 1, 0,
		 0, 0, 1, 0, 0};

int map[10][10];
int x, y, size;
int white = 0;
int black = 0;

int main(){
	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		switch(size){
			case 1:
				for(int i = 0; i < 3; i++){
					for(int j = 0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += small[i][j];
					}
				}
				break;
			case 2:
				for(int i =0; i < 3; i++){
					for(int j=0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += normal[i][j];
					}
				}
				break;
			case 3:
				for(int i=0; i < 5; i++){
					for(int j=0; j < 5; j++){
						if(0 <= x-2+i && x-2+i < 10 && 0 <= y-2+j && y-2+j < 10)
							map[x-2+i][y-2+j] += big[i][j];
					}
				}
				break;
		}
	}
	for(int i=0; i < 10; i++){
		for(int j=0; j < 10; j++){
			if(map[i][j] == 0) white++;
			black = max(black, map[i][j]);
		}
	}

	cout << white << endl;
	cout << black << endl;

}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int x,y,s;
int a[15][15]={0};
int main()
{
    while(scanf("%d,%d,%d",&x,&y,&s)!=EOF)
    {
        swap(x,y);
        a[x][y]++;
        if(x>0)a[x-1][y]++;
        if(y>0)a[x][y-1]++;
        a[x+1][y]++;
        a[x][y+1]++;
        if(s>1)
        {
            if(x>0&&y>0)a[x-1][y-1]++;
            if(x>0)a[x-1][y+1]++;
            if(y>0)a[x+1][y-1]++;
            a[x+1][y+1]++;
        }
        if(s>2)
        {
            if(x>1)a[x-2][y]++;
            if(y>1)a[x][y-2]++;
            a[x+2][y]++;
            a[x][y+2]++;
        }
    }
    int ans=0,mx=0;
    for(int i=0;i<10;i++)
        for(int j=0;j<10;j++)
        {
            if(a[i][j]==0)ans++;
            if(a[i][j]>mx)mx=a[i][j];
        }
    cout<<ans<<endl<<mx<<endl;
}

C++: #include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int p[10][10] = {}, x, y, s;
  char c1, c2;
  while (cin >> x >> c1 >> y >> c2 >> s) {
    int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0},
        dy[] = {0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2};
    ++p[y][x];
    for (int i = 0; i < 4 * s; ++i) {
      int nx = x + dx[i], ny = y + dy[i];
      if (nx < 0 || 10 <= nx || ny < 0 || 10 <= ny)
        continue;
      ++p[ny][nx];
    }
  }

  int ans1 = 0, ans2 = 0;
  for (int y = 0; y < 10; ++y) {
    for (int x = 0; x < 10; ++x) {
      if (p[y][x] == 0)
        ++ans1;
      ans2 = max(p[y][x], ans2);
    }
  }

  cout << ans1 << endl << ans2 << endl;
}