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<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<random>
using namespace std;

int main(){

  int s1x[4] = {0, 1, 0, -1};
  int s1y[4] = {1, 0, -1, 0};

  int s2x[8] = {0, 1, 0, -1, 1, 1, -1, -1};
  int s2y[8] = {1, 0, -1, 0, 1, -1, 1, -1};

  int s3x[12] = {0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2};
  int s3y[12] = {1, 0, -1, 0, 1, -1, 1, -1, 2, 0, -2, 0};


  vector< vector<int> > p( 10, vector<int> (10, 0) );
  int x, y, s;
  int cnt = 0;
  int mx = 0;
  // while( cin >> x >> y >> s ){
  while( scanf("%d,%d,%d\n", &x, &y, &s) != EOF ){
    if( s == 1 ){
      p[ x ][ y ]++;
      cnt++;
      for(int i=0; i<4; i++){
        int tx = x + s1x[i];
        int ty = y + s1y[i];
        if( tx < 0 || ty < 0 || tx >= 10 || ty >= 10 ) continue;
        p[tx][ty]++;
        cnt++;
        mx = max(mx, p[tx][ty]);
      }
    }else if( s == 2 ){
      p[ x ][ y ]++;
      cnt++;
      for(int i=0; i<8; i++){
        int tx = x + s2x[i];
        int ty = y + s2y[i];
        if( tx < 0 || ty < 0 || tx >= 10 || ty >= 10 ) continue;
        p[tx][ty]++;
        cnt++;
        mx = max(mx, p[tx][ty]);
      }
    }else if( s == 3 ){
      p[ x ][ y ]++;
      cnt++;
      for(int i=0; i<12; i++){
        int tx = x + s3x[i];
        int ty = y + s3y[i];
        if( tx < 0 || ty < 0 || tx >= 10 || ty >= 10 ) continue;
        p[tx][ty]++;
        cnt++;
        mx = max(mx, p[tx][ty]);
      }
    }
    cerr << cnt << endl;
  }
  cout << cnt << endl;

  return 0;
}




// EOF

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>

#define MEMZERO(x) memset(x, 0, sizeof(x));

using namespace std;

int main ( void )
{
	const int dx[] = { 0, 0, 0, -1, 1, -1, 1, -1, 1, 0, 0, -2, 2 };
	const int dy[] = { 0, -1, 1, 0, 0, -1, -1, 1, 1, -2, 2, 0, 0 };
	int p[10][10];
	int x, y, s;
	
	MEMZERO(p);
	
	while(~scanf("%d,%d,%d", &x, &y, &s))
	{
		s *= 4;
		for ( int i = 0; i <= s; ++i )
		{
			int mx = x + dx[i];
			int my = y + dy[i];
			if ( 0 <= mx && mx < 10 && 0 <= my && my < 10 )
			{
				++p[my][mx];
			}
		}
	}
	
	int cnt = 0, val = 0;
	
	for ( int i = 0; i < 10; ++i )
		for ( int j = 0; j < 10; ++j )
			if(!p[i][j])
				++cnt;
			else
				val = max(val, p[i][j]);
	cout << cnt << endl << val << endl;
	
	return 0;
}

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-2][x]++;
			if(x+2 < 10)    paper[y+2][x]++;
			if(y-2 > -1)    paper[y][x-2]++;
			if(y+2 < 10)    paper[y][x+2]++;
		}
}

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

	while(cin >> x >> c >> y >> c >> 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>
#include<cstdio>
using namespace std;


int main(){
	int vx[]={ 0, 1,-1, 0, 0,-1,-1, 1, 1, 2,-2, 0, 0};
	int vy[]={ 0, 0, 0, 1,-1,-1, 1,-1, 1, 0, 0, 2,-2};
	int x,y,size;
	int map[10][10];
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			map[i][j]=0;
		}
	}
	
	int nm_ans=0,max_ans=0;
	
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		switch(size){
		case 1:
			for(int i=0;i<5;i++){
				if((min(x+vx[i],y+vy[i])>=0)&&max(x+vx[i],y+vy[i])<10){
					map[x+vx[i]][y+vy[i]]++;
				}
			}
			break;
		case 2:
			for(int i=0;i<9;i++){
				if((min(x+vx[i],y+vy[i])>=0)&&max(x+vx[i],y+vy[i])<10){
					map[x+vx[i]][y+vy[i]]++;
				}
			}
			break;
		case 3:
			for(int i=0;i<13;i++){
				if((min(x+vx[i],y+vy[i])>=0)&&max(x+vx[i],y+vy[i])<10){
					map[x+vx[i]][y+vy[i]]++;
				}
			}
			break;
		}
	}
	
	
	
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(map[i][j]>max_ans){
				max_ans=map[i][j];
			}
			if(map[i][j]==0){
				nm_ans++;
			}
		}
	}
	cout<<nm_ans<<endl;
	cout<<max_ans<<endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>

using namespace std;

int sdy[]={-1,0,0,1};
int sdx[]={0,-1,1,0};
int mdy[]={0,0,0,-1,-1,-1,1,1,1};
int mdx[]={-1,0,1,-1,0,1,-1,0,1};
int ldy[]={0,0,0,-1,-1,-1,1,1,1,2,0,0,-2};
int ldx[]={-1,0,1,-1,0,1,-1,0,1,0,-2,2,0};


int main(){

	int field[10][10];
	memset(field,0,sizeof(field));

	int x,y,size;
	char cm;
	while(cin>>x>>cm>>y>>cm>>size){
		if(size==1){
			for(int i = 0; i < 4; i++){
				int py=y+sdy[i];
				int px=x+sdx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
		else if(size==2){
			for(int i = 0; i < 9; i++){
				int py=y+mdy[i];
				int px=x+mdx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
		else{
			for(int i = 0; i < 13; i++){
				int py=y+ldy[i];
				int px=x+ldx[i];
				if(py>=0&&px>=0&&py<10&&px<10){
					field[py][px]++;
				}
			}
		}
	}

	int maxConcentration=0;
	int cnt=0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(field[i][j]==0)
				cnt++;
			maxConcentration=max(maxConcentration,field[i][j]);
		}
	}
	cout<<cnt<<endl;
	cout<<maxConcentration<<endl;

	return 0;
}