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>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
constexpr int MOD = 1000000007;
constexpr int INF = 2000000000;
using namespace std;


int main() {
	int map[50][50] = { 0 };
	int a, b, c;
	char ch;
	while (cin >> a >> ch >> b >> ch >> c) {
		map[b][a]++;
		if (c == 1) {
			map[b + 1][a]++;
			map[b - 1][a]++;
			map[b][a + 1]++;
			map[b][a - 1]++;
		}
		else if (c == 2) {
			map[b - 1][a - 1]++;
			map[b - 1][a]++;
			map[b - 1][a + 1]++;
			map[b][a + 1]++;
			map[b + 1][a + 1]++;
			map[b + 1][a]++;
			map[b + 1][a - 1]++;
			map[b][a - 1]++;
		}
		else {
			map[b - 1][a - 1]++;
			map[b - 1][a]++;
			map[b - 1][a + 1]++;
			map[b][a + 1]++;
			map[b + 1][a + 1]++;
			map[b + 1][a]++;
			map[b + 1][a - 1]++;
			map[b][a - 1]++;
			map[b + 2][a]++;
			map[b - 2][a]++;
			map[b][a + 2]++;
			map[b][a - 2]++;
		}
	}
	int ans = 0, maxl = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (!map[i][j])ans++;
			maxl = max(maxl, map[i][j]);
		}
	}
	cout << ans << endl << maxl << endl;
}

C++: #include<iostream>
using namespace std;
int ink[14][14] = {};

int main() {
	int x, y, s;
	char c;
	while (cin >> x >> c >> y >> c >> s) {
		x += 2; y += 2;
		if (s == 1) {
			ink[y - 1][x]++;
			ink[y][x - 1]++;
			ink[y][x]++;
			ink[y][x + 1]++;
			ink[y + 1][x]++;
		}
		else if (s == 2) {
			ink[y - 1][x - 1]++;
			ink[y - 1][x]++;
			ink[y - 1][x + 1]++;
			ink[y][x - 1]++;
			ink[y][x]++;
			ink[y][x + 1]++;
			ink[y + 1][x - 1]++;
			ink[y + 1][x]++;
			ink[y + 1][x + 1]++;
		}
		else if (s == 3) {
			ink[y - 2][x]++;
			ink[y - 1][x - 1]++;
			ink[y - 1][x]++;
			ink[y - 1][x + 1]++;
			ink[y][x - 2]++;
			ink[y][x - 1]++;
			ink[y][x]++;
			ink[y][x + 1]++;
			ink[y][x + 2]++;
			ink[y + 1][x - 1]++;
			ink[y + 1][x]++;
			ink[y + 1][x + 1]++;
			ink[y + 2][x]++;
		}
	}
	int cnt = 0, max = 0;
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (ink[i][j]) cnt++;
			if (ink[i][j] > max) max = ink[i][j];
		}
	}
	cout << 100 - cnt << endl << max << endl;
}

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

int main(int argc, char *argv[]) {
	vector<vector<int> > cell_list(10, vector<int>(10, 0));
	const int small_x[4] = {0, 1, 0, -1};
	const int small_y[4] = {-1, 0, 1, 0};
	const int middle_x[4] = {1, 1, -1, -1};
	const int middle_y[4] = {-1, 1, 1, -1};
	const int large_x[4] = {0, 2, 0, -2};
	const int large_y[4] = {2, 0, -2, 0};
	
	while (true) {
		int x, y, size;
		if (EOF == fscanf(stdin, "%d,%d,%d\n", &x, &y, &size)) {
			break;
		}
		// center
		if (x >= 0 && x < 10 && y >= 0 && y < 10) {
			cell_list[y][x]++;
		}
		// small
		for (int i = 0; i < 4; i++) {
			if (x+small_x[i] >= 0 && y+small_y[i] >= 0 &&
				x+small_x[i] < 10 && y+small_y[i] < 10) {
				cell_list[y+small_y[i]][x+small_x[i]]++;
			}
		}
		// middle
		if (size > 1) {
			for (int i = 0; i < 4; i++) {
				if (x+middle_x[i] >= 0 && y+middle_y[i] >= 0 &&
					x+middle_x[i] < 10 && y+middle_y[i] < 10) {
					cell_list[y+middle_y[i]][x+middle_x[i]]++;
				}
			}
			// large
			if (size > 2) {
				for (int i = 0; i < 4; i++) {
					if (x+large_x[i] >= 0 && y+large_y[i] >= 0 &&
						x+large_x[i] < 10 && y+large_y[i] < 10) {
						cell_list[y+large_y[i]][x+large_x[i]]++;
					}
				}
			}
		}
	}
	
	// calc empty cell and max
	int sum_empty = 0, max = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (cell_list[i][j] == 0) sum_empty++;
			if (cell_list[i][j] > max) max = cell_list[i][j];
		}
	}
	
	// print result
	printf("%d\n%d\n", sum_empty, max);
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int paper[10][10],x,y,size,i,j;
  string s;
  for(i=0; i<10; i++)
    for(j=0; j<10; j++)
      paper[i][j]=0;

  while(cin>>s){
    x=s.at(0)-'0';
    y=s.at(2)-'0';
    size=s.at(4)-'0';
      paper[x][y]++;
      if(x>0) paper[x-1][y]++;
      if(x<9) paper[x+1][y]++;
      if(y>0) paper[x][y-1]++;
      if(y<9) paper[x][y+1]++;

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

  int n=0,max=0;
  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(paper[i][j]==0)n++;
      if(paper[i][j]>max)max=paper[i][j];
    }
  }
  cout<<n<<"\n"<<max<<endl;
}

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

int main(void){

	int map[10][10],ink,x,y,max=0,count=0;
	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++){
			map[i][j]=0;
		}
	}
	
	
	while(scanf("%d,%d,%d",&x,&y,&ink)!=EOF){
		map[y][x]++;
		for(int i=0;i<ink*4;i++){
			int mx=x+dx[i];
			int my=y+dy[i];
			if(mx>=0 && mx<10 && my>=0 && my<=10){
				map[my][mx]++;
			}
		}
	}
	
	
	for(int y=0;y<10;y++){
		for(int x=0;x<10;x++){
			if(map[y][x]==0){
				count++;
			}
			if(map[y][x]>max){
				max=map[y][x];
			}
		}
	}
	printf("%d\n%d\n",count,max);
}