Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

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

using namespace std;

const double eps=1e-10;

int main()
{
	int x,y,s,c[14][14]={0};
	while(scanf("%d,%d,%d",&x,&y,&s)){
		x+=2; y+=2;

		c[y][x]++;
		c[y+1][x]++; c[y-1][x]++;
		c[y][x+1]++; c[y][x-1]++;

		if(s>=2){
			c[y-1][x-1]++; c[y-1][x+1]++;
			c[y+1][x-1]++; c[y+1][x+1]++;
		}

		if(s==3){
			c[y-2][x]++; c[y+2][x]++;
			c[y][x-2]++; c[y][x+2]++;
		}

	}

	int w=0,d=0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(c[i][j]==0) w++;
			d=max(d,c[i][j]);
		}
	}

	cout<<w<<endl<<d<<endl;


	return 0;
}

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;
}