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 <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <climits>
using namespace std;

#define Vint vector<int>
#define VVint vector<Vint>
#define Fsize() front().size()

int VVint_zero(VVint vv) {
	int num = 0;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] == 0) num++;
		}
	}
	return num;
}

int VVint_max(VVint vv) {
	int max = INT_MIN;
	for (int i = 0; i < (int)vv.size(); i++) {
		for (int j = 0; j < (int)vv.Fsize(); j++) {
			if (vv[i][j] > max) max = vv[i][j];
		}
	}
	return max;
}

int main() {
	int x, y, s;
	string str, str_x, str_y, str_s;
	VVint vec(10, Vint(10, 0));
	while (getline(cin, str)) {
		replace(str.begin(), str.end(), ',', ' ');
		istringstream iss(str);
		iss >> str_x >> str_y >> str_s;
		x = stoi(str_x);
		y = stoi(str_y);
		s = stoi(str_s);
		vec[y][x] += 1;
		if (s == 1 || s == 2 || s == 3) {
			if (y - 1 >= 0) vec[y - 1][x] += 1;
			if (y + 1 >= 0) vec[y + 1][x] += 1;
			if (x - 1 >= 0) vec[y][x - 1] += 1;
			if (x + 1 >= 0) vec[y][x + 1] += 1;
		}
		if (s == 2 || s == 3) {
			if (y - 1 >= 0 && x - 1 >= 0) vec[y - 1][x - 1] += 1;
			if (y - 1 >= 0 && x + 1 >= 0) vec[y - 1][x + 1] += 1;
			if (y + 1 >= 0 && x - 1 >= 0) vec[y + 1][x - 1] += 1;
			if (y + 1 >= 0 && x + 1 >= 0) vec[y + 1][x + 1] += 1;
		}
		if (s == 3) {
			if (y - 2 >= 0) vec[y - 2][x] += 1;
			if (y + 2 >= 0) vec[y + 2][x] += 1;
			if (x - 2 >= 0) vec[y][x - 2] += 1;
			if (x + 2 >= 0) vec[y][x + 2] += 1;
		}
	}
	cout << VVint_zero(vec) << endl;
	cout << VVint_max(vec) << endl;
	return 0;
}

C++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>

using namespace std;

double sq(double x){return x*x;}

int t[10][10];

int main(){
	int x,y,s;
	while(~scanf("%d,%d,%d",&x,&y,&s)){
		if(s == 1){
			for (int i = 0; i < 10; i++)
			{
				for (int j = 0; j < 10; j++)
				{
					if(abs(i-x) + abs(j-y) <= 1) t[i][j]++;
				}
			}
		} else if(s == 2){
			for (int i = 0; i < 10; i++)
			{
				for (int j = 0; j < 10; j++)
				{
					if(abs(i-x) <=1 && abs(j-y) <= 1) t[i][j]++;
				}
			}
		} else if(s == 3){
			for (int i = 0; i < 10; i++)
			{
				for (int j = 0; j < 10; j++)
				{
					if(abs(i-x) + abs(j-y) <= 2) t[i][j]++;
				}
			}
		}
	}

	int no = 0, big = 0;
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if(t[i][j] == 0) no++;
			big = max(big,t[i][j]);
		}
	}

	printf("%d\n%d\n",no,big);

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)

int f[10][10];

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

int main(){
	int x,y,size;
	while (scanf("%d,%d,%d",&x,&y,&size)){
		int x2,y2;
		switch (size){
			case 1:
				f[y][x]++;
				REP(i,4){
					x2=x+dx[i];
					y2=y+dy[i];
					if (x2>=0 && x2<10 && y2>=0 && y2<10){
						f[y2][x2]++;
					}
				}
				break;
			case 2:
				FOR(i,-1,2){
					FOR(j,-1,2){
						x2=x+i;
						y2=y+j;
						if (x2>=0 && x2<10 && y2>=0 && y2<10){
							f[y2][x2]++;
						}
					}
				}
				break;
			case 3:
				FOR(i,-1,2){
					FOR(j,-1,2){
						x2=x+i;
						y2=y+j;
						if (x2>=0 && x2<10 && y2>=0 && y2<10){
							f[y2][x2]++;
						}
					}
				}
				REP(i,4){
					x2=x+dx[i]*2;
					y2=y+dy[i]*2;
					if (x2>=0 && x2<10 && y2>=0 && y2<10){
						f[y2][x2]++;
					}
				}
				break;
		}
	}
	int e=0;
	int m=0;
	REP(i,10){
		REP(j,10){
			m=max(m,f[i][j]);
		}
	}
	REP(i,10){
		REP(j,10){
			if (f[i][j]==0){
				e++;
			}
		}
	}
	printf("%d\n%d\n",e,m);
	return 0;
}

C++: #include<iostream>

int paper[10][10]={};

void drop(int x,int y){
  if(x>=0&&y>=0&&x<=9&&y<=9){
    ++paper[x][y];
  }
}

void ink(int x,int y, int s){
  switch(s){
    case 3: drop(x+2,y);
            drop(x-2,y);
            drop(x,y+2);
            drop(x,y-2);
    case 2: drop(x+1,y+1);
            drop(x-1,y+1);
            drop(x-1,y-1);
            drop(x+1,y-1);
    case 1: drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
  }

}

int main(){
  int x,y,s;

  //drop(9,9);

  /*for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      std::cout << paper[i][j] << std::endl;
    }
  }*/

  while(std::scanf(" %d,%d,%d",&x,&y,&s)){
    //std::cout << x << y << s;
    ink(x,y,s);
  }

  int spase=0,max=0;

  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(paper[i][j]==0){
        ++spase;
      }
      if(paper[i][j]>max){
        max = paper[i][j];
      }
    }
  }

  std::cout << spase << std::endl;
  std::cout << max << std::endl;


}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
	int map[10][10]={};
	int x,y,s,nx,ny;
	int dx1[]={-1,0,0,0,1};
	int dy1[]={0,-1,0,1,0};
	int dx2[]={-1,-1,-1,0,0,0,1,1,1};
	int dy2[]={-1,0,1,-1,0,1,-1,0,1};
	int dx3[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2};
	int dy3[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
	char c;
	while(cin>>x>>c>>y>>c>>s){
		if(cin.eof())break;
		if(s==1){
			for(int i=0;i<5;i++){
				nx=x+dx1[i];
				ny=y+dy1[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}else if(s==2){
			for(int i=0;i<9;i++){
				nx=x+dx2[i];
				ny=y+dy2[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}else{
			for(int i=0;i<13;i++){
				nx=x+dx3[i];
				ny=y+dy3[i];
				if(0<=nx&&nx<10&&0<=ny&&ny<10)map[nx][ny]++;
			}
		}
	}
	int res=0,m=0;
	for(int i=0;i<10;i++)for(int j=0;j<10;j++)if(!map[i][j])res++;else if(map[i][j]>m)m=map[i][j];
	printf("%d\n%d\n",res,m);
    return 0;
}