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>

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];
			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 <algorithm>
#include <cstdio>

using namespace std;

int p[10][10];

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

int main (void) {
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            p[i][j] = 0;
        }
    }
    while (1) {
        int x, y, s;
        if (scanf("%d,%d,%d", &x, &y, &s) == EOF) break;
        if (cin.eof()) break;
        p[x][y]++;
        if (s == 1) {
            F(x + 1, y    );
            F(x - 1, y    );
            F(x    , y + 1);
            F(x    , y - 1);
        } else if (s == 2) {
            F(x + 1, y + 1);
            F(x + 1, y    );
            F(x + 1, y - 1);
            F(x    , y + 1);
            F(x    , y - 1);
            F(x - 1, y + 1);
            F(x - 1, y    );
            F(x - 1, y - 1);
        } else {
            F(x + 1, y + 1);
            F(x + 1, y    );
            F(x + 1, y - 1);
            F(x    , y + 1);
            F(x    , y - 1);
            F(x - 1, y + 1);
            F(x - 1, y    );
            F(x - 1, y - 1);
            F(x + 2, y    );
            F(x - 2, y    );
            F(x    , y + 2);
            F(x    , y - 2);
        }
    }
    int e = 0, m = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (p[i][j] == 0) e++;
            m = max(m, p[i][j]);
        }
    }
    cout << e << endl;
    cout << m << endl;
    return 0;
}

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

typedef struct {
	int x, y;
}P;
vector<P> vs = {
	{0, -1}, { -1,0 }, { 0,0 }, { 0,1 }, { 1,0 }
};
vector<P> vm = {
	{-1,-1},{-1,0},{-1,1},{0,-1},{0,0},{0,1},{1,-1},{1,0},{1,1}
};
vector<P> vl = {
	{-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}
};

bool ok(P p1, P p2) {
	int x = p1.x + p2.y;
	int y = p1.y + p2.y;
	return x >= 0 && x < 10 && y >= 0 && y < 10;
}

int s, p[10][10] = { 0 };
P c;

int main(){
	while (scanf("%d,%d,%d",&c.x, &c.y, &s) != EOF) {
		vector<P>::iterator itr = s == 1 ? vs.begin() : s == 2 ? vm.begin() : vl.begin();
		vector<P>::iterator e = s == 1 ? vs.end() : s == 2 ? vm.end() : vl.end();
		while (itr != e) {
			if (ok(c, *itr)) {
				p[c.x + itr->x][c.y + itr->y]++;
			}
			itr++;
		}
	}
	int sum = 0, b = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (p[i][j] > 0) {
				sum++;
				if (p[i][j] > b) {
					b = p[i][j];
				}
			}
		}
	}
	printf("%d\n%d\n", sum, b);

	return 0;
}

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

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)

int paper[10][10];
const int dx[] = {0,0,1,-1};
const int dy[] = {1,-1,0,0};
const int diax[] = {1,1,-1,-1};
const int diay[] = {-1,1,1,-1};

void dai(int x, int y){
	REP(z,1,3)rep(k,4){
		int tx = x+dx[k]*z , ty = y+dy[k]*z;
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
	rep(k,4){
		int tx = x+diax[k] , ty = y+diay[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}
void chuu(int x, int y){
	rep(k,4){
		int tx = x+dx[k] , ty = y+dy[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
	rep(k,4){
		int tx = x+diax[k] , ty = y+diay[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}
void shou(int x, int y){
	rep(k,4){
		int tx = x+dx[k] , ty = y+dy[k];
		if( tx<0 || ty<0 || tx>=10 || ty>=10 )continue;
		paper[ty][tx]++;
	}
}

int main(){
	int x,y,sz;
	memset(paper,0,sizeof(paper));
	while(~scanf("%d,%d,%d",&x,&y,&sz)){
		if( sz==3 )      dai(x,y);
		else if( sz==2 ) chuu(x,y);
		else             shou(x,y);
	}
	int nasi = 0, ari = 0;
	rep(i,10)rep(j,10){
		if( paper[i][j]==0 )nasi++;
		else{
			ari = max(ari,paper[i][j]);
		}
	}
	printf("%d\n%d\n",nasi,ari);
	return 0;
}

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

using namespace std;

int grid[14][14] = { 0 };

void small(int x, int y){
	grid[x][y]++;
	grid[x - 1][y]++;
	grid[x + 1][y]++;
	grid[x][y - 1]++;
	grid[x][y + 1]++;
}

void medium(int x, int y){
	small(x, y);
	grid[x - 1][y - 1]++;
	grid[x + 1][y - 1]++;
	grid[x - 1][y + 1]++;
	grid[x + 1][y + 1]++;
}

void large(int x, int y){
	medium(x, y);
	grid[x - 2][y]++;
	grid[x + 2][y]++;
	grid[x][y - 2]++;
	grid[x][y + 2]++;
}

int main(){
	int x, y, size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		if (size == 1) small(x + 2, y + 2);
		else if (size == 2) medium(x + 2, y + 2);
		else if (size == 3) large(x + 2, y + 2);
	}

	int ans1 = 0;
	int ans2 = 0;

	for (int i = 2; i < 10; i++){
		for (int j = 2; j < 10; j++){
			if (grid[i][j] == 0)
				ans1++;
			else
				ans2 = max(ans2, grid[i][j]);
		}
	}

	printf("%d\n%d\n", ans1, ans2);

	return 0;
}