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>
#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;
}

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

int main( void )
{
	int bi[13][2] = {
		{ 0, 2 },
		{ -1, 1 }, { 0, 1 }, { 1, 1 },
		{ -2, 0 }, { -1, 0 }, { 0, 0 }, { 1, 0 }, { 2, 0 },
		{ -1, -1 }, { 0, -1 }, { 1, -1 },
		{ 0, -2 }
	};
	int me[9][2] = {
		{ -1, 1 }, { 0, 1 }, { 1, 1 },
		{ -1, 0 }, { 0, 0 }, { 1, 0 },
		{ -1, -1 }, { 0, -1 }, { 1, -1 }
	};
	int sm[5][2] = {
		{ 0, 1 },
		{ -1, 0 }, { 0, 0 }, { 1, 0 },
		{ 0, -1 }
	};

	vector < vector <int> > V(10, vector<int>(10, 0));
	int max_value = 0;
	while ( !cin.eof() )
	{
		int x, y, size;
		char c1, c2;
		cin >> x >> c1 >> y >> c2 >> size;
		if ( cin.eof() )
			break;

		if ( size == 1 )
		{
			for ( int i = 0; i < 5; i++ )
			{
				int nx = x + sm[i][0];
				int ny = y + sm[i][1];

				if ( ( nx >= 0 && nx < 10 ) && ( ny >= 0 && ny < 10 ) )
				{
					V[ny][nx]++;
					max_value = max( V[ny][nx], max_value );
				}
			}
		}
		else if ( size == 2 )
		{
			for ( int i = 0; i < 9; i++ )
			{
				int nx = x + me[i][0];
				int ny = y + me[i][1];

				if ( ( nx >= 0 && nx < 10 ) && ( ny >= 0 && ny < 10 ) )
				{
					V[ny][nx]++;
					max_value = max( V[ny][nx], max_value );
				}
			}
		}
		else if ( size == 3 )
		{
			for ( int i = 0; i < 13; i++ )
			{
				int nx = x + bi[i][0];
				int ny = y + bi[i][1];

				if ( ( nx >= 0 && nx < 10 ) && ( ny >= 0 && ny < 10 ) )
				{
					V[ny][nx]++;
					max_value = max( V[ny][nx], max_value );
				}
			}
		}
	}

	int emp = 0;
	for ( int i = 0; i < 10; i++ )
	{
		for ( int j = 0; j < 10; j++ )
		{
			if ( V[i][j] == 0 )
				emp++;
		}
	}

	cout << emp << endl;
	cout << max_value << endl;

	return 0;
}

C++: #include <cstdio>
#include <iostream>
using namespace std;
bool t[3][5][5] = {
  {{0,0,0,0,0}, {0,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,1,0,0}, {0,1,1,1,0}, {1,1,1,1,1}, {0,1,1,1,0}, {0,0,1,0,0}}
};
int main() {
  int a[10][10] = {}, x, y, s, i, j, m = 0, c = 0;
  while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    for (i = 0; i < 5; i++) {
      for (j = 0; j < 5; j++) {
        if ((x + i - 2) < 0 || (x + i - 2) > 9 || (y + j - 2) < 0 || (y + j - 2) > 9)
          continue;
        if (t[s - 1][i][j])
          a[x + i - 2][y + j - 2]++;
      }
    }
  }
  for (x = 0; x < 10; x++) {
    for (y = 0; y < 10; y++) {
      if (!a[x][y])
        c++;
      if (a[x][y] > m)
        m = a[x][y];
    }
  }
  cout << c << endl;
  cout << m << endl;
  return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>

typedef long long ll;
using namespace std;


void paint(int cell[10][10],int x, int y, int size,int *maxC){
	if(size == 3){
		for(int i=x-2;i<=x+2;i++){
			for(int j=y-2;j<=y+2;j++){
				if(sqrt(pow((double)i-(double)x,2.0) + pow((double)j-(double)y,2.0)) <= 2.0){
					if(i >=0 && i< 10 && j>= 0&& j<10){
						cell[j][i]++;
						*maxC = max(cell[j][i],*maxC);
					}
				}
			}
		}
	}

	if(size == 2){
		for(int i=x-1;i<=x+1;i++){
			for(int j=y-1;j<=y+1;j++){
				if(i >=0 && i< 10 && j>= 0&& j<10){
					cell[j][i]++;
					*maxC = max(cell[j][i],*maxC);
				}
			}
		}
	}

	if(size == 1){
		int tx[5] = {-1,0,1,0,0};
		int ty[5] = {0,1,0,-1,0};
		for(int i=0;i<5;i++){
			cell[y+ty[i]][x+tx[i]]++;
			*maxC = max(cell[y+ty[i]][x+tx[i]],*maxC);
		}
	}
}

int main()
{
	int cell[10][10];
	fill((int*)cell,(int*)cell+10*10,0);
	string str;
	int maxC=0;
	int count=0;
	while(getline(cin,str,',')){
		string str2;

		getline(cin,str2,',');
		string str3;

		getline(cin,str3);		
		paint(cell,str[0]-'0',str2[0]-'0',str3[0]-'0',&maxC);
		
	}
	for(int i=0;i<10;i++) for(int j=0;j<10;j++) count += cell[i][j] == 0 ? 1 : 0;

	cout << count << endl;
	cout << maxC << endl;
}