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<cstdio>
#include<array>
using namespace std;
void center(array<int, 100> &a, int x, int y){
  a[y*10+x]++;
}
void left(array<int, 100> &a, int x, int y){
  if(x>0){a[y*10+x-1]++;}
}
void right(array<int, 100> &a, int x, int y){
  if(x<9){a[y*10+x+1]++;}
}
void up(array<int, 100> &a, int x, int y){
  if(y>0){a[(y-1)*10+x]++;}
}
void down(array<int, 100> &a, int x, int y){
  if(y<9){a[(y+1)*10+x]++;}
}
void leftup(array<int, 100> &a, int x, int y){
  if(x>0&&y>0){a[(y-1)*10+x-1]++;}
}
void rightup(array<int, 100> &a, int x, int y){
  if(x<9&&y>0){a[(y-1)*10+x+1]++;}
}
void rightdown(array<int, 100> &a, int x, int y){
  if(x<9&&y<9){a[(y+1)*10+x+1]++;}
}
void leftdown(array<int, 100> &a, int x, int y){
  if(x>0&&y<9){a[(y+1)*10+x-1]++;}
}
void leftleft(array<int, 100> &a, int x, int y){
  if(x>1){a[y*10+x-2]++;}
}
void rightright(array<int, 100> &a, int x, int y){
  if(x<8){a[y*10+x+2]++;}
}
void upup(array<int, 100> &a, int x, int y){
  if(y>1){a[(y-2)*10+x]++;}
}
void downdown(array<int, 100> &a, int x, int y){
  if(y<8){a[(y+2)*10+x]++;}
}

void small(array<int, 100> &a,int x,int y){
  center(a,x,y);
  left(a,x,y);
  right(a,x,y);
  up(a,x,y);
  down(a,x,y);
}
void med(array<int, 100> &a,int x,int y){
  small(a,x,y);
  leftup(a,x,y);
  rightup(a,x,y);
  rightdown(a,x,y);
  leftdown(a,x,y);
}
void large(array<int, 100> &a,int x,int y){
  med(a,x,y);
  leftleft(a,x,y);
  rightright(a,x,y);
  upup(a,x,y);
  downdown(a,x,y);
}

int main(){
  array<int, 100> a{};
  int x,y,size;
  while(scanf("%d,%d,%d",&x,&y,&size)>0){
    switch(size){
    case 1:small(a,x,y);break;
    case 2:med(a,x,y);break;
    case 3:large(a,x,y);break;
    }
  }
  int zero=0,max=0;
  for(int i=0;i<100;i++){
    if(max<a[i]) max=a[i];
    if(a[i]==0) zero++;
  }
  printf("%d\n%d\n",zero,max);
}

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

int main()
{
  int x, y, size;
  int canvas[10][10];
  int emp, max;
  char comma;
  int i, j;

  for(i=0; i<10; i++){
    for(j=0; j<10; j++) canvas[i][j]=0;
  }
  while(cin >> x >> comma >> y >> comma >> size){
    canvas[x][y]++;
    if(x>0) canvas[x-1][y]++;
    if(x<9) canvas[x+1][y]++;
    if(y>0) canvas[x][y-1]++;
    if(y<9) canvas[x][y+1]++;
    if(size>1){
      for(i=-1; i<=1; i+=2){
        for(j=-1; j<=1; j+=2){
          if(x+i>=0 && x+i<=9 && y+j>=0 && y+j<=9) canvas[x+i][y+j]++;
        }
      }
    }
    if(size>2){
      if(x>1) canvas[x-2][y]++;
      if(x<8) canvas[x+2][y]++;
      if(y>1) canvas[x][y-2]++;
      if(y<8) canvas[x][y+2]++;
    }
  }
  emp=0; max=0;
  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(canvas[i][j]==0) emp++;
      if(max<canvas[i][j]) max=canvas[i][j];
    }
  }
  printf("%d\n%d\n", emp, max);

  return 0;
}

C++: #include<iostream>

