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 <algorithm>

using namespace std;

//4方向ベクトル→↑←↓
const int px[4] ={1,0,-1,0};
const int py[4] ={0,-1,0,1};

int board[15][15];
int x,y,size;
int ans1,ans2;
int main()
{
  ans1 = 0;
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      board[i][j] = 0;
    }
  }
  while(scanf("%d,%d,%d",&x,&y,&size) !=EOF){
    if(x <0||y < 0||x >10 ||y >10){
      continue;
    }
    if(size ==1){
      board[y][x] +=1;
      for(int j = 0;j < 4;j++){
	int nx = x + px[j];
	int ny = y + py[j];
	if(nx <0 ||ny < 0||nx > 10||ny >10)
	  continue;
	board[ny][nx] = 1;
      }
    }else if(size ==2){
      for(int i = -1;i <=1;i++){
	for(int j = -1;j <=1;j++){
	 int nx = x +j;
	 int ny = y +i;
	  if(nx <0 ||nx >=10||ny <0||ny >=10)
	    continue;
	  board[ny][nx] +=1;
	}
      }
    }else if(size ==3){
      for(int i = -2;i <=2;i++){
	for(int j = -2;j <=2;j++){
	  if(i == -2&&j ==0){
	    board[y+i][x] +=1;
	  }else if(i == -1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i == 0){
	    board[y+i][x+j] +=1;
	  }else if(i == 1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i ==2&&j ==0){
	    board[y+i][x] +=1;
	  }
	}
      }
    }
  }
  ans2 = 0; 
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      if(board[i][j] == 0){
	ans1++;
      }
      if(board[i][j] > ans2){
	ans2 = board[i][j];
      }
    }
  }
  for(int i = 0;i < 10;i++){
    for(int j = 0;j < 10;j++){
      cout <<board[i][j];
    }
    cout <<endl;
  }
  cout <<ans1<<endl;
  cout <<ans2<<endl;
  return 0;
}

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


int main()
{
	int p[MAX][MAX];
	for (int i = 0; i < MAX; i++){
		for (int j = 0; j < MAX; j++){
			p[i][j] = 0;
		}
	}
	int x, y, size;
	while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
		x += 10;
		y += 10;
		p[x][y]++;
		p[x - 1][y]++;
		p[x + 1][y]++;
		p[x][y - 1]++;
		p[x][y + 1]++;
		if (size == 1){
			continue;
		}
		p[x - 1][y - 1]++;
		p[x - 1][y + 1]++;
		p[x + 1][y - 1]++;
		p[x + 1][y + 1]++;
		if (size == 2){
			continue;
		}
		p[x - 2][y]++;
		p[x + 2][y]++;
		p[x][y - 2]++;
		p[x][y + 2]++;
	}
	int clean = 0, ink = 0;
	for (int i = 10; i < 20; i++){
		for (int j = 10; j < 20; j++){
			if (p[i][j] == 0){
				clean++;
			}
			ink = max(ink, p[i][j]);
		}
	}
	cout << clean << endl;
	cout << ink << endl;

	return 0;
}

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

int paper[10][10];

