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;

int main() {
	int pap[10][10];
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			pap[i][j] = 0;
		}
	}
	int x, y, s;
	int ca = 0;
	int p = 0;
	while (scanf("%d,%d,%d", &x, &y, &s)+1) {

		if (s == 1) {
			pap[x][y] + 1;
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
		}

		if (s == 2) {
			pap[x][y] += 1;
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }
		}

			if (s == 3) {
				pap[x][y] += 1;
				if (x + 1 < 10) { pap[x + 1][y] += 1; }
				if (x - 1 > -1) { pap[x - 1][y] += 1; }
				if (y + 1 < 10) { pap[x][y + 1] += 1; }
				if (y - 1 > -1) { pap[x][y - 1] += 1; }
				if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
				if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
				if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
				if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }
				if (x + 2 < 10) { pap[x + 2][y] += 1; }
				if (x - 2 > -1) { pap[x - 2][y] += 1; }
				if (y + 2 < 10) { pap[x][y + 2] += 1; }
				if (y - 2 > -1) { pap[x][y - 2] += 1; }
			}
		
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 10; j++) {
					if (pap[i][j] == 0) { ca++; }
					if (p < pap[i][j]) { p = pap[i][j]; }
				}
			}
	}
	cout << ca << endl << p << endl;
	return 0;
}

C++: #include <cstdio>

int ds[][2]={{0,0},{1,0},{0,1},{-1,0},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1},{2,0},{0,2},{-2,0},{0,-2}};
int map[10][10],kosa,rest=100;

int max(int a,int b){return a>b?a:b;}

int drop(int x,int y){
  if(x>=0 && x<10 && y>=0 && y<10){
    if(map[x][y]++==0) rest--;
    kosa=max(map[x][y],kosa);
  }
}

int main(){
  int x,y,size;
  while(~scanf("%d,%d,%d",&x,&y,&size))
    for(int i=0; i<=4*size; i++)
      drop(x+ds[i][0],y+ds[i][1]);

  printf("%d %d\n",rest,kosa);
}

C++: #include <stdio.h>

int main(){
	int mass[14][14];
	int x,y,size;
	
	int i,j;
	
	int max = 0;
	int n = 0;
	
	for(i = 0;i < 14;i++){
		for(j = 0;j < 14;j++){
			mass[i][j] = 0;
		}
	}
	
	while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
		x += 2;
		y += 2;
		if(size == 1){
			for(i = -1,mass[x][y]--;i < 2;i++){
				mass[x+i][y]++;
				mass[x][y+i]++;
			}
		}else if(size == 2){
			for(i = -1;i < 2;i++){
				for(j = -1;j < 2;j++){
					mass[x+i][y+j]++;
				}
			}
		}else{
			for(i = -1;i < 2;i++){
				for(j = -1;j < 2;j++){
					mass[x+i][y+j]++;
				}
			}
			
			for(i = -2;i <= 2;i += 4){
				mass[x+i][y]++;
				mass[x][y+i]++;
			}
		}
	}
	
	for(i = 2;i < 12;i++){
		for(j = 2;j < 12;j++){
			if(mass[j][i] == 0){
				n++;
			}else if(mass[j][i] > max){
				max = mass[j][i];
			}
		}
	}
	
	printf("%d\n",n);
	printf("%d\n",max);
	
	return 0;
}

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

using namespace std;

int peper[15][15];

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

int main()
{
	int x, y;
	int size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		peper[y][x]++;
		paint(x, y - 1);
		paint(x, y + 1);
		paint(x - 1, y);
		paint(x + 1, y);

		if (size > 1){
			paint(x + 1, y - 1);
			paint(x + 1, y + 1);
			paint(x - 1, y + 1);
			paint(x - 1, y - 1);
		}
		if (size > 2){
			paint(x, y - 2);
			paint(x, y + 2);
			paint(x - 2, y);
			paint(x + 2, y);
		}
	}
	int dark = 0;
	int blank = 0;
	
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (peper[i][j] == 0)	blank++;
			dark = max(dark, peper[i][j]);
		}
	}
	printf("%d\n%d\n", blank, dark);
	return (0);
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#define rep(i,n) for(int i=0;i < n;i++)

using namespace std;

int p[10][10];
int cnt = 0,Max = 0;
void ink(int x,int y){
  if(0<=x && x < 10|| 0<=y && y<10)p[x][y]++;
}

int main(){

    rep(i,10)rep(j,10){
      p[i][j] = 0;
    }
    int x,y,size;
  while(~scanf("%d,%d,%d",&x,&y,&size)){





    if(size == 1){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
    }else  if(size == 2){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
    }else  if(size == 3){
      ink(x,y);
      ink(x+1,y);
      ink(x-1,y);
      ink(x,y+1);
      ink(x,y-1);
      ink(x+1,y+1);
      ink(x-1,y+1);
      ink(x-1,y-1);
      ink(x+1,y-1);
      ink(x+2,y);
      ink(x-2,y);
      ink(x,y+2);
      ink(x,y-2);
    }
     cnt =Max = 0;
    rep(i,10)rep(j,10){
      if(p[i][j]==0)cnt++;
      Max = max(Max,p[i][j]);
    }
}
    cout << cnt <<"\n" << Max << endl;


  return 0;
}