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 map[10][10];
int dx[] = {0, -1, 0, 1}, dy[] = {1, 0, -1, 0};

int main(void){
  int x, y, size;
  while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
    if(size == 1){
      map[x][y]++;
      for(int i = 0; i < 4; i++){
        int nx = x + dx[i], ny = y + dy[i];
        if(0 <= nx && nx < 10 && 0 <= ny && ny < 10) map[nx][ny]++;
      }
    }else if(size == 2){
      for(int i = -1 ; i <= 1; i++) for(int j = -1; j <= 1; j++){
        int nx = x + i, ny = y + j;
        if(0 <= nx && nx < 10 && 0 <= ny && ny < 10) map[nx][ny]++;
      }
    }else if(size == 3){
      for(int i = -1 ; i <= 1; i++) for(int j = -1; j <= 1; j++){
        int nx = x + i, ny = y + j;
        if(0 <= nx && nx < 10 && 0 <= ny && ny < 10) map[nx][ny]++;
      }
      if(y + 2 < 10) map[x][y + 2]++;
      if(0 <= y - 2) map[x][y - 2]++;
      if(x + 2 < 10) map[x + 2][y]++;
      if(0 <= x - 2) map[x - 2][y]++;
    }
  }  
  int cnt = 0, maxCard = 0;
  for(int i = 0; i < 10; i++) for(int j = 0; j < 10; j++){
    if(map[i][j] == 0) cnt++;
    if(map[i][j] > maxCard) maxCard = map[i][j]++;
  }
  
  cout << cnt << endl << maxCard << endl;
  return 0;
}

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=cnt=0;
  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);
	}
      }
    }
  }
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      if(t[i][j]==0)cnt++;
  cout<<cnt<<endl<<maxm<<endl;
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int bigx[4] = { 0, 2, 0, -2 };
	int bigy[4] = { 2, 0, -2, 0 };
	int smx[4] = {0,1,0,-1};
	int smy[4] = {1,0,-1,0};
	int midx[9] = { -1, -1, 0, 1, 1,  1,  0, -1 };
	int midy[9] = {  0,  1, 1, 1, 0, -1, -1, -1 };
	int map[10][10] = { 0 };
	int cnt = 100;
	int x, y, size;
	char s, d;
	int ma = 0;
	int c = 0;
	while (cin >> x >> s >> y >> d >> size){
		
		if (size == 1){
			for (int i = 0; i < 4; i++){
				int xx = smx[i] + x;
				int yy = smy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
		}
		else if (size == 2){
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
		}
		else {
			for (int i = 0; i < 4; i++){
				int xx = bigx[i] + x;
				int yy = bigy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
			for (int i = 0; i < 8; i++){
				int xx = midx[i] + x;
				int yy = midy[i] + y;
				if (xx >= 0 && xx < 10 && y >= 0 && y < 10){
					map[xx][yy]++;
				}
			}
		}
	}
	/*for (int i = 0; i < 10; i++){
		for (int i2 = 0; i2 < 10; i2++){
			cout << map[i][i2] << " ";
			if (map[i][i2] != 0){
				cnt--;
			}
			ma = max(ma, map[i][i2]);
		}cout << endl;
	}*/
	cout << ma << endl;
	cout << cnt << endl;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		
		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<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<endl<<ma<<endl;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int paper[10][10];
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int dx2[] = {1, 1, 1, 0, -1, -1, -1, 0};
int dy2[] = {1, 0, -1, -1, -1, 0, 1, 1};
void make_spot(int x, int y, int s){
	int nx, ny;
	if(s == 1){
		for(int i = 0; i < 4; i++){
			nx = x + dx[i], ny = y + dy[i];
			if(nx < 0 || nx >= 10 || ny < 0 || ny >= 10) continue;
			paper[nx][ny]++;
		}
	}else if(s == 2){
		for(int i = 0; i < 8; i++){
			nx = x + dx2[i], ny = y + dy2[i];
			if(nx < 0 || nx >= 10 || ny < 0 || ny >= 10) continue;
			paper[nx][ny]++;
		}
	}else if(s == 3){
		for(int i = 0; i < 8; i++){
			nx = x + dx2[i], ny = y + dy2[i];
			if(nx < 0 || nx >= 10 || ny < 0 || ny >= 10) continue;
			paper[nx][ny]++;
		}
		for(int i = 0; i < 4; i++){
			nx = x + 2 * dx[i], ny = y + 2 * dy[i];
			if(nx < 0 || nx >= 10 || ny < 0 || ny >= 10) continue;
			paper[nx][ny]++;
		}
	}
	return ;
}
int main(){
	fill(paper[0], paper[10], 0);
	for(;;){
		int x, y, s;
		if(scanf("%d,%d,%d", &x, &y, &s) == EOF) break;
		make_spot(x, y, s);
	}
	int cnt = 0, max_density = 0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(paper[i][j] == 0) cnt++;
			if(paper[i][j] > max_density) max_density = paper[i][j];
		}
	}
	cout << cnt << endl << max_density << endl;
	return 0;
}

C++: #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, 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};
	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];
		}
	}
	scanf("%d\n%d\n",c,m);
	return 0;
}