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>

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)+1){
    //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<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int x,y,size;
  int paper[15][15]={};
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    paper[y][x]++;
    if(y>0)paper[y-1][x]++;
    if(y<9)paper[y+1][x]++;
    if(x>0)paper[y][x-1]++;
    if(x<9)paper[y][x+1]++;

    if(size>1){

      if(y>0 && y<9)
	if(x>0 && x<9){
	  paper[y-1][x-1]++;
	  paper[y-1][x+1]++;
	  paper[y+1][x-1]++;
	  paper[y+1][x+1]++;
	}else if(x==0){
	  paper[y-1][x+1]++;
	  paper[y+1][x+1]++;
	}else if(x==9){
	  paper[y-1][x-1]++;
	  paper[y+1][x-1]++;
	}

      if(y==0){
	if(x>0)paper[y+1][x-1]++;
	if(x<9)paper[y+1][x+1]++;
      }else if(y==9){
	if(x>0)paper[y-1][x-1]++;
	if(x<9)paper[y-1][x+1]++;
      }

    }
    if(size==2){
      if(y>1)paper[y-2][x]++;
      if(y<8)paper[y+2][x]++;
      if(x>1)paper[y][x-2]++;
      if(x<8)paper[y][x+2]++;
    }

  }
  int white=0;
  int m=0;
  int i,j;

  rep(i,10)rep(j,10){
    if(paper[i][j]==0)white++;
    m=max(m,paper[i][j]);
  }
  cout<<white<<endl;
  cout<<m<<endl;
}

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

using namespace std;

int grid[14][14] = { 0 };

void small(int x, int y){
	grid[x][y]++;
	grid[x - 1][y]++;
	grid[x + 1][y]++;
	grid[x][y - 1]++;
	grid[x][y + 1]++;
}

void medium(int x, int y){
	small(x, y);
	grid[x - 1][y - 1]++;
	grid[x + 1][y - 1]++;
	grid[x - 1][y + 1]++;
	grid[x + 1][y + 1]++;
}

void large(int x, int y){
	medium(x, y);
	grid[x - 2][y]++;
	grid[x + 2][y]++;
	grid[x][y - 2]++;
	grid[x][y + 2]++;
}

int main(){
	int x, y, size;
	
	while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
		if (size == 1) small(x + 2, y + 2);
		else if (size == 2) medium(x + 2, y + 2);
		else if (size == 3) large(x + 2, y + 2);
	}

	int ans1 = 0;
	int ans2 = 0;

	for (int i = 2; i < 12; i++){
		for (int j = 2; j < 12; j++){
			if (grid[i][j] == 0)
				ans1++;
			else
				ans2 = max(ans2, grid[i][j]);
		}
	}

	printf("%d\n%d\n", ans1, ans2);

	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <complex>
using namespace std;
int main() {
	int paper[14][14] = { 0 };
	int fl, x, y;
	char split;
	while (cin >> x >>split>> y >>split>> fl) {
		if (fl == 2) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
		}
		if (fl == 1) {
			paper[x + 2][y + 2] += 1;
			paper[x + 1][y + 2] += 1;
			paper[x + 2][y + 1] += 1;
			paper[x + 3][y + 1] += 1;
			paper[x + 1][y + 3] += 1;
		}
		if (fl == 3) {
			for (int i = 0;i < 3;i++) {
				for (int j = 0;j < 3;j++) {
					paper[x + 1 + i][y + 1 + j] += 1;
				}
			}
				paper[x][y + 2] += 1;
				paper[x + 4][y + 2] += 1;
				paper[x + 2][y + 4] += 1;
				paper[x + 2][y] += 1;
		}
		int count = 0;
		int ans = 0;
		for (int i = 2;i < 12;i++) {
			for (int j = 2;j < 12;j++) {
				if (paper[i][j] == 0) count += 1;
				ans = max(ans, paper[i][j]);
			}
		}
		cout << count<<endl;
		cout << ans << endl;
	}
}

C++: #include<iostream>
#include<string>
int mem[14][14] = {}, i = 0, X[50], Y[50], S[50], flag = 0, max = 0, x, y, s;
int main() {
	char b;
	while (1) {
		std::cin >> x >> b >> y >> b >> s;
		Y[i] = y, S[i] = s, X[i] = x;
		i += 1;
		for (int a = 0; a < i; a += 1) {
			if (S[a] >= 1) {
				mem[X[a] + 2][Y[a] + 2] += 1;
				mem[X[a] + 1][Y[a] + 2] += 1;
				mem[X[a] + 3][Y[a] + 2] += 1;
				mem[X[a] + 2][Y[a] + 1] += 1;
				mem[X[a] + 2][Y[a] + 3] += 1;
			}
			if (S[a] >= 2) {
				mem[X[a] + 1][Y[a] + 1] += 1;
				mem[X[a] + 1][Y[a] + 3] += 1;
				mem[X[a] + 3][Y[a] + 1] += 1;
				mem[X[a] + 3][Y[a] + 3] += 1;
			}
			if (S[a] >= 3) {
				mem[X[a]][Y[a] + 2] += 1;
				mem[X[a] + 4][Y[a] + 2] += 1;
				mem[X[a] + 2][Y[a] + 4] += 1;
				mem[X[a] + 2][Y[a]] += 1;
			}
		}
		for (int i = 0; i < 10; i += 1)
			for (int j = 0; j < 10; j += 1) {
				if (0 == mem[i + 2][j + 2])
					flag += 1;
				if (max < mem[i + 2][j + 2])
					max = mem[i + 2][j + 2];
			}
		std::cout << flag << std::endl;
		std::cout << max << std::endl;
	}
	return 0;
}