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 <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

vector<vector<pii>> drop = {
  {{-1, 0}, {0, -1}, {0, 0}, {0, 1}, {1, 0}},
  {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 0}, {0, 1}, {1, -1}, {1, 0}, {1, 1}},
  {{-2, 0}, {-1, -1}, {-1, 0}, {-1, 1}, {0, -2}, {0, -1}, {0, 0}, {0, 1}, {0, 2}, {1, -1}, {1, 0}, {1, 1}, {2, 0}}
};

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int x, y, s;
  char c;
  int a[10][10] = {};
  while (cin >> x >> c >> y >> c >> s) {
    s--;
    for (auto i : drop[s]) {
      int ny = y + i.first, nx = x + i.second;
      if (ny >= 0 && ny < 10 && nx >= 0 && nx < 10) a[ny][nx]++;
    }
  }
  int sum = 0;
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) sum += a[i][j] == 0;
  }
  cout << sum << endl;
  cout << *max_element((int*)a, (int*)(a + 10)) << endl;

  return 0;
}

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

int pa[20][20];

int main(void)
{
	int x,y,c;

	while(scanf("%d,%d,%d", &x,&y,&c) != EOF){
		x += 5;
		y += 5;

		if(c == 1){
			for(int i = -1; i <= 1; i++){
				pa[y][x-i]++;
				pa[y-i][x]++;

			}
			pa[y][x]--;
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
		}
		else if(c == 3){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++)
					pa[y-i][x-j]++;
			}
			pa[y][x+2]++;
			pa[y+2][x]++;
			pa[y][x-2]++;
			pa[y-2][x]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 5; i <= 15; i++){
		for(int j = 5; j <= 15; j++){
			if(pa[i][j] > 0)
				count++;
			if(max < pa[i][j])
				max = pa[i][j];


		}

	}
	count = 100 - count;
	cout << count << endl << max << endl;


	return 0;
}

C++: #include <stdio.h>
  int xy[10][10]={};
  int main(){
	  int x,y,s,i,j,num=0;
	  while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
		  if(s==1){
			  xy[x][y]++;
			  xy[x-1][y]++;
			  xy[x+1][y]++;
			  xy[x][y-1]++;
			  xy[x][y+1]++;
		  }else if(s==2){
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
		  }else if(s==3){
			  xy[x-2][y]++;
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-2]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x][y+2]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
			  xy[x+2][y]++;
		  }
	  }
	  int max=xy[0][0];
	  for(i=0;i<10;i++){
		  for(j=0;j<10;j++){
			  if(xy[i][j]==0) num++;
			  if(xy[i][j]>max) max=xy[i][j];
		  }
	  }
	  printf("%d\n%d\n",num,max);
	  return 0;
  }

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

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

int main()
{
	int map[10][10];
	memset(map, 0, sizeof(map));
	int x, y, d;
	char c;

	while (cin >> x >> c >> y >> c >> d)
	{
		for (int i=0; i<=4*d; i++)
		{
			int tx = x + dx[i];
			int ty = y + dy[i];
			if (0 <= tx && tx < 10 && 0 <= ty && ty <= 10)
				map[ty][tx]++;
		}
	}

	int cnt = 0;
	int MAX = 0;
	for (int i=0; i<10; i++)
	for (int k=0; k<10; k++)
		if (map[i][k] == 0)
			cnt++;
		else if (map[i][k] > MAX)
			MAX = map[i][k];

	cout << cnt << endl;
	cout << MAX << endl;
}

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

#define scanf scanf_s
#define SIZE 10

using namespace std;

int format[3][12][2] = { { { 0,1 },{ 1,0 },{ 0,-1 },{ -1,0 } },
						 { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 } },
						 { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 },{ 0,2 },{ 2,0 },{ 0,-2 },{ -2,0 } } };

int main() {
	int dx, dy, x, y, s, count, most, map[SIZE][SIZE], num[3] = { 4,9,12 };

	count = 100;
	most = 0;
	while (scanf("%d,%d,%d", &x, &y, &s)) {
		x--;
		y--;
		s--;

		for (int i = 0; i < num[s]; i++) {
			dx = x + format[s][i][0];
			dy = y + format[s][i][1];

			if (dx < 0 || dx >= SIZE || dy < 0 || dy >= SIZE) {
				continue;
			}

			map[dx][dy]++;
			if (map[dx][dy] == 1) {
				count--;
			}

			if (map[dx][dy] > most) {
				most = map[dx][dy];
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int x,y,size;
	int paper[10][10] = { 0 };

	while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
		switch (size){
			case 1 : 	paper[x][y] += 1;
							paper[x-1][y] += 1;
							paper[x+1][y] += 1;
							paper[x][y-1] += 1;
							paper[x][y+1] += 1;
							break;

			case 2 : 	paper[x][y] += 1;
							paper[x-1][y] += 1;
							paper[x+1][y] += 1;
							paper[x][y-1] += 1;
							paper[x][y+1] += 1;
							paper[x-1][y-1] += 1;
							paper[x-1][y+1] += 1;
							paper[x+1][y-1] += 1;
							paper[x+1][y+1] += 1;
							break;

			case 3 : 	paper[x][y] += 1;
							paper[x-1][y] += 1;
							paper[x+1][y] += 1;
							paper[x][y-1] += 1;
							paper[x][y+1] += 1;
							paper[x-1][y-1] += 1;
							paper[x-1][y+1] += 1;
							paper[x+1][y-1] += 1;
							paper[x+1][y+1] += 1;
							paper[x-2][y] += 1;
							paper[x+2][y] += 1;
							paper[x][y-2] += 1;
							paper[x][y+2] += 1;
							break;
		}
	}
	int zcount = 0;
	int density = 0;

	for(int i = 0;i < 10;i++){
		for(int j = 0;j < 10;j++){
			if(paper[i][j] == 0){
				zcount++;
			}
			if(density < paper[i][j]){
				density = paper[i][j];
			}
		}
	}

	cout << zcount << endl << density << endl;
}