Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d\n", count, max)
}

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

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

void drop_ink(int x,int y,int size) {
	if (size == 1) {
		for (int i = 0; i < 3; i++) {
			if (x + i - 1 >= 0 && y >= 0) { paper[x + i - 1][y] += 1; }
		}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y + i - 1 >= 0) {
				if (y + i - 1 != y) { paper[x][y + i - 1] += 1; }
			}
		}
	}
	else if (size == 2) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y - 1 + i >= 0) {
				paper[x][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
				}
			}
	}
	else if (size == 3) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
			}
		}
		for (int i = 0; i < 5; i++) {
			if (x >= 0 && y - 2 + i >= 0) {
				paper[x][y - 2 + i] += 1;
			}
		}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
			}
		}
		if (x + 2 >= 0 && y >= 0){paper[x + 2][y] += 1;}
		if (x - 2 >= 0 && y >= 0) { paper[x - 2][y] += 1; }
	}
}
int main() {
	char x[1], y[1], size[1]; char tem[100];
	int white = 0; int most_intense=0;
	while (cin>>tem) {
		x[0] = tem[0]; y[0] = tem[2]; size[0] = tem[4];
		drop_ink(atoi(x),atoi(y),atoi(size));
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[j][i] == 0) { white += 1; }
			if (most_intense < paper[j][i]) { most_intense = paper[j][i]; }
		}
	}
	cout << white << endl << most_intense ;
}

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

int board[10][10];
int empty = 0;
int _max = INT_MIN;

bool ok(int val) {
    return(val >= 0 && val < 10);
}
void small(int x, int y) {
    board[y][x]++;
    int north = y - 1, south = y + 1,  east = x + 1, west = x - 1;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}
void mid(int x, int y) {
    small(x, y);
    int uprightx = x + 1, uprighty = y + 1;
    int downrightx = x + 1, downrighty = y - 1;
    int downleftx = x - 1, downlefty = y - 1;
    int upleftx = x - 1, uplefty = y + 1;
    if(ok(uprightx) && ok(uprighty)) board[uprighty][uprightx]++;
    if(ok(downrightx) && ok(downrighty)) board[downrighty][downrightx]++;
    if(ok(downleftx) && ok(downlefty)) board[downrighty][downrightx]++;
    if(ok(upleftx) && ok(uplefty)) board[uplefty][upleftx]++;
}
void large(int x, int y) {
    mid(x, y);
    int north = y - 2, south = y + 2,  east = x + 2, west = x - 2;
    if(ok(north)) board[north][x]++;
    if(ok(south)) board[south][x]++;
    if(ok(east))  board[y][east]++;
    if(ok(west))  board[y][west]++;
}
void search() {
    for(int r = 0; r < 10; r++) {
        for(int c = 0; c < 10; c++) {
            if(board[r][c] > _max) _max = board[r][c];
            if(board[r][c] == 0) empty++;
        }
    }
}

int main(void) {
    int x, y, size;
    
    while(scanf("%d,%d,%d", &x, &y, &size) != EOF) {
        switch(size) {
            case 1: small(x, y); break;
            case 2: mid(x, y);   break;
            default:large(x, y); break;
        }
    }
    search();
    cout << empty << endl << _max << endl;
    return(0);
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<stdio.h>
int main(){
	int x,y,size;
	std::vector<std::vector<int> > vec(10,std::vector<int>(10,0));
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0,max=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
		if(max<vec2[i])max=vec2[i];
	}
	std::cout<<no<<std::endl;
	std::cout<<max<<std::endl;
	/*sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;*/
	return 0;
}

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


using namespace std;
#define LENGTH 10

bool isDropEnabled(int x, int y){
  if(0<=x && x<LENGTH && 0<=y && y<LENGTH){
    return true;
  }else{
    return false;
  }
}
 



int main(){
  int x, y, size;
  char c;
  int density[LENGTH][LENGTH];
  for(int i=0;i<LENGTH;i++){
    for(int j=0;j<LENGTH;j++){
      density[i][j]=0;
    }
  }
  
  while(cin >> x >> c >> y >> c >> size){
    if(size==1){
      for(int i=-1;i<2;i++){
	for(int j=-1;j<2;j++){
	  if(isDropEnabled(x+i, y+j) && ((i+j)%2==1 || i==j==0)){
	    density[x+i][y+j]++;
	  }
	}
      }
    }

    if(size==2){
      for(int i=-1;i<2;i++){
	for(int j=-1;j<2;j++){
	  if(isDropEnabled(x+i, y+j)){
	    density[x+i][y+j]++;
	  }
	}
      }
    }

    if(size==3){
      for(int i=-2;i<3;i++){
	for(int j=-2;j<3;j++){
	  if(isDropEnabled(x+i, y+j) && (abs(i)+abs(j) <=2)){
	    density[x+i][y+j]++;
	  }
	}
      }
    }
  }
    
  //
  int empty=0;
  int max=0;
  for(int i=0;i<LENGTH;i++){
    for(int j=0;j<LENGTH;j++){
      if(density[i][j]==0){
	empty++;
      }else if(max < density[i][j]){
	max = density[i][j];
      }
    }
  }
  cout << empty << " " << max << endl;
  
}