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>
using namespace std;
int cell[30][30];
int main(){
	while(true){
		char dum;
		int x,y,size;
		cin >> x;
		if(cin.eof())break;
		cin >> dum;
		x +=10;
		cin >> y;
		y +=10;
		cin >> dum;
		cin >> size;
		if(size == 1){
			cell[x][y-1]++;cell[x-1][y]++;cell[x][y]++;cell[x+1][y]++;cell[x][y+1]++;
		}
		else if(size == 2){
			for(int i= -1;i<=1;i++)
				for(int j = -1;j<=1;j++)
					cell[x+i][y+j]++;
		
		}
		else
		{
			for(int i= -1;i<=1;i++)
				for(int j = -1;j<=1;j++)cell[x+i][y+j]++;
			cell[x][y-2]++;cell[x-2][y]++;cell[x+2][y]++;cell[x][y+2]++;
		}
	}
	int max = 0,empty = 0;
	for(int i=10;i<=19;i++)
		for(int j = 10;j<=19;j++)
		{
			if(cell[i][j] == 0) empty++;
			else if(max < cell[i][j]) max=cell[i][j];
		}
	cout << empty << endl;
	cout << max << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define loop(i,a,b) for(int i = a ; i < b ; i++)
#define rep(i,a) for(int i = 0 ; i < a ; i++) 

int maze[10][10];
int smallx[5] = {1,-1,0,0,0};
int smally[5] = {0,0,0,1,-1};
int midx[4] = {1,1,-1,-1};
int midy[4] = {1,-1,1,-1};
int largex[4] = {2,-2,0,0};
int largey[4] = {0,0,2,-2};

bool inmaze(int x,int y){
  return (0<=x && x<10) && (0<=y && y<10);
	     
}
void Fsmall(int x,int y){
  rep(i,5)
    if(inmaze(x+smallx[i],y+smally[i]))
       maze[x+smallx[i]][y+smally[i]]++;
       
}
void Fmid(int x,int y){
  rep(i,4)
    if(inmaze(x+midx[i],y+midy[i]))
       maze[x+midx[i]][y+midy[i]]++;
}
void Flarge(int x,int y){
  rep(i,5)
    if(inmaze(x+largex[i],y+largey[i]))
    maze[x+largex[i]][y+largey[i]]++;
}
int main(void){
  int x,y,size;
  rep(i,10)rep(j,10)maze[i][j] = 0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF)
    switch(size){
    case 3:
      Flarge(x,y);
    case 2:
      Fmid(x,y);
    case 1:
      Fsmall(x,y);
    }
  int no = 0,ma = -1;
  rep(i,10)rep(j,10){
    if(maze[i][j] == 0)no ++;
    ma = max(ma,maze[i][j]);
  }
  cout<<no<<endl<<ma<<endl;
  
}

C++: #include <iostream>
using namespace std;
 
int ds[3] = {5,9,13};
int dx[13] = { 0,-1, 0, 1, 0,-1, 1,-1, 1, 0,-2, 2, 0};
int dy[13] = {-1, 0, 0, 0, 1,-1,-1, 1, 1,-2, 0, 0, 2};
 
int main() {
 
  int x,y,size;
  char c;
  int map[14][14] = {0};
 
  int cnt = 0;
  int map_max = 0;
 
  while( cin >> x >> c >> y >> c >> size ) {
 
    for ( int i = 0; i < ds[size-1]; i++ ) {
 
      map[ x+2 + dx[i] ][ y+2 + dy[i] ]++;
 
    }
 
  }
 
  for ( int i = 2; i < 12; i++ ) {
    for ( int j = 2; j < 12; j++ ) {
       
      if ( map[i][j] == 0 ) cnt++;
      map_max = max( map_max, map[i][j] );
       
    }
  }
 
  cout << cnt << endl << map_max << endl;
 
  return 0;
 
}

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve
int b[10][10];

void set_(int x, int y){
  if(x >= 0 && x < 10 && y >= 0 && y < 10)b[x][y] += 1;
}

int main(int argc, char const* argv[])
{
  string ss;
  while(cin >> ss){
    int x = -1, y = -1, s;
    string tmp = "";
    rep(i, ss.size()){
      if(ss[i] != ',')tmp += ss[i];
      else{
        if(x == -1)x = stoi(tmp);
        else y = stoi(tmp);
        tmp = "";
      }
    }
    s = stoi(tmp);
    if(s == 1){
      set_(x, y-1);
      set_(x-1, y); set_(x, y); set_(x+1, y);
      set_(x, y+1);
    }else if(s == 2){
      rep(i, 3){
        rep(j, 3){
          set_(x + i - 1, y + j - 1);
        }
      }
    }else{
      set_(x, y - 2);
      set_(x, y + 2);
      set_(x - 2, y);
      set_(x + 2, y);
      rep(i, 3){
        rep(j, 3){
          set_(x + i - 1, y + j - 1);
        }
      }
    }
  }
  int res = 0;
  int maxi = 0;
  rep(i, 10){
    rep(j, 10){
      if(b[i][j] == 0)res++;
      maxi = max(maxi, b[i][j]);
    }
  }
  cout << res << endl;
  cout << maxi << endl;
	return 0;
}

C++: //Dropping Ink
#include<bits/stdc++.h>
using namespace std;

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

int d1[4][2]={{-1,0},{1,0},{0,1},{0,-1}};
int d2[4][2]={{1,1},{1,-1},{-1,1},{-1,-1}};
int d3[4][2]={{-2,0},{2,0},{0,2},{0,-2}};
int p[10][10];

void drop1(int y, int x){
  p[y][x]++;
  for(int i=0; i<4; i++)
    if(a(y+d1[i][0], x+d1[i][1]))p[y+d1[i][0]][x+d1[i][1]]++;
}

void drop2(int y, int x){
  drop1(y, x);
  for(int i=0; i<4; i++)
    if(a(y+d2[i][0], x+d2[i][1]))p[y+d2[i][0]][x+d2[i][1]]++;
}

void drop3(int y, int x){
  drop2(y, x);
  for(int i=0; i<4; i++)
    if(a(y+d3[i][0], x+d3[i][1]))p[y+d3[i][0]][x+d3[i][1]]++;
}

int main(){
  int x, y, z;
  int max=0, n=0;

  while(scanf("%d,%d,%d", &x, &y, &z)!=EOF){
    if(z==1)drop1(y, x);
    else if(z==2)drop2(y, x);
    else if(z==3)drop3(y, x);
  }
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(p[i][j]==0) n++;
      else if(max<p[i][j])max=p[i][j];
    }
  }
  cout << n << endl;
  cout << max << endl;

  return 0;
}