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<iostream>
using namespace std;
int a[10][10]={0};

void small(int x,int y){
	a[x][y]++;
	if(x!=0)a[x-1][y]++;
	if(x!=9)a[x+1][y]++;
	if(y!=0)a[x][y-1]++;
	if(y!=9)a[x][y+1]++;
}

void middle(int x,int y){
	small(x,y);
	if(x!=0&&y!=0)a[x-1][y-1]++;
	if(x!=9&&y!=0)a[x+1][y-1]++;
	if(x!=0&&y!=9)a[x-1][y+1]++;
	if(x!=9&&y!=9)a[x+1][y+1]++;
}

void large(int x,int y){
	middle(x,y);
	if(x>=2)a[x-2][y]++;
	if(x<=7)a[x+2][y]++;
	if(y>=2)a[x][y-2]++;
	if(y<=7)a[x][y+2]++;
}

int main(){
	
	int x,y,z;
	while(cin>>x>>y>>z){
		if(z==1){small(x,y);}
		if(z==2){middle(x,y);}
		if(z==3){large(x,y);}
	}
	int white=0,koi=0;
	for(int i=0;i<=9;i++){
		for(int j=0;j<=9;j++){
			if(a[i][j]==0)white++;
			if(a[i][j]>koi)koi=a[i][j];
		}
	}
	cout<<white<<endl<<koi;
}

