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

void ink(int,int,int);
void change(int,int,int);

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

int main(void){
	int white=0,max_ink=0;

	for(int x,y,size;scanf("%d,%d,%d",&x,&y,&size)!=EOF;)
		ink(x,y,size);

	for(int i=0;i<10;i++)
		for(int j=0;j<10;j++)
			if(!paper[i][j])
				white++;
			else
				max_ink=std::max(max_ink,int(paper[i][j]));

	printf("%d\n%d\n",white,max_ink);
	return 0;
}

void ink(int x,int y,int size){
	switch(size){
		case 1:
			ink(x,y,2);
			for(int i=-1;i<=1;i+=2)
				for(int j=-1;j<=1;j+=2)
					change(x+i,y+j,-1);
			change(x,y,-1);
			break;
		case 2:
			for(int i=-1;i<=1;i++)
				for(int j=-1;j<=1;j++)
					change(x+i,y+j,1);
			break;
		case 3:
			ink(x,y,2);
			change(x-2,y,1);
			change(x+2,y,1);
			change(x,y-2,1);
			change(x,y+2,1);
			break;
	}
}

void change(int x,int y,int inc){
	if(x>=0&&x<10&&y>=0&&y<10)
		paper[x][y]+=inc;
}

C++: #include<iostream>
using namespace std;
int main(){
  int k[10][10]={0};
  int x,y,s,i,j;
  char c;
  int d=0,w=0;
  int S[4]={0,4,8,12};
  int X[]={1,-1,0,0,1,-1,1,-1,2,-2,0,0};
  int Y[]={0,0,1,-1,1,-1,-1,1,0,0,2,-2};
  while(cin>>x>>c>>y>>c>>s){
    k[x][y]++;
    for(i=0;i<S[s];i++){
      k[x+X[i]][y+Y[i]]++;
      if(k[x+X[i]][y+Y[i]]>d){
	d=k[x+X[i]][y+Y[i]];
      }
    }
  }
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(k[i][j]==0)w++;
    }
  }
  if(d!=0){
    cout<<w<<"\n"<<d<<endl;
  }
  return 0;
}

C++: #include<iostream>
#include<string.h>
using namespace std;
int main()
{
    int ma[10][10];
    int x,y,d;
    char c;
    memset(ma,0,sizeof(ma));
    while(cin>>x>>c>>y>>c>>d){
//    for(int i=0;i<6;i++){
//        
//        cin>>x>>c>>y>>c>>d;
    
        ma[y][x]++;
        if(d==1){
            if(x>0){
                ma[y][x-1]++;
            }
            if(x<9){
                ma[y][x+1]++;
            }
            if(y>0){
                ma[y-1][x]++;
            }
            if(y<9){
                ma[y+1][x]++;
            }
        }
        else if(d==2){
            if(x>0){
                ma[y][x-1]++;
            }
            if(x<9){
                ma[y][x+1]++;
            }
            if(y>0){
                ma[y-1][x]++;
            }
            if(y<9){
                ma[y+1][x]++;
            }
            if(x>0&&y<9){
                ma[y+1][x-1]++;
            }
            if(x<9&&y>0){
                ma[y-1][x+1]++;
            }
            if(x>0&&y>0){
                ma[y-1][x-1]++;
            }
            if(x<9&&y<9){
                ma[y+1][x+1]++;
            }
        }
        else{
            if(x>0){
                ma[y][x-1]++;
            }
            if(x<9){
                ma[y][x+1]++;
            }
            if(y>0){
                ma[y-1][x]++;
            }
            if(y<9){
                ma[y+1][x]++;
            }
            if(x>0&&y<9){
                ma[y+1][x-1]++;
            }
            if(x<9&&y>0){
                ma[y-1][x+1]++;
            }
            if(x>0&&y>0){
                ma[y-1][x-1]++;
            }
            if(x<9&&y<9){
                ma[y+1][x+1]++;
            }
            if(x>1){
                ma[y][x-2]++;
            }
            if(x<8){
                ma[y][x+2]++;
            }
            if(y>1){
                ma[y-2][x]++;
            }
            if(y<8){
                ma[y+2][x]++;
            }
        }
    }
    int em=0,m=0;
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(ma[i][j]==0)em++;
            m=max(m,ma[i][j]);
        }
    }
    cout<<em<<endl<<m<<endl;
    return 0;
}

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

void base(int (*paper)[10],int x, int y) {
    if (x - 1 >= 0) {
		paper[y][x - 1]++;
	}
	if (x + 1 < 10) {
		paper[y][x + 1]++;
	}
	if (y - 1 >= 0) {
		paper[y - 1][x]++;
	}
	if (y + 1 < 10) {
		paper[y + 1][x]++;
	}
}

void sqare(int(*paper)[10], int x, int y) {
	if (x - 1 >= 0 && y - 1 >= 0) {
		paper[y - 1][x - 1]++;
	}
	if (x + 1 < 10 && y - 1 >= 0) {
		paper[y - 1][x + 1]++;
	}
	if (y + 1 < 10 && x - 1 >= 0) {
		paper[y + 1][x - 1]++;
	}
	if (y + 1 < 10 && x + 1 < 10) {
		paper[y + 1][x + 1]++;
	}
}

void slant(int(*paper)[10], int x, int y) {
	if (x - 2 >= 0) {
		paper[y][x - 2]++;
	}
	if (x + 2 < 10) {
		paper[y][x + 2]++;
	}
	if (y - 2 >= 0) {
		paper[y - 2][x]++;
	}
	if (y + 2 < 10) {
		paper[y + 2][x]++;
	}
}

int main()
{
	int paper[10][10] = {0};
	int x, y, s;
	char t;
	
	while (cin >> x >> t >> y >> t>> s) {
		paper[y][x]++;
		switch (s) 
		{
		    case 3:slant(paper,x, y);
		    case 2:sqare(paper,x, y);
		    case 1:base(paper,x, y);
		}
	}
	
	int sum = 0,max = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[i][j] > max) {
				max = paper[i][j];
			}
			if (paper[i][j] == 0) {
				sum++;
			}
		}
	}
	cout << sum << endl << max << endl;

	return 0;
}