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

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;k<6;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==1){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<9)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<9)paper[x][y+1]++;
			paper[x][y]++;
		}
		if(n==2){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<9)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<9)paper[x][y+1]++;
			if(x-1>=0 && y-1>=0)paper[x-1][y-1]++;
			if(x-1>=0 && y+1<9 )paper[x-1][y+1]++;
			if(x+1<9  && y-1>=0)paper[x+1][y-1]++;
			if(x+1<9  && y+1<9 )paper[x+1][y+1]++;
			paper[x][y]++;
		}
		if(n==3){
			if(x-1>=0)paper[x-1][y]++;
			if(x+1<9)paper[x+1][y]++;
			if(y-1>=0)paper[x][y-1]++;
			if(y+1<9)paper[x][y+1]++;
			if(x-1>=0 && y-1>=0)paper[x-1][y-1]++;
			if(x-1>=0 && y+1<9 )paper[x-1][y+1]++;
			if(x+1<9  && y-1>=0)paper[x+1][y-1]++;
			if(x+1<9  && y+1<9 )paper[x+1][y+1]++;
			
			if(x-2>=0)paper[x-2][y]++;
			if(x+2<9 )paper[x+2][y]++;
			if(y+2<9 )paper[x][y+2]++;
			if(y-2>=0)paper[x][y-2]++;
			paper[x][y]++;
		}
	}
	
	
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(paper[i][j]==0)c++;
			if(paper[i][j]>=max)max=paper[i][j];
		}
	}
	printf("%d\n%d\n",c,max);
	return 0;
}

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

int main(){
  int p[14][14]={0};
  int x,y,s;
  while(scanf("%d,%d,%d",&x,&y,&s)>0){
    if(s==1){
      p[x+2][y+1]++;p[x+1][y+2]++;p[x+2][y+2]++;p[x+3][y+2]++;p[x+2][y+3]++;
    }
    else if(s==2){
      for(int i=1;i<4;i++){
	for(int j=1;j<4;j++) p[x+i][y+j]++;
      }
    }
    else{
      for(int i=1;i<4;i++){
	for(int j=1;j<4;j++) p[x+i][y+j]++;
      }
      p[x][y+2]++;p[x+2][y]++;p[x+4][y+2]++;p[x+2][y+4]++;
    }
  }
  int w=0;
  int t=0;
  for(int i=2;i<12;i++){
    for(int j=2;j<12;j++){
      if(p[i][j]==0) w++;
      if(p[i][j]>t) t=p[i][j];
    }
  }
  printf("%d\n%d\n",w,t);
  return 0;
}

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

using namespace std;

const int SMALL[][2] = {
	{  0,  0 },
	{  0,  1 },
	{  1,  0 },
	{  0, -1 },
	{ -1,  0 }
};

const int MIDIUM[][2] = {
	{  1,  1 },
	{  1, -1 },
	{ -1, -1 },
	{ -1,  1 }
};

const int LARGE[][2] = {
	{  0,  2 },
	{  2,  0 },
	{  0, -2 },
	{ -2,  0 }
};

class Paper
{
private:
	int paper[10][10];
public:
	Paper()
	{
		for ( int i = 0; i < 10; i++ )
		{
			for ( int j = 0; j < 10; j++ )
			{
				paper[i][j] = 0;
			}
		}

		return;
	}

	void put( int x, int y )
	{
		if ( inside( x, y ) )
		{
			paper[x][y]++;
		}
		return;
	}

	bool inside( int x, int y )
	{
		return 0 <= x && x < 10 && 0 <= y && y < 10;
	}

	int countWhite()
	{
		int res = 0;

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

		return res;
	}

	int getMax()
	{
		int max = 0;

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

		return max;
	}
};

int main()
{
	Paper paper;
	string buffer;

	while ( cin >> buffer )
	{
		int x, y, size;

		for ( unsigned int i = 0; i < buffer.length(); i++ )
		{
			if ( buffer[i] == ',' )
			{
				buffer[i] = ' ';
			}
		}

		istringstream( buffer ) >> x >> y >> size;

		for ( int i = 0; i < sizeof( SMALL ) / sizeof( SMALL[0] ); i++ )
		{
			paper.put( x + SMALL[i][0], y + SMALL[i][1] );
		}

		if ( 2 <= size )
		{
			for ( int i = 0; i < sizeof( MIDIUM ) / sizeof( MIDIUM[0] ); i++ )
			{
				paper.put( x + MIDIUM[i][0], y + MIDIUM[i][1] );
			}
		}

		if ( 3 <= size )
		{
			for ( int i = 0; i < sizeof( LARGE ) / sizeof( LARGE[0] ); i++ )
			{
				paper.put( x + LARGE[i][0], y + LARGE[i][1] );
			}
		}
	}

	cout << paper.countWhite() << endl;
	cout << paper.getMax() << endl;

	return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <iomanip>
using namespace std;
int main(){
  int x,y,size,m[14][14]={0},max=0,none=0;
  while(cin>>x>>y>>size){
    if(cin.eof())return 0;
    if(x==-1)break;
    if(size>=1){
      m[x+2][y+2]++;
      m[x+2][y+1]++;
      m[x+2][y+3]++;
      m[x+1][y+2]++;
      m[x+3][y+2]++;
    }
    if(size>=2){
      m[x+1][y+1]++;
      m[x+1][y+3]++;
      m[x+3][y+1]++;
      m[x+3][y+3]++;
    }
    if(size==3){
      m[x+2][y]++;
      m[x+2][y+4]++;
      m[x][y+2]++;
      m[x+4][y+2]++;
    }
    for(y=0;y<14;y++){
      for(x=0;x<14;x++){
	cout<<m[x][y];
	(x==13)?cout<<endl:cout<<" ";
      }
    }
  }
  for(y=0;y<10;y++){
    for(x=0;x<10;x++){
      if(m[x+2][y+2]>max)max=m[x+2][y+2];
      if(!m[x+2][y+2])none++;
    }
  }
  cout<<none<<endl<<max<<endl;
}