C++: #include<stdio.h>
int main(void)
{
	int p[15][15];
	int x,y,z;
	int i,j;
	int max,cnt;
	max=0;
	cnt=0;
	
	for(i=0;i<14;i++){
		for(j=0;j<14;j++){
			p[i][j]=0;
		}
	}
	while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
		p[x+2][y+2]++;
		p[x+3][y+2]++;
		p[x+1][y+2]++;
		p[x+2][y+3]++;
		p[x+2][y+1]++;
		if(z==2){
			p[x+3][y+3]++;
			p[x+3][y+1]++;
			p[x+1][y+3]++;
			p[x+1][y+1]++;
		}
		else if(z==3){
			p[x+3][y+3]++;
			p[x+3][y+1]++;
			p[x+1][y+3]++;
			p[x+1][y+1]++;
			p[x+4][y+2]++;
			p[x][y+2]++;
			p[x+2][y+4]++;
			p[x+2][y]++;
		}
	/*	for(i=2;i<12;i++){
			for(j=2;j<12;j++){
				printf("%d ",p[i][j]);
			}
			printf("\n");
		}
		printf("\n");
	*/}
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(p[i][j]==0){
				cnt++;
			}
			else if(max<p[i][j]){
				max=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",cnt,max);
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back 
#define pf push_front 
#define mp make_pair
#define fr first
#define sc second
#define Rep(i,n) for(int i=0;i<(n);i++)
#define All(v) v.begin(),v.end()
typedef pair<int, int> Pii; typedef pair<int, Pii> Pip;
const int INF = 1107110711071107;

int ok( int x, int y )
{
  if( 0 <= x && 0 <= y && x <= 10 && y <= 10 ) return 1;
  else return 0;
}

main()
{
  int x, y, s;
  int data[11][11] = {{0}};
  while( scanf("%lld,%lld,%lld", &x, &y, &s) != EOF ) {
    //cout << x << " " << y << " " << s << endl;
    if( s == 1 ) {
      if( ok(x, y) )   data[y][x]++;
      if( ok(x, y-1) ) data[y-1][x]++;
      if( ok(x+1, y) ) data[y][x+1]++;
      if( ok(x, y+1) ) data[y+1][x]++;
      if( ok(x-1, y) ) data[y][x-1]++;
    }

    if( s == 2 ) {
      if( ok(x, y) )     data[y][x]++;
      if( ok(x, y-1) )   data[y-1][x]++;
      if( ok(x+1, y-1) ) data[y-1][x+1]++;
      if( ok(x+1, y) )   data[y][x+1]++;
      if( ok(x+1, y+1) ) data[y+1][x+1]++;
      if( ok(x, y+1) )   data[y+1][x]++;
      if( ok(x-1, y+1) ) data[y+1][x-1]++;
      if( ok(x-1, y) )   data[y][x-1]++;
      if( ok(x-1, y-1) ) data[y-1][x-1]++;
    }

    if( s == 3 ) {
      if( ok(x, y) )     data[y][x]++;
      if( ok(x, y-1) )   data[y-1][x]++;
      if( ok(x+1, y-1) ) data[y-1][x+1]++;
      if( ok(x+1, y) )   data[y][x+1]++;
      if( ok(x+1, y+1) ) data[y+1][x+1]++;
      if( ok(x, y+1) )   data[y+1][x]++;
      if( ok(x-1, y+1) ) data[y+1][x-1]++;
      if( ok(x-1, y) )   data[y][x-1]++;
      if( ok(x-1, y-1) ) data[y-1][x-1]++;
      
      if( ok(x, y-2) )     data[y-2][x]++;
      if( ok(x+2, y) )     data[y][x+2]++;
      if( ok(x, y+2) )     data[y+2][x]++;
      if( ok(x-2, y) )     data[y][x-2]++;
    }
    
  }

  int cnt = 0;
  int ma = 0;
  Rep(i, 10) Rep(j, 10) {
    if( !data[i][j] ) cnt++;
    ma = max(ma, data[i][j]);
  }

  cout << cnt << endl << ma << endl;
  
}

C++: #include <iostream>

using namespace std;

const int SMALL = 1;
const int MIDDLE = 2;
const int BIG = 3;
int paper[10][10] = {0};

void Dropping_Ink(int x, int y, int size)
{
		if(x-1 > -1)    paper[y][x-1]++;
		if(x+1 < 10)    paper[y][x+1]++;
		if(y-1 > -1)    paper[y-1][x]++;
		if(y+1 < 10)    paper[y+1][x]++;

		if(size >= MIDDLE)
		{
			if(x-1 > -1)
			{
				if(y-1 > -1)    paper[y-1][x-1]++;
				if(y+1 < 10)    paper[y+1][x-1]++;
			}
			if(x+1 < 10)
			{
				if(y-1 > -1)    paper[y-1][x+1]++;
				if(y+1 < 10)    paper[y+1][x+1]++;
			}
		}

		if(size >= BIG)
		{
			if(x-2 > -1)    paper[y][x-2]++;
			if(x+2 < 10)    paper[y][x+2]++;
			if(y-2 > -1)    paper[y-2][x]++;
			if(y+2 < 10)    paper[y+2][x]++;
		}
}

int main()
{
	int x, y, size, white, color;
	char c[2];

	while(cin >> x >> c[0] >> y >> c[1] >> size)
	{
		if(cin.eof())    break;

		Dropping_Ink(x, y, size);

		white = 0;
		color = 0;	
	
		for(int i=0; i<10; i++)
		{
			for(int j=0; j<10; j++)
			{
				if(paper[i][j] == 0)    white++;
				if(paper[i][j] > color)    color = paper[i][j];
			}
		}	
	}

	cout << white << endl << color << endl;
	
	return 0;
}

C++: #include<iostream>

int data[10][10];

int main(){
	int count=0,max=0;
	int x,y,size;
	char c;

	int dx_1[4]={0,-1,1,0},dy_1[4]={-1,0,0,1};
	int dx_2[8]={0,-1,1,-1,1,0,-1,1},dy_2[8]={-1,-1,-1,0,0,1,1,1};
	int dx_3[12]={0,-1,1,-1,1,-2,2,0,-1,1,0,0},dy_3[12]={-1,-1,-1,0,0,0,0,1,1,1,-2,2};
	
	while(std::cin>>x>>c>>y>>c>>size){
		data[y][x]++;
		if(size==1){
			for(int i=0;i<4;i++){
				int nx=x+dx_1[i],ny=y+dy_1[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)data[ny][nx]++;
			}
		}else if(size==2){
			for(int i=0;i<8;i++){
				int nx=x+dx_2[i],ny=y+dy_2[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)data[ny][nx]++;
			};
		}else if(size==3){
			for(int i=0;i<12;i++){
				int nx=x+dx_3[i],ny=y+dy_3[i];
				if(nx>=0&&nx<10&&ny>=0&&ny<10)data[ny][nx]++;
			}
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			max=std::max(max,data[i][j]);
			if(data[i][j]==0)count++;
		}
	}
	std::cout<<count<<std::endl;
	std::cout<<max<<std::endl;
	return 0;
}