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", count, max)
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<vector<int> > paper(10, vector<int>(10, 0));
    int ret1 = 100;
    int ret2 = 0;

    int dy[] = {0, 1, -1, 0, 0, 1, -1, 1, -1, 2, -2, 0, 0};
    int dx[] = {0, 0, 0, 1, -1, 1, 1, -1, -1, 0, 0, 2, -2};

    for(;;){
        int x0, y0, size;
        char c;
        if(!(cin >> x0 >> c >> y0 >> c >> size))
            break;
        for(int i=0; i<4*size+1; ++i){
            int y = y0 + dy[i];
            int x = x0 + dx[i];
            if(y < 0 || y > 9 || x < 0 || x > 9)
                continue;
            if(paper[y][x] == 0)
                -- ret1;
            ++ paper[y][x];
            ret2 = max(ret2, paper[y][x]);
        }
    }

    cout << ret1 << endl << ret2 << endl;
}

C++: #include<iostream>
using namespace std;
int main(){
  int mas[10][10],x,y,size,count=0,max=0;
  char a,b;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++) mas[i][j] = 0;
  }
  while(cin>>x>>a>>y>>b>>size){
    mas[y][x]++;
    for(int i=-1;i<=1;i++){
      if(i!=0){
	if(y+i>=0&&y+i<=9)mas[y+i][x]++;
	if(x+i>=0&&x+i<=9)mas[y][x+i]++;
	if(size==2||size==3&&y+i>=0&&y+i<=9&&x+i>=0&&x+i<=9){
	  mas[y+i][x+i]++;
	}
      }
    }
    if(size==2||size==3){
      if(x!=9&&y!=0) mas[y+1][x-1]++;
      if(x!=0&&y!=9) mas[y-1][x+1]++;
    }
    if(size==3){
      if(x+2<=9) mas[y][x+2]++;
      if(y+2<=9) mas[y+2][x]++;
      if(x-2>=0) mas[y][x-2]++;
      if(y-2>=0) mas[y-2][x]++;
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(mas[i][j]==0) count++;
      if(mas[i][j]>max) max = mas[i][j];
    }
  }
  cout << count << endl << max << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
void drop(int x,int y,int *k,int d[10][10]){
	if(x>=0&&y>=0&&x<10&&y<10){
		if(d[y][x]==0)
			*k=*k-1;
		d[y][x]++;	
	}
}

int main(){
	
	int d[10][10]={0};
	char comma;
	int x,y,s;
	int k=100;
	while(cin>>x>>comma>>y>>comma>>s){
		if(s>=1){
			drop(x,y,&k,d);
			drop(x+1,y,&k,d);
			drop(x,y+1,&k,d);
			drop(x-1,y,&k,d);
			drop(x,y-1,&k,d);
	}
		if(s>=2){
			drop(x+1,y+1,&k,d);
			drop(x+1,y-1,&k,d);
			drop(x-1,y-1,&k,d);
			drop(x-1,y+1,&k,d);
		}
		if(s>=3){
			drop(x-2,y,&k,d);
			drop(x+2,y,&k,d);
			drop(x,y-2,&k,d);
			drop(x,y+2,&k,d);
		}
	}
	cout<<k<<endl;
	int max=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(max<d[i][j])
				max=d[i][j];
		}
	}
	cout<<max<<endl;
}

C++: #include<cstdio>

int main(void){

	int paper[10+2+2][10+2+2]={0};
	int x,y,s;
	int max=0,num=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		if(s>=1){
			paper[2+x][2+y]++;
			paper[2+x][2+y+1]++;
			paper[2+x][2+y-1]++;
			paper[2+x+1][2+y]++;
			paper[2+x-1][2+y]++;
		}
		if(s>=2){
			paper[2+x+1][2+y+1]++;
			paper[2+x-1][2+y+1]++;
			paper[2+x+1][2+y-1]++;
			paper[2+x-1][2+y-1]++;
		}
		if(s>=3){
			paper[2+x][2+y+2]++;
			paper[2+x][2+y-2]++;
			paper[2+x+2][2+y]++;
			paper[2+x-2][2+y]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(max<paper[2+i][2+j]) max=paper[2+i][2+j];
			if(paper[2+i][2+j]==0) num++;
		}
	}
	printf("%d\n%d\n",num,max);
	return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <cstdlib>

using namespace std;

static int paper[10][10];

void drop_ink(int x, int y, int size) {
  switch (size) {
    case 3:
      if (y > 1) { ++paper[y-2][x]; }
      if (x > 1) { ++paper[y][x-2]; }
      if (x < 8) { ++paper[y][x+2]; }
      if (y < 8) { ++paper[y+2][x]; }
      // Fall through.
    case 2:
      if (y > 0 && x > 0) { ++paper[y-1][x-1]; }
      if (y > 0 && x < 9) { ++paper[y-1][x+1]; }
      if (y < 9 && x > 0) { ++paper[y+1][x-1]; }
      if (y < 9 && x < 9) { ++paper[y+1][x+1]; }
      // Fall through.
    case 1:
      if (y > 0) { ++paper[y-1][x]; }
      if (x > 0) { ++paper[y][x-1]; }
      ++paper[y][x];
      if (x < 9) { ++paper[y][x+1]; }
      if (y < 9) { ++paper[y+1][x]; }
      break;
  }
}

int main() {
  char *line = NULL;
  size_t buffer_size = 0;
  while (getline(&line, &buffer_size, stdin) > 0) {
    int x, y, size;
    sscanf(line, "%d,%d,%d", &x, &y, &size);
    drop_ink(x, y, size);
  }
  free(line);

  int num_white_cells = 0;
  int deepest_cell = 0;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      if (paper[i][j] == 0) { ++num_white_cells; }
      else { deepest_cell = max(deepest_cell, paper[i][j]); }
    }
  }
  printf("%d\n%d\n", num_white_cells, deepest_cell);

  return 0;
}