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

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

int
main(void)
{
	char line[80];
	int p[10][10];

	memset(p, 0, sizeof p);
	
	auto setp = [&p](int x, int y) {
			if (0 <= x && x < 10 && 0 <= y && y <10) {
				(p[x][y]) ++;
			}
		};
	
	int x, y, s;
	
	while (true) {
		if (fgets(line, sizeof line, stdin) == NULL) {
			break;
		}
		if (sscanf(line, "%d,%d,%d", &x, &y, &s) != 3) {
			break;
		}

		if (s == 1) {
			setp(x-1, 	y);
			setp(x, 	y);
			setp(x+1, 	y);
			setp(x, 	y-1);
			setp(x, 	y+1);
			
		} else if (s == 2) {
			for (int dx = -1; dx <= 1; dx++) {
				for (int dy = -1; dy <= 1; dy++) {
					setp(x+dx, y+dy);
				}
			}
		} else {
			for (int dx = -1; dx <= 1; dx++) {
				for (int dy = -1; dy <= 1; dy++) {
					setp(x+dx, y+dy);
				}
			}
			setp(x-2, 	y);
			setp(x+2, 	y);
			setp(x, 	y-2);
			setp(x, 	y+2);
		}
	}

	int b = 0;
	int k = 0;
	for (int y = 0; y < 10; y++) {
		for (int x = 0; x < 10; x++) {
			if (p[x][y] == 0) {
				b++;
			} else if (k < p[x][y]) {
				k =  p[x][y];
			}
		}
	}

	printf("%d\n%d\n", b, k);

	return 0;
}

C++: #include <stdio.h>

int main(){
	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);
}

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

using namespace std;

int main(){
	int masu[14][14] = {0};
	int x, y, s, i, j, n = 0, cut = 0;
	int num[100] = {0};

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		x = x + 2;
		y = y + 2;
		masu[x][y] ++;
		if(s == 1){
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
		}
		else if(s == 2){
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
			masu[x+1][y-1] += 1, masu[x+1][y+1] += 1, masu[x-1][y-1] += 1, masu[x-1][y+1] += 1;
		}
		else{
			masu[x][y-1] += 1, masu[x][y+1] += 1, masu[x-1][y] += 1, masu[x+1][y] += 1;
			masu[x+1][y-1] += 1, masu[x+1][y+1] += 1, masu[x-1][y-1] += 1, masu[x-1][y+1] += 1;
			masu[x+2][y] += 1, masu[x-2][y] += 1, masu[x][y+2] +=1, masu[x][y-2] += 1;
		}
		
	}

	for(i = 2; i < 12; i ++){
		for(j = 2; j < 12; j ++){
			num[n] = masu[i][j];
			n ++;
		}
	}

	sort(num, num+100);

	for(i =0; i < 100; i ++){
		if(num[i] == 0) cut ++;
		else break;
	}

	cout << cut << endl << num[99] << endl;

	return 0;    
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		
		while(1){
			data[x][y]++;
			if(y-1>=0)data[x][y-1]++;
			if(x+1<10)data[x+1][y]++;
			if(y+1<10)data[x][y+1]++;
			if(x-1>=0)data[x-1][y]++;
			if(s==1)break;
			if(x+1<10 && y+1<10)data[x+1][y+1]++;
			if(x+1<10 && y-1>=0)data[x+1][y-1]++;
			if(x-1>=0 && y-1>=0)data[x-1][y-1]++;
			if(x-1>=0 && y+1<10)data[x-1][y+1]++;
			if(s==2)break;
			if(x+2<10)data[x+2][y]++;
			if(y-2>=0)data[x][y-2]++;
			if(y+2<10)data[x][y+2]++;
			if(x-2>=0)data[x-2][y]++;
			break;
		}
		
	}
	int white=0,ma=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<" "<<ma<<endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
typedef pair<int,int> pint;
#define rep(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
int dx[]={1,-1,0,0},dy[]={0,0,1,-1};

int m[10][10];
int main(){
	int x,y,size;
	for(;~scanf("%d,%d,%d",&x,&y,&size);){
		m[x][y]++;
		x<9&&m[x+1][y]++;
		y<9&&m[x][y+1]++;
		x>0&&m[x-1][y]++;
		y>0&&m[x][y-1]++;
		if(size>=2){
			x<9&&y<9&&m[x+1][y+1]++;
			x<9&&y>0&&m[x+1][y-1]++;
			x>0&&y<9&&m[x-1][y+1]++;
			y>0&&y>0&&m[x-1][y-1]++;
		}
		if(size==3){
			x<8&&m[x+2][y]++;
			y<8&&m[x][y+2]++;
			x>1&&m[x-2][y]++;
			y>1&&m[x][y-2]++;
		}
	}
	int mx=0,k=0;
	rep(i,10){
		rep(j,10){
			mx=max(mx,m[i][j]);
			if(!m[i][j])k++;
		}
	}
	cout<<k<<endl<<mx<<endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>

using namespace std;

const double eps=1e-10;

int main()
{
	int x,y,s,c[14][14]={0};
	while(scanf("%d,%d,%d",&x,&y,&s)){
		x+=2; y+=2;

		c[y][x]++;
		c[y+1][x]++; c[y-1][x]++;
		c[y][x+1]++; c[y][x-1]++;

		if(s>=2){
			c[y-1][x-1]++; c[y-1][x+1]++;
			c[y+1][x-1]++; c[y+1][x+1]++;
		}

		if(s==3){
			c[y-2][x]++; c[y+2][x]++;
			c[y][x-2]++; c[y][x+2]++;
		}

	}

	int w=0,d=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(c[i][j]==0) w++;
			d=max(d,c[i][j]);
		}
	}

	cout<<w<<endl<<d<<endl;


	return 0;
}