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++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>

typedef long long ll;
using namespace std;


void paint(int cell[10][10],int x, int y, int size,int *maxC){
	if(size == 3){
		for(int i=x-2;i<=x+2;i++){
			for(int j=y-2;j<=y+2;j++){
				if(sqrt(pow((double)i-(double)x,2.0) + pow((double)j-(double)y,2.0)) <= 2.0){
					if(i >=0 && i< 10 && j>= 0&& j<10){
						cell[j][i]++;
						*maxC = max(cell[j][i],*maxC);
					}
				}
			}
		}
	}

	if(size == 2){
		for(int i=x-1;i<=x+1;i++){
			for(int j=y-1;j<=y+1;j++){
				if(i >=0 && i< 10 && j>= 0&& j<10){
					cell[j][i]++;
					*maxC = max(cell[j][i],*maxC);
				}
			}
		}
	}

	if(size == 1){
		for(int i=-1;i<=1;i++){
			for(int j=-1;j<=1;j++){
				if(abs(i*j) == 1) continue;
				if(i >=0 && i< 10 && j>= 0&& j<10){
					cell[y+i][x+j]++;
					*maxC = max(cell[y+i][x+j],*maxC);
				}
			}
		}
	}
}

int main()
{
	int cell[10][10];
	fill((int*)cell,(int*)cell+10*10,0);
	string str;
	int maxC=0;
	int count=0;
	while(getline(cin,str,',')){
		string str2;

		getline(cin,str2,',');
		string str3;

		getline(cin,str3);		
		paint(cell,str[0]-'0',str2[0]-'0',str3[0]-'0',&maxC);
		
	}
	for(int i=0;i<10;i++) for(int j=0;j<10;j++) count += cell[i][j] == 0 ? 1 : 0;
	cout << count << endl;
	cout << maxC << endl;
}

C++: #include <stdio.h>

#define SIZE 10
int main(void){
    int paper[SIZE+4][SIZE+4];
    int x, y, s;
    int branks, darkest;
    
    for (int i=0; i<SIZE+4; i++){
        for (int j=0; j<SIZE+4; j++){
            paper[i][j]=0;
        }
	}
	
    while (scanf("%d,%d,%d", &x, &y, &s)!= EOF){
        x+=2; y+=2;
        switch (s){
        case 3:
            paper[x  ][y-2]++;
            paper[x-2][y  ]++;
            paper[x  ][y+2]++;
            paper[x+2][y  ]++;
        case 2:
            paper[x-1][y-1]++;
            paper[x-1][y+1]++;
            paper[x+1][y+1]++;
            paper[x+1][y-1]++;
        case 1:
            paper[x  ][y-1]++;
            paper[x-1][y  ]++;
            paper[x  ][y  ]++;
            paper[x+1][y  ]++;
            paper[x  ][y+1]++;
            break;
        }
    }

    branks=0; darkest=0;
    for (int i=2; i<SIZE+2; i++){
        for (int j=2; j<SIZE+2; j++){
            if (paper[i][j]==0) branks++;
            if (paper[i][j]>darkest) darkest=paper[i][j];
        }
	}
    printf("%d\n%d\n", branks, darkest);
    return 0;
}

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",count,max);
}

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

int pa[20][20];

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

	while(true){
		cin >> x;
		if(cin.eof())
			break;
		cin.get();
		cin >> y;
		cin.get();
		cin >> c;

		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+2][x+2]++;
			pa[y+2][x-2]++;
			pa[y-2][x-2]++;
			pa[y-2][x+2]++;
		}	
	}

	int count = 0, max = 0;

	for(int i = 1; i <= 10; i++){
		for(int j = 1; j <= 10; j++){
			if(pa[i][j])
				count++;
			if(max < pa[i][j])
				max = pa[i][j];
		}
	}
	cout << 100-count << endl << max << endl;


	return 0;
}

C++: #include <iostream>
#include <stdio.h>

int paper[10][10]={0};

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

void drop(int x, int y, int size)
{
	switch(size)
	{
		case 1:
			paint(x-1, y);
			paint(x+1, y);
			paint(x, y-1);
			paint(x, y+1);
			paint(x, y);
			break;
		case 2:
			drop(x,y,1);
			paint(x-1, y-1); paint(x-1, y+1);
			paint(x+1, y-1); paint(x+1, y+1);
			break;
		case 3:
			drop(x,y,2);
			paint(x-2,y);paint(x,y-2);
			paint(x+2,y);paint(x,y+2);
			break;
	}
	return;
}

int main(void)
{
	int x,y,s;
	while(~scanf("%d,%d,%d",&x,&y,&s))
		drop(x,y,s);

	int blank=0;
	int max=0;
	for(int i=0; i<10; i++)
		for(int j=0; j<10; j++)
		{
			if(paper[i][j]==0)
				blank++;
			if(paper[i][j] > max)
				max = paper[i][j];
		}
	std::cout << blank << std::endl << max << std::endl;

	return 0;
}