using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(cin>>x>>c>>y>>c>>s){
		
		while(1){
			data[x][y]++;
			if(y-1>=0)data[x][y-1]++;
			if(x+1<10)data[x+1][y]++;
			if(y+1<10)data[x][y+1]++;
			if(x-1>=0)data[x-1][y]++;
			if(s==1)break;
			if(x+1<10 && y+1<10)data[x+1][y+1]++;
			if(x+1<10 && y-1>=0)data[x+1][y-1]++;
			if(x-1>=0 && y-1>=0)data[x-1][y-1]++;
			if(x-1>=0 && y+1<10)data[x-1][y+1]++;
			if(s==2)break;
			if(x+2<10)data[x+2][y]++;
			if(y-2>=0)data[x][y-2]++;
			if(y+2<10)data[x][y+2]++;
			if(x-2>=0)data[x-2][y]++;
			break;
		}
		
	}
	int white=0,ma=0;
	for(int i=0;i<i<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<" "<<ma<<endl;
}

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

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

void size_s(int x, int y);
void size_m(int x, int y);
void size_l(int x, int y);
void disp();

int main(){
	int inpx, inpy, size;
	while(scanf("%d,%d,%d", &inpx, &inpy, &size) != EOF){
		if(size == 1) size_s(inpx, inpy);
		if(size == 2) size_m(inpx, inpy);
		if(size == 3) size_l(inpx, inpy);
	}
	disp();
	return 0;
}

void size_s(int x, int y){
	int sousax[4] = {0, 1, 0, -1};
	int sousay[4] = {-1, 0, 1, 0};
	paper[y][x]++;
	for(int i = 0; i < 4; i++){
		int pointx = x + sousax[i], pointy = y + sousay[i];
		if(pointx < 0 || pointx > 9 || pointy < 0 || pointy > 9) continue;
		else paper[pointy][pointx]++;
	}
}

void size_m(int x, int y){
	int sousax[8] = {0, 1, 1, 1, 0, -1, -1, -1};
	int sousay[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
	paper[y][x]++;
	for(int i = 0; i < 8; i++){
		int pointx = x + sousax[i], pointy = y + sousay[i];
		if(pointx < 0 || pointx > 9 || pointy < 0 || pointy > 9) continue;
		else paper[pointy][pointx]++;
	}
}

void size_l(int x, int y){
	int sousax[12] = {0, 2, 0, -2, 0, 1, 1, 1, 0, -1, -1, -1};
	int sousay[12] = {-2, 0, 2, 0, -1, -1, 0, 1, 1, 1, 0, -1};
	paper[y][x]++;
	for(int i = 0; i < 12; i++){
		int pointx = x + sousax[i], pointy = y + sousay[i];
		if(pointx < 0 || pointx > 9 || pointy < 0 || pointy > 9) continue;
		else paper[pointy][pointx]++;
	}
}

void disp(){
	int white = 0, deep = -1;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(paper[i][j] > deep) deep = paper[i][j];
			if(paper[i][j] == 0) white++;
		}
	}
	cout <<white <<endl <<deep <<endl;
}

C++: #include<iostream>
using namespace std;
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
int main(){
	int map[11][11]={0};
	char c;
	int a,b,s;
	while(cin>>a>>c>>b>>c>>s){
		switch(s){
			case 3:
				map[a][b+2]++;
				map[a][b-2]++;
				map[a+2][b]++;
				map[a-2][b]++;
			case 2:
				map[a+1][b+1]++;
				map[a+1][b-1]++;
				map[a-1][b+1]++;
				map[a-1][b-1]++;
			case 1:
				map[a][b]++;
				map[a][b+1]++;
				map[a][b-1]++;
				map[a+1][b]++;
				map[a-1][b]++;
		}
	}
	
	int max=0;
	int count=0;
	rep(i,10){
		rep(j,10){
			if(max<map[i][j])max=map[i][j];
			if(0==map[i][j])count++;
		}
	}
	cout<<count<<endl;
	cout<<max<<endl;
	
}