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

using namespace std;

bool onPaper(int x, int y) {
  return (0 <= x && x <= 9 &&
          0 <= y && y <= 9);
}

void smallDrop(int x, int y, int p[][10]) {
  if (onPaper(x-1, y))
    p[x-1][y]++;
  if (onPaper(x+1, y))
    p[x+1][y]++;
  if (onPaper(x, y-1))
    p[x][y-1]++;
  if (onPaper(x, y+1))
    p[x][y+1]++;
}

void middleDrop(int x, int y, int p[][10]) {
  smallDrop(x, y, p);
  if (onPaper(x-1, y-1))
    p[x-1][y-1]++;
  if (onPaper(x-1, y+1))
    p[x-1][y+1]++;
  if (onPaper(x+1, y-1))
    p[x+1][y-1]++;
  if (onPaper(x+1, y+1))
    p[x+1][y+1]++;
}

void bigDrop(int x, int y, int p[][10]) {
  middleDrop(x, y, p);
  if (onPaper(x-2, y))
    p[x-2][y]++;
  if (onPaper(x+2, y))
    p[x+2][y]++;
  if (onPaper(x, y-2))
    p[x][y-2]++;
  if (onPaper(x, y+2))
    p[x][y+2]++;
}

int main(int argc, char *argv[]) {
  int paper[10][10] = {0};
  int x, y, size;

  while (scanf("%d,%d,%d", &x, &y, &size) != -1) {
    paper[x][y]++;
    if (size == 1)
      smallDrop(x, y, paper);
    else if (size == 2)
      middleDrop(x, y, paper);
    else
      bigDrop(x, y, paper);
  }

  int white, black;
  white = black = 0;
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < 10; j++)
      if (paper[i][j] == 0)
        white++;
      else if (black < paper[i][j])
        black = paper[i][j];

  cout << white << endl;
  cout << black << endl;
  return 0;
}

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

int field[10][10], x, y, s, cnt, ma;

void s1()
{
    if (y - 1 >= 0) field[x][y-1]++;
    if (x - 1 >= 0) field[x-1][y]++;
    if (y + 1 < 10) field[x][y+1]++;
    if (x + 1 < 10) field[x+1][y]++;
}

void s2()
{
    s1();
    if (x - 1 >= 0 && y - 1 >= 0) field[x-1][y-1]++;
    if (x - 1 >= 0 && y + 1 < 10) field[x-1][y+1]++;
    if (x + 1 < 10 && y - 1 >= 0) field[x+1][y-1]++;
    if (x + 1 < 10 && y + 1 < 10) field[x+1][y+1]++;
}

void s3()
{
    s2();
    if (y - 2 >= 0) field[x][y-2]++;
    if (x - 2 >= 0) field[x-2][y]++;
    if (y + 2 < 10) field[x][y+2]++;
    if (x + 2 < 10) field[x+2][y]++;
}

int main()
{
    while(scanf("%d,%d,%d",&x,&y,&s) != EOF) {
        field[x][y]++;

        if      (s == 1) s1();
        else if (s == 2) s2();
        else if (s == 3) s3();

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

    printf("%d\n%d\n", cnt, ma);

    return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int pos[10][10];
/*void p(){
	for(int i=0;i<10;++i){
		for(int j=0;j<10;++j){
			cout<<pos[i][j]<<" ";
		}
		cout<<endl;
	}
	cout<<endl;
}*/
main(){
	int tmp[3],ink2[3]={1,1,2};
	int ink[3][5][5]={
		{{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,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}}
	};
	for(int i=0;i<10;++i)
		for(int j=0;j<10;++j)
			pos[i][j]=0;
	while(cin>>tmp[0]){
		scanf(",%d,%d",&tmp[1],&tmp[2]);
		for(int i=0;i<5;++i){
			for(int j=0;j<5;++j){
				int t[2]={tmp[0]-ink2[tmp[2]-1]+i,tmp[1]-ink2[tmp[2]-1]+j};
				if(t[0]>=0 && t[0]<=9 && t[1]>=0 && t[1]<=9){
					pos[t[0]][t[1]]+=ink[tmp[2]-1][i][j];
				}
			}
		}
	}
	int ans[2]={0,0};
	for(int i=0;i<10;++i){
		for(int j=0;j<10;++j){
			if(pos[i][j]==0)ans[0]++;
			ans[1]=max(pos[i][j],ans[1]);
		}
	}
	cout<<ans[0]<<endl<<ans[1]<<endl;
}

C++: #include <iostream>

using namespace std;

int cell[10][10];

int main() {
  int x, y, size;
  int max = 0, zero = 0;

  while (cin >> x) {
    cin.ignore();
    cin >> y;
    cin.ignore();
    cin >> size;

    switch (size) {
      case 3:
        if(x >= 2)
          cell[x-2][y]++;
        if(y >= 2)
          cell[x][y-2]++;
        if(x <= 7)
          cell[x+2][y]++;
        if(y <= 7)
          cell[x][y+2]++;
      case 2:
        if(x >= 1){
          if(y >= 1)
            cell[x-1][y-1]++;
          if(y <= 8)
            cell[x-1][y+1]++;
          }
        if(x <= 8){
          if(y >= 1)
            cell[x+1][y-1]++;
          if(y <= 8)
            cell[x+1][y+1]++;
        }
      case 1:
        if(x >= 1)
          cell[x-1][y]++;
        if(x <= 8)
          cell[x+1][y]++;
        if(y >= 1)
          cell[x][y-1]++;
        if(y <= 8)
          cell[x][y+1]++;
        cell[x][y]++;
    }
  }

  for(int i = 0; i < 10; i++)
    for(int j = 0; j < 10; j++){
      if(!cell[i][j])
        zero++;
      else if(cell[i][j] > max)
        max = cell[i][j];
    }

  cout << zero << endl << max << endl;

}

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

using namespace std;

int peper[15][15];

void paint(int x, int y)
{
	if (x * y >= 0 && x >= 0){
		peper[y][x]++;
	}
}

int main()
{
	int x, y;
	int size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		peper[y][x]++;

		paint(x, y - 1);
		paint(x, y + 1);
		paint(x - 1, y);
		paint(x + 1, y);

		if (size >= 2){
			paint(x + 1, y - 1);
			paint(x + 1, y + 1);
			paint(x - 1, y + 1);
			paint(x - 1, y - 1);
		}
		if (size == 3){
			paint(x, y - 2);
			paint(x, y + 2);
			paint(x - 2, y);
			paint(x + 2, y);
		}
	}
	int dark = 0;
	int blank = 0;
	
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (peper[i][j] == 0)	blank++;
			dark = max(dark, peper[i][j]);
		}
	}
	printf("%d\n%d\n", blank, dark);
	return (0);
}