int drop[3][5][5]  = {
  {
  {0, 0, 0, 0, 0},
  {0, 0, 1, 0, 0},
  {0, 1, 1, 1, 0},
  {0, 0, 1, 0, 0},
  {0, 0, 0, 0, 0},
  },
  {
  {0, 0, 0, 0, 0},
  {0, 1, 1, 1, 0},
  {0, 1, 1, 1, 0},
  {0, 1, 1, 1, 0},
  {0, 0, 0, 0, 0},
  },
  {
  {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 main()
{
  fill((int*) paper, (int*) paper+100, 0);
  int x, y, size;
  char d;
  while (cin >> x >> d >> y >> d >> size) {
    for (int dx = -2; dx <= 2; dx++) {
      for (int dy = -2; dy <= 2; dy++) {
        if (x + dx >= 0 && x + dx < 10 && y + dy >= 0 && y + dy < 10)
          paper[x + dx][y + dy] += drop[size - 1][2+dx][2+dy];
      }
    }
  }
  int max_drop = 0;
  int space = 0;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      if (paper[i][j] == 0) space++;
      max_drop = max(max_drop, paper[i][j]);
    }
  }
  cout << space << endl << max_drop << endl;
}

C++: #include<stdio.h>

int main(void){
  int xs[] = {-1,0,0,1},ys[] = {0,-1,1,0};
  int xm[] = {-1,-1,-1,0,0,1,1,1}, ym[] = {-1,0,1,-1,1,-1,0,1};
  int xl[] = {-2,-1,-1,-1,0,0,0,0,1,1,1,2};
  int yl[] = {0,-1,0,1,-2,-1,1,2,-1,0,1,0};

  int x,y,n;
  int max = 0, cnt = 0;

  int map[14][14] = {0};

  while(scanf("%d,%d,%d",&x,&y,&n) != EOF){
    x += 2;
    y += 2;
    switch(n){
    case 1:
      map[x][y]++;
      for(int i = 0; i < 4; i++){
	map[x + xs[i]][y + ys[i]]++;
      }
      break;

    case 2:
      map[x][y]++;
      for(int i = 0; i < 8; i++){
	map[x + xm[i]][y + ym[i]]++;
      }
      break;

    case 3:
      map[x][y]++;
      for(int i = 0; i < 12; i++){
	map[x + xl[i]][y + yl[i]]++;
      }
      break;
    }
  }

  for(int i = 2; i < 12; i++){
    for(int j = 2; j < 12; j++){
      if(map[i][j] == 0){
	cnt++;
      }
      if(map[i][j] > max){
	max = map[i][j];
      }
    }
  }
    
  printf("%d\n%d\n",cnt,max);

  return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
int x;
int y;
int s;
int a[14][14];
char b;
int c;
int d;
c=0;
while(c<14){
d=0;
while(d<14){
a[c][d]=0;
d=d+1;}
c=c+1;}
while(cin>>x>>b>>y>>b>>s){
if(s==1){
a[x+2][y+2]=a[x+2][y+2]+1;
a[x+1][y+2]=a[x+1][y+2]+1;
a[x+3][y+2]=a[x+3][y+2]+1;
a[x+2][y+1]=a[x+2][y+1]+1;
a[x+2][y+3]=a[x+2][y+3]+1;}
if(s==2){
a[x+1][y+1]=a[x+1][y+1]+1;
a[x+1][y+2]=a[x+1][y+2]+1;
a[x+1][y+3]=a[x+1][y+3]+1;
a[x+2][y+1]=a[x+2][y+1]+1;
a[x+2][y+2]=a[x+2][y+2]+1;
a[x+2][y+3]=a[x+2][y+3]+1;
a[x+3][y+1]=a[x+3][y+1]+1;
a[x+3][y+2]=a[x+3][y+2]+1;
a[x+3][y+3]=a[x+3][y+3]+1;}
if(s==3){
a[x][y+2]=a[x][y+2]+1;
a[x+1][y+1]=a[x+1][y+2]+1;
a[x+1][y+2]=a[x+1][y+2]+1;
a[x+1][y+3]=a[x+1][y+3]+1;
a[x+2][y]=a[x+2][y]+1;
a[x+2][y+1]=a[x+2][y+1]+1;
a[x+2][y+2]=a[x+2][y+2]+1;
a[x+2][y+3]=a[x+2][y+3]+1;
a[x+2][y+4]=a[x+2][y+4]+1;
a[x+3][y+1]=a[x+3][y+1]+1;
a[x+3][y+2]=a[x+3][y+2]+1;
a[x+3][y+3]=a[x+3][y+3]+1;
a[x+4][y+2]=a[x+2][y+2]+1;}
}
int e;
int f;
e=a[2][2];
f=0;
c=2;
while(c<12){
d=2;
while(d<12){
if(e<a[c][d]){e=a[c][d];}
if(a[c][d]==0){f=f+1;}
d=d+1;}
c=c+1;}
cout <<f<<endl<<e<<endl;}

C++: #include<stdio.h>

int main(){
	int i,j,x,y,size,map[15][15]={0},noud=0,no=0;
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
			case 3:
				map[x][y+2]++;
				map[x+2][y]++;
				map[x+2][y+4]++;
				map[x+4][y+2]++;
			case 2:
				map[x+1][y+1]++;
				map[x+1][y+3]++;
				map[x+3][y+1]++;
				map[x+3][y+3]++;
			case 1:
				map[x+1][y+2]++;
				map[x+2][y+1]++;
				map[x+2][y+2]++;
				map[x+3][y+2]++;
				map[x+2][y+3]++;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(map[i+2][j+2]==0)no++;
			if(map[i+2][j+2]>noud)noud=map[i+2][j+2];
		}
	}
	printf("%d\n%d\n",no,noud);
}