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 <vector>
using namespace std;

int main(int argc, char *argv[]) {
	vector<vector<int> > cell_list(10, vector<int>(10, 0));
	const int small_x[4] = {0, 1, 0, -1};
	const int small_y[4] = {-1, 0, 1, 0};
	const int middle_x[4] = {1, 1, -1, -1};
	const int middle_y[4] = {-1, 1, 1, -1};
	const int large_x[4] = {0, 2, 0, -2};
	const int large_y[4] = {2, 0, -2, 0};
	
	while (true) {
		int x, y, size;
		if (EOF == fscanf(stdin, "%d,%d,%d\n", &x, &y, &size)) {
			break;
		}
		// center
		if (x >= 0 && x < 10 && y >= 0 && y < 10) {
			cell_list[y][x]++;
		}
		// small
		for (int i = 0; i < 4; i++) {
			if (x+small_x[i] >= 0 && y+small_y[i] >= 0 &&
				x+small_x[i] < 10 && y+small_y[i] < 10) {
				cell_list[y+small_y[i]][x+small_x[i]]++;
			}
		}
		// middle
		if (size > 1) {
			for (int i = 0; i < 4; i++) {
				if (x+middle_x[i] >= 0 && y+middle_y[i] >= 0 &&
					x+middle_x[i] < 10 && y+middle_y[i] < 10) {
					cell_list[y+middle_y[i]][x+middle_x[i]]++;
				}
			}
			// large
			if (size > 2) {
				for (int i = 0; i < 4; i++) {
					if (x+large_x[i] >= 0 && y+large_y[i] >= 0 &&
						x+large_x[i] < 10 && y+large_y[i] < 10) {
						cell_list[y+large_y[i]][x+large_x[i]]++;
					}
				}
			}
		}
	}
	
	// calc empty cell and max
	int sum_empty = 0, max = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (cell_list[i][j] == 0) sum_empty++;
			if (cell_list[i][j] > max) max = cell_list[i][j];
		}
	}
	
	// print result
	printf("%d\n%d\n", sum_empty, max);
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int paper[10][10],x,y,size,i,j;
  string s;
  for(i=0; i<10; i++)
    for(j=0; j<10; j++)
      paper[i][j]=0;

  while(cin>>s){
    x=s.at(0)-'0';
    y=s.at(2)-'0';
    size=s.at(4)-'0';
      paper[x][y]++;
      if(x>0) paper[x-1][y]++;
      if(x<9) paper[x+1][y]++;
      if(y>0) paper[x][y-1]++;
      if(y<9) paper[x][y+1]++;

    if(size>=2){
      if(x>0&&y>0) paper[x-1][y-1]++;
      if(x<9&&y>0) paper[x+1][y-1]++;
      if(x>0&&y<9) paper[x-1][y+1]++;
      if(x<9&&y<9) paper[x+1][y+1]++;
    }
    if(size>=3){
      if(x>1)paper[x-2][y]++;
      if(y>1)paper[x][y-2]++;
      if(x<8)paper[x+2][y]++;
      if(y<8)paper[x][y+2]++;
    }
  }

  int n=0,max=0;
  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(paper[i][j]==0)n++;
      if(paper[i][j]>max)max=paper[i][j];
    }
  }
  cout<<n<<"\n"<<max<<endl;
}

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

int main(void){

	int map[10][10],ink,x,y,max=0,count=0;
	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};


	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			map[i][j]=0;
		}
	}
	
	
	while(scanf("%d,%d,%d",&x,&y,&ink)!=EOF){
		map[y][x]++;
		for(int i=0;i<ink*4;i++){
			int mx=x+dx[i];
			int my=y+dy[i];
			if(mx>=0 && mx<10 && my>=0 && my<=10){
				map[my][mx]++;
			}
		}
	}
	
	
	for(int y=0;y<10;y++){
		for(int x=0;x<10;x++){
			if(map[y][x]==0){
				count++;
			}
			if(map[y][x]>max){
				max=map[y][x];
			}
		}
	}
	printf("%d\n%d\n",count,max);
}

C++: #include <iostream>
#define N 10
using namespace std;
int main(){
	int field[N][N] = {0};
	int x1[4] = {1, 0, -1, 0};
	int y1[4] = {0, 1, 0, -1};
	int x2[8] = {1, 1, 0, -1, -1, -1, 0, 1};
	int y2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
	//3 is twice of 1 and 2
	int x, y, size;
	char c;
	while(cin >> x >> c >> y >> c >> size){
		field[y][x]++;
		if(size == 1){
			for(int i = 0; i < 4; i++){
				if(0 <= x+x1[i] && x+x1[i] < 10 && 0 <= y+y1[i] && y+y1[i] < 10) field[y+y1[i]][x+x1[i]]++;
			}
		}else{//2 3
			for(int i = 0; i < 8; i++){
				if(0 <= x+x2[i] && x+x2[i] < 10 && 0 <= y+y2[i] && y+y2[i] < 10) field[y+y2[i]][x+x2[i]]++;
			}
			if(size == 3){
				for(int i = 0; i < 4; i++){
					if(0 <= x+x1[i]*2 && x+x1[i]*2 < 10 && 0 <= y+y1[i]*2 && y+y1[i]*2 < 10) field[y+y1[i]*2][x+x1[i]*2]++;
				}
			}
		}
	}
	int white = 0, maxp = 0;
	for(int i = 0; i < N; i++){
		for(int j = 0; j < N; j++){
			if(field[i][j] == 0) white ++;
			if(field[i][j] > maxp) maxp = field[i][j];
		}
	}
	cout << white << endl << maxp << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
  int x,y,size; 
  int field[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};
  for ( int i = 0; i < 10; i++ ) {
    for ( int j = 0; j < 10; j++ ) {
      field[i][j] = 0;
    }
  }

  while ( scanf("%d,%d,%d",&x,&y,&size) != EOF ) {
    field[y][x]++;   
    
    for ( int i = 0; i < size*4; i++ ) {
      int mx = x + dx[i];
      int my = y + dy[i];
      if ( mx >= 0 && mx < 10 && my >= 0 && my < 10 ) {
	field[my][mx]++;
      }
    }

  }
 
  int cnt = 0,maxv = 0;

  for ( int i = 0; i < 10; i++ ) {
    for ( int j = 0; j < 10; j++ ) {
      if ( field[i][j] == 0 ) cnt++;
      maxv = max(maxv,field[i][j]);
    }
  }

  cout << cnt << endl;
  cout << maxv << endl;
  
  return 0;
}