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 <stdio.h>

int main(void)
{
	int x,y;
	int i, j;
	int n;
	int size;
	int god[10][10];
	int space;
	int mn;
	
	for (i = 0; i < 10; i++){
		for (j = 0; j < 10; j++){
			god[i][j] = 0;
		}
	}
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		if (size == 1){
			n = 1;
			god[x][y]++;
			for (i = 0; i < 2; i++){
				if (x + n >= 0 && x + n < 10){
					god[x + n][y]++;
				}
				if (y + n >= 0 && y + n < 10){
					god[x][y + n]++;
				}
				n = -1;
			}
		}
		if (size == 2){
			n = 1;
			god[x][y]++;
			for (i = 0; i < 2; i++){
				if (x + n >= 0 && x + n < 10){
					god[x + n][y]++;
				}
				if (y + n >= 0 && y + n < 10){
					god[x][y + n]++;
				}
				if (x + n >= 0 && x + n < 10 && y + n >= 0 && y + n < 10){
					god[x + n][y + n]++;
				}
				if (x + n >= 0 && x + n < 10 && y - n >= 0 && y - n < 10){
					god[x + n][y - n]++;
				}
				n = -1;
			}
		}
		if (size == 3){
			n = 1;
			god[x][y]++;
			for (i = 0; i < 2; i++){
				if (x + n >= 0 && x + n < 10){
					god[x + n][y]++;
				}
				if (y + n >= 0 && y + n < 10){
					god[x][y + n]++;
				}
				if (x + n >= 0 && x + n < 10 && y + n >= 0 && y + n < 10){
					god[x + n][y + n]++;
				}
				if (x + n >= 0 && x + n < 10 && y - n >= 0 && y - n < 10){
					god[x + n][y - n]++;
				}
				
				if (x + n * 2 >= 0 && x + n * 2 < 10){
					god[x + n * 2][y]++;
				}
				if (y + n * 2 >= 0 && y + n * 2 < 10){
					god[x][y + n * 2]++;
				}
				n = -1;
			}
		}
	}
	space = 0;
	mn = 0;
	for (i = 0; i < 10; i++){
		for (j = 0; j < 10; j++){
			if (god[i][j] == 0){
				space++;
			}
			if (mn < god[i][j]){
				mn = god[i][j];
			}
		}
	}
	
	printf("%d\n%d\n", space, mn);
	
	return (0);
}

C++: #include <iostream>

using namespace std;

int map[10][10]= {};
const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, -2, 0, 0}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1, 0, 0, 2, -2};
  
void drop_ink(int x, int y, int size)
{
  map[x][y]++;
  for(int i = 0; i < 4 * size; i++)
    if(x+dx[i] < 10 && x+dx[i] >= 0 && y+dy[i] < 10 && y+dy[i] >= 0)
      map[x+dx[i]][y+dy[i]]++;
}

int main()
{
  int x, y, s, ans1, ans2 = 0;
  char c;
  while(cin >> x >> c >> y >> c >> s){
    drop_ink(x, y, s);
    ans1 = 0;
    for(int i = 0; i < 10; i++){
      for(int j = 0; j < 10; j++){
	if(map[i][j] == 0)
	  ans1++;
	ans2 = (map[i][j] > ans2) ? map[i][j] : ans2;        
      }
    }
  }
  cout << ans1 << endl << ans2 << endl;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int char_to_int(char c) {
	if (c == '0')return 0;
	else if (c == '1')return 1;
	else if (c == '2')return 2;
	else if (c == '3')return 3;
	else if (c == '4')return 4;
	else if (c == '5')return 5;
	else if (c == '6')return 6;
	else if (c == '7')return 7;
	else if (c == '8')return 8;
	else if (c == '9')return 9;
}
int main(){
	string str;
	int p[10][10] = { 0 };
	while (cin >> str){
		int a = char_to_int(str[0]);
		int b = char_to_int(str[2]);
		int s = char_to_int(str[4]);
		p[a][b]++;
		if (s >= 1){
			p[a - 1][b]++;
			p[a + 1][b]++;
			p[a][b - 1]++;
			p[a][b + 1]++;
			if (s >= 2) {
				p[a - 1][b + 1]++;
				p[a + 1][b - 1]++;
				p[a - 1][b - 1]++;
				p[a + 1][b + 1]++;
				if (s >= 3) {
					p[a - 2][b]++;
					p[a + 2][b]++;
					p[a][b - 2]++;
					p[a][b + 2]++;
				}
			}
		}
	}
	int sum = 0;
	int dr = 0;
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++) {
			if (p[i][j] == 0)sum++;
			dr = max(dr, p[i][j]);
		}
	}
	cout << sum << endl << dr << endl;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main(void){

  int p[14][14] = {0};
  int x,y,size;
  char ten,tenten;
 back:;
  while( cin >> x >> ten >> y >> tenten >> size ){
    x += 2;
    y += 2;
    switch(size){
    case 3:
      p[x-2][y]++;
      p[x+2][y]++;
      p[x][y-2]++;
      p[x][y+2]++;
    case 2:
      p[x+1][y+1]++;
      p[x-1][y-1]++;
      p[x+1][y-1]++;
      p[x-1][y+1]++;
    case 1:
      p[x][y+1]++;
      p[x][y-1]++;
      p[x-1][y]++;
      p[x+1][y]++;
      p[x][y]++;
    }
  }
  
  int cnt = 0;
  int m = 0;
  for( int i = 2 ; i < 12 ; i++ ){
    for( int j = 2 ; j < 12 ; j++ ){
      if( p[i][j] == 0 ) cnt++;
      m = max( m , p[i][j] );
      //  cout << " " << p[i][j] << " ";
    }
    //cout << endl;
  }
  cout << cnt << endl << m << 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=-1;
  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);
	}
      }
    }
  }
  cnt=0;
  for(int i=0;i<10;i++)
    for(int j=0;j<10;j++)
      if(t[i][j]==0)cnt++;
  cout<<cnt<<endl;
  cout<<maxm<<endl;
  return 0;
}