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 <stdio.h>
using namespace std;
int m[14][14],h;

void small(int x,int y,int r) {
	m[x][y-r]++;
	m[x-r][y]++; m[x][y]++; m[x+r][y]++;
	m[x][y+r]++;
}
void middle(int x,int y) {
	for (int i=-1; i<2; i++) for (int j=-1; j<2; j++) m[x+i][y+j]++;
}
void large(int x,int y) {
	middle(x,y);
	small(x,y,2);
    m[x][y]--;
}

int main() {
	int x,y,n,i,j,h,k;
	while(scanf("%d,%d,%d",&x,&y,&n)) {
		x+=2; y+=2;
		if (n==1) small(x,y,1); 
		if (n==2) middle(x,y);
		if (n==3) large(x,y);
	}
    n=0; h=0; k=0;
	for (i=2;i<12;i++) for (j=2;j<12;j++) {
		if (m[i][j]==0) k++; else h=h<m[i][j] ? m[i][j] : h;
	}
    cout << k << endl << h << endl;
	return 0;
	}

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

int main() {
	int p[14][14] = {};
	int x, y, s;
	int ca = 0;
	int a = 0;
	while (scanf("%d,%d,%d", &x, &y, &s) + 1) {
		if (s == 1) {
			p[x + 2][y + 2] += 1;
			p[x + 3][y + 2] += 1;
			p[x + 2][y + 1] += 1;
			p[x + 2][y + 3] += 1;
			p[x + 1][y + 2] += 1;
		}

		if (s == 2) {
			p[x + 2][y + 2] += 1;
			p[x + 3][y + 2] += 1;
			p[x + 2][y + 1] += 1;
			p[x + 2][y + 3] += 1;
			p[x + 1][y + 2] += 1;
			p[x + 3][y + 3] += 1;
			p[x + 3][y + 1] += 1;
			p[x + 1][y + 1] += 1;
			p[x + 1][y + 3] += 1;
		}

		if (s == 3) {
			p[x + 2][y + 2] += 1;
			p[x + 3][y + 2] += 1;
			p[x + 2][y + 1] += 1;
			p[x + 2][y + 3] += 1;
			p[x + 1][y + 2] += 1;
			p[x + 3][y + 3] += 1;
			p[x + 3][y + 1] += 1;
			p[x + 1][y + 1] += 1;
			p[x + 1][y + 3] += 1;
			p[x + 4][y + 2] += 1;
			p[x][y + 2] += 1;
			p[x + 2][y + 4] += 1;
			p[x + 2][y] += 1;
		}
	}
	a = p[2][2];
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (p[i][j] == 0) {
				ca++;
			}
			if (p[i][j] > a) {
				a = p[i][j];
			}
		}
	}
	cout << ca << endl << a << endl;
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
//#include <sstream>
//#include <queue>

using namespace std;


int main(){

	int field[14][14];
	int x, y, s,cntz = 0,max = 0;
	char c;

	for (int i = 0; i < 14; i++){
		for (int j = 0; j < 14; j++){
			field[i][j] = 0;
		}
	}


	while (cin >> x >> c >> y >> c >> s){

		//?°?
		if (s == 1){
			field[x + 2][y + 2]++;
			field[x + 2][y + 1]++;
			field[x + 2][y + 3]++;
			field[x + 1][y + 2]++;
			field[x + 3][y + 2]++;
		}
		//????????§
		if (s == 2 || s == 3){
			for (int i = -1; i <= 1; i++){
				for (int j = -1; j <= 1; j++){
					field[x + 2 + i][y + 2 + j]++;
				}
			}
		}
		//??§
		if (s == 3){
			field[x + 2][y]++;
			field[x + 2][y + 4]++;
			field[x][y + 2]++;
			field[x + 4][y + 2]++;
		}

	}

	for (int i = 2; i < 12; i++){
		for (int j = 2; j < 12; j++){
			if (field[i][j] == 0)cntz++;
			if (field[i][j] > max)max = field[i][j];
		}
	}

	cout << cntz << endl;
	cout << max << endl;

	return 0;
}

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

int G[10][10];

bool inF(int x, int y) { return 0<=x<10 && 0<=y<10; }

void draw(int x, int y) {
  if(inF(x, y)) {
    G[y][x] ++;
  }
}

int main() {
  int a, b, c;
  char d;

  fill(G[0], G[9]+10, 0);
  
  while(cin >> a >> d >> b >> d >> c) {
    draw(a, b);
    switch(c) {
    case 3:
      draw(a-2, b);
      draw(a+2, b);
      draw(a, b-2);
      draw(a, b+2);
    case 2:
      draw(a-1, b-1);
      draw(a+1, b-1);
      draw(a-1, b+1);
      draw(a+1, b+1);
    case 1:
      draw(a-1, b);
      draw(a+1, b);
      draw(a, b-1);
      draw(a, b+1);
      break;
    }
  }
  
  int clrNum = 0, mx=0;  
  
  for(int i=0; i<10; i++) {
    for(int j=0; j<10; j++) {
      mx = max(mx, G[i][j]);
      if(G[i][j]==0) clrNum ++;
    }
  }

  cout << clrNum << endl << mx << endl;
  
  return 0;
}

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

using namespace std;

int sx[] = { 0, 1, 0, -1 };
int sy[] = { -1, 0, 1, 0 };
int mx[] = { -1, 0, 1, 1, 1, 0, -1, -1 };
int my[] = { -1, -1, -1, 0, 1, 1, 1, 0 };
int lx[] = { -1, 0, 1, 1, 1, 0, -1, -1, 0, 2, 0, -2 };
int ly[] = { -1, -1, -1, 0, 1, 1, 1, 0, -2, 0, 2, 0 };

int main() {
    int paper[10][10] = { 0 };
    int x, y, s, nx, ny;
    while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
        if (s == 1) {
            for (int i = 0; i < 4; i++) {
                nx = x + sx[i];
                ny = y + sy[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
        else if (s == 2) {
            for (int i = 0; i < 8; i++) {
                nx = x + mx[i];
                ny = y + my[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
        else {
            for (int i = 0; i < 12; i++) {
                nx = x + lx[i];
                ny = y + ly[i];
                if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) {
                    continue;
                }
                paper[ny][nx]++;
            }
        }
    }
    
    int none = 0, maxc = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (paper[i][j] == 0) {
                none++;
            }
            maxc = max(maxc, paper[i][j]);
        }
    }
    cout << none << endl << maxc << endl;
    
    return 0;
}