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 <vector>
#include <algorithm>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif


void ink_small(int w, int h, std::vector<int> &image, int x, int y){
	image[y * w + x]++;

	if(y - 1 >= 0){
		image[(y - 1) * w + x]++;
	}
	if(y + 1 < h){
		image[(y + 1) * w + x]++;
	}
	if(x - 1 >= 0){
		image[y * w + x - 1]++;
	}
	if(x + 1 < w){
		image[y * w + x + 1]++;
	}

	return;
}

void ink_middle(int w, int h, std::vector<int> &image, int x, int y){

	ink_small(w, h, image, x, y);

	if((y - 1) >= 0){
		if((x - 1) >= 0){
			image[(y - 1) * w + x - 1]++;
		}
		if((x + 1) < w){
			image[(y - 1) * w + x + 1]++;
		}
	}
	if((y + 1) < h){
		if((x - 1) >= 0){
			image[(y + 1) * w + x - 1]++;
		}
		if((x + 1) < w){
			image[(y + 1) * w + x + 1]++;
		}
	}

	return;
}

void ink_large(int w, int h, std::vector<int> &image, int x, int y){
	ink_middle(w, h, image, x, y);

	if((y - 2) >= 0){
		image[(y - 2) * w + x]++;
	}
	if((y + 2) < h){
		image[(y + 2) * w + x]++;
	}
	if((x - 2) >= 0){
		image[y * w + x - 2]++;
	}
	if((x + 2) < w){
		image[y * w + x + 2]++;
	}

	return;
}

void print(int w, int h, const std::vector<int> &image){
	for(int y = 0; y < h; y++){
		int offset = y * w;
		for(int x = 0; x < w; x++){
			std::cout << image[offset + x];
		}
		std::cout << std::endl;
	}
	return;
}

int main(int argc, char **argv){
	int w = 10;
	int h = 10;
	std::vector<int> image(w * h, 0);
	int x, y, s;
	char tmp;
	int count_zero = 0;
	int max = 0;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	while(ifs >> x >> tmp >> y >> tmp >> s){
#else
	while(std::cin >> x >> tmp >> y >> tmp >> s){
#endif
		
		if(s == 1){
			ink_small(w, h, image, x, y);
		}
		else if(s == 2){
			ink_middle(w, h, image, x, y);
		}
		else{
			ink_large(w, h, image, x, y);
		}

		//print(w, h, image);
	}

	for(int y = 0; y < h; y++){
		int offset = y * w;
		for(int x = 0; x < w; x++){
			int val = image[offset + x];
			if(val == 0){
				count_zero++;
			}
			max = std::max(max, val);
		}
	}

	std::cout << count_zero << std::endl;
	std::cout << max << std::endl;
	
	return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int p[10][10];
int dx[] = { 0, 0, -1, 1, -1, -1, 1, 1, 0, 0, -2, 2 };
int dy[] = { -1, 1, 0, 0, -1, 1, -1, 1, -2, 2, 0, 0 };
int main() {
  int x, y, s;
  while (~scanf("%d,%d,%d", &x, &y, &s)) {
    p[y][x]++;
    for (int i = 0; i < s * 4; ++i) {
      int px = x + dx[i];
      int py = y + dy[i];
      if (px >= 0 && px < 10 && py >= 0 && py < 10) {
        p[py][px]++;
      }
    }
  }
  int dv = 0, mv = 0;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      if (p[j][i] == 0) dv++;
      mv = max(p[j][i], mv);
    }
  }
  printf("%d\n%d\n", dv, mv);
}

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

using namespace std;

int main() {
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size,mx,my;
	int dx[] = {0,-1,1,0,-1,1,-1,1,0,-2,2,0};
	int dy[] = {-1,0,0,1,-1,-1,1,1,-2,0,0,2};
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		for (int i=0; i<size*4; i++) {
			mx=x+dx[i];
			my=x+dy[i];
			if (mx>=0&&mx<10&&my>=0&&my<10) p[mx][my]++;
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) c++;
			else if (p[i][j]>m) m=p[i][j];
		}
	}
	cout << c << endl;
	cout << m << endl;
	return 0;
}

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

#pragma warning(disable : 4996)

int x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q))
	{
		if (q == 1)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (abs(i) + abs(j) <= 1)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}

		if (q == 2)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
					{
						ok[y + i][x + j]++;
					}
				}
			}
		}

		if (q == 3)
		{
			for (int i = -2; i <= 2; i++)
			{
				for (int j = -2; j <= 2; j++)
				{
					if (abs(i) + abs(j) <= 2)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}
	}

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (ok[i][j] == 0)
			{
				r1++;
			}

			if (ok[i][j] > r2)
			{
				r2 = ok[i][j];
			}
		}
	}

	printf("%d\n", r1);
	printf("%d\n", r2);

	return 0;
}

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

int main() {
	int x,y,s;
	int p[14][14]={0};
	while(scanf("%d,%d,%d",&x,&y,&s)>0){
		x+=2;y+=2;
		p[x][y]+=1;
		p[x+1][y]+=1;p[x][y-1]+=1;
		p[x][y+1]+=1;p[x-1][y]+=1;
		if(s==1) continue;
		p[x+1][y+1]+=1;p[x+1][y-1]+=1;
		p[x-1][y+1]+=1;p[x-1][y-1]+=1;
		if(s==2) continue;
		p[x+2][y]+=1;p[x-2][y]+=1;
		p[x][y+2]+=1;p[x][y-2]+=1;
	}
	int cnt=0,max=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(p[j][i]==0) cnt++;
			if(max<p[j][i]) max=p[j][i];
		}
	}
	cout<<cnt<<endl<<max<<endl;
	return 0;
}

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

int pa[20][20];

int main(void)
{
	int x,y,c;

	while(scanf("%d,%d,%d", &x,&y,&c) != EOF){
		x += 5;
		y += 5;

		if(c == 1){
			for(int i = -1; i <= 1; i++){
				pa[y][x-i]++;
				pa[y-i][x]++;

			}
			pa[y][x]--;
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
		}
		else if(c == 3){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
			pa[y+2][x+2]++;
			pa[y+2][x-2]++;
			pa[y-2][x-2]++;
			pa[y-2][x+2]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 1+5; i <= 10+5; i++){
		for(int j = 1+5; j <= 10+5; j++){
			if(pa[i][j] > 0)
				count++;
			if(max < pa[i][j])
				max = pa[i][j];
		}
	}
	count = 100 - count;
	cout << count << endl << max << endl;


	return 0;
}