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];
			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 <cmath>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;
int main ()
{
	int m[18][18] = {};
	int x, y, s;
	int dx1[4] = {0, 1, 0, -1}, dy1[4] = {1, 0, -1, 0};
	int dx2[8] = {0, 1, 1, 1, 0, -1, -1, -1}, dy2[8] = {1, 1, 0, -1, -1, -1, 0, 1};
	int dx3[12] = {0, -1, 0, 1, -2, -1, 1, 2, -1, 0, 1, 0}, dy3[12] = {2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2};
	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		x += 3;
		y += 3;
		m[x][y]++;
		switch (s)
		{
		case 1:
			for (int i = 0; i < 4; i++)m[x + dx1[i]][y + dy1[i]]++;
			break;
		case 2:B
			for (int i = 0; i < 8; i++)m[x + dx2[i]][y + dy2[i]]++;
			break;
		case 3:
			for (int i = 0; i < 12; i++)m[x + dx3[i]][y + dy3[i]]++;
			break;
		}
	}
	int ans1 = 0, ans2 = 0;
	for (int x = 3; x <13; x++)
	{
		for (int y = 3; y < 13; y++)
		{
			if (m[x][y] == 0)ans1++;
			ans2 = max(ans2, m[x][y]);
			cout<<m[y][x];
		}
		cout<<endl;
	}
	cout << ans1 << endl << ans2 << endl;
	return 0;
}

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

int map[10][10]={};
int sx[] = { 0,-1,1,0 } , sy[] = { -1,0,0,1 } ;
int mx[] = { -1,0,1 }, my[] = { -1,0,1 } ;
int lx[] = { 0,-1,0,1,-2,-1,1,2,-1,0,1,0 } ;
int ly[] = { -2,-1,-1,-1,0,0,0,0,1,1,1,2 } ;

int main(){
	
	int x,y,size ;
	char temp;
	int empty=0,max=0;
	
	while(1){
		cin >> x ;
		if( cin.eof() ) break;
		cin >> temp >> y ;
		cin >> temp >> size ;
		
		map[x][y]++;
		
		if( size==1 ){
			for( int i=0 ; i<4 ; i++ ){
				if( x+sx[i]>=0 && x+sx[i]<=9 && y+sy[i]>=0 && y+sy[i]<=9 )
					map[x+sx[i]][y+sy[i]]++;
			}
		}
		else if( size==2 ){
			for( int i=0 ; i<9 ; i++ ){
				if( x+mx[i%3]>=0 && x+mx[i%3]<=9 && y+my[i/3]>=0 && y+my[i/3]<=9 )
					map[x+mx[i%3]][y+my[i/3]]++;
			}
		}
		else if( size==3 ){
			for( int i=0 ; i<12 ; i++ ){
				if( x+lx[i]>=0 && x+lx[i]<=9 && y+ly[i]>=0 && y+ly[i]<=9 )
					map[x+lx[i]][y+ly[i]]++;
			}
		}
	}
	
	for( int i=0 ; i<10 ; i++ ){
		for( int j=0 ; j<10 ; j++ ){
			if( map[i][j]==0 ) empty++;
			if( map[i][j]>max ) max=map[i][j] ;
		}
	}
	
	cout << empty << endl ;
	cout << max << endl ;
	
return 0;
}

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

int main(void){
  vector < vector <int> > square;
  square.resize(14);
  for(int i=0; (int)i<square.size(); i++){
    square[i].resize(14);
  }
  for(int i=0; i<(int)square.size(); i++){
    for(int j=0; j<(int)square[i].size(); j++){
      square[i][j] =0;
    }
  }

  int x, y, size;
  int min=0, max=0;
  char c;

  while( cin >> x >> c >> y >> c >> size ){
    x+=2;
    y+=2;
    if(size>=1 && size<=3){
      square[y][x]++;
      square[y][x-1]++;
      square[y-1][x]++;
      square[y+1][x]++;
      square[y][x+1]++;
    }
    if(size==2 || size==3){
      square[y-1][x-1]++;
      square[y+1][x-1]++;
      square[y-1][x+1]++;
      square[y+1][x+1]++;
    }
    if(size==3){
      square[y][x-2]++;
      square[y-2][x]++;
      square[y+2][x]++;
      square[y][x+2]++;
    }
  }

  for(int i=2; (int)i<square.size()-2; i++){
    for(int j=2; (int)j<square.size()-2; j++){
      if( square[i][j]==0 ){
        min++;
      }else if(max < square[i][j]){
        max=square[i][j];
      }
    }
  }

  cout << min << endl << max << endl;
  return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
  int dec[10][10];
  int x,y,size,num,max;
  char a;
  num = 0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
       dec[i][j]=0;
    }
  }
                
  while(cin >> y >> a>> x>> a>> size){
    if(size == 1){
      if(x+1 < 10 && x+1 >= 0 && y>=0 && y<10) dec[x+1][y] += 1;
      if(x-1 >=0 && x-1 < 10 && y>=0 && y<10) dec[x-1][y] += 1;
      if(x >= 0 && x < 10 && y+1<10 && y+1 >= 0) dec[x][y+1] += 1;
	 if(x >=0 && x< 10 && y-1 <10 && y-1 >=0) dec[x][y-1] += 1;
	    dec[x][y] += 1;
	    } else if(size == 2){
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  if(x+i >=0&& x+i<10 && y+j>=0&& y+j<10) dec[x+i][y+j] +=1;
	}
      }
    }else if(size==3){
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  if(x+i >=0&& x+i<10 && y+j>=0&& y+j<10)  dec[x+i][y+j] +=1;
	}
      }
      if(x+2<10 && x+2 >=0 && y>=0 && y<10  )dec[x+2][y] +=1;
      if(x-2>=0 &&x-2 <10 && y>=0 && y<10  )dec[x-2][y] +=1;
      if(x<10 && x >=0 && y+2>=0 && y+2<10  )dec[x][y+2] +=1;
      if(x>=0 && x<10 && y-2>=0 && y-2<10  )dec[x][y-2] +=1;
    }
  }
  max = dec[0][0];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){ 
      if(dec[i][j]==0)
	num +=1; 
      if(max < dec[i][j])
	max=dec[i][j];
    }
  }
  cout << num << endl << max<<endl;
}