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<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==0)break;
		if(n==1){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==2){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)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]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==3){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)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]++;
			
			if(y-2>=0)paper[y-2][x]++;
			if(y+2<10)paper[y+2][x]++;
			if(x+2<10)paper[y][x+2]++;
			if(x-2>=0)paper[y][x-2]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		for(i=0;i<10;i++){
			for(j=0;j<10;j++){
				printf("%d ",paper[i][j]);
			}
			puts("");
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			printf("%d ",paper[i][j]);
		}
		puts("");
	}
	
	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 <stdio.h>
#include <math.h>

int main()
{
	int x,y,size;
	unsigned char arr[ 14 * 14 ];

	while ( scanf("%d,%d,%d", &x, &y, &size ) != EOF ) {
		x+=2; y+=2;
		arr[ 14 * ( x - 1 ) + y ]++;
		arr[ 14 * x + y ]++;
		arr[ 14 * ( x + 1 ) + y ]++;
		arr[ 14 * x  + y - 1 ]++;
		arr[ 14 * x + y ]++;
		arr[ 14 * x  + y + 1 ]++;
		if( size == 2 ) {
			arr[ 14 * ( x - 1 ) + y - 1 ]++;
			arr[ 14 * ( x - 1 ) + y + 1 ]++;
			arr[ 14 * ( x + 1 ) + y - 1 ]++;
			arr[ 14 * ( x + 1 ) + y + 1 ]++;
		}
		if( size == 3 ) {
			arr[ 14 * ( x - 2 ) + y  ]++;
			arr[ 14 * ( x + 2 ) + y  ]++;
			arr[ 14 * x + y - 2  ]++;
			arr[ 14 * x + y + 2 + y  ]++;
		}
	}
	
	int cnt = 0;
	int maxv = 0;

	for( int i = 2; i < 12; i++ ) {
		for( int j = 2; j < 12; j++ ) {
			if( arr[ 14 * j + i ] == 0 ) {
				cnt++;
			}
			else if( maxv < arr[ 14 * j + i ] ) {
				maxv = arr[ 14 * j + i ] ;
			}
		}
	}

	printf("%d\n%d\n", cnt, maxv);
        return 0;
}

C++: #include <cstdio>

using namespace std;

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

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

int main(){
  int x,y,size;
  int canvas[10][10];
  int empty_num, max_val;
  int i, j;

  for(i=0; i<10; i++)
    for(j=0; j<10; j++) canvas[i][j]=0;
  while(cin>>x){
    cin>>y; cin>>size;

    for(i=-1; i<=1; i=i+2)
      if(x+i>=0 && x+i<10) canvas[x+i][y]++;
    for(i=-1; i<=1; i=i+2)
      if(y+i>=0 && y+i<10) canvas[x][y+i]++;
    if(size>1){
      for(i=-1; i<=1; i=i+2){
        for(j=-1; j<=1; j=j+2)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }
    if(size>2){
      for(i=-2; i<=2; i=i+4)
        if(x+i>=0 && x+i<10) canvas[x+i][y]++;
      for(i=-2; i<=2; i=i+4)
        if(y+i>=0 && y+i<10) canvas[x][y+i]++;
    }

    empty_num=0; max_val=0;
    for(i=0; i<10; i++){
      for(j=0; j<10; j++){
        if(canvas[i][j]>max_val) max_val=canvas[i][j];
        else if(canvas[i][j]==0) empty_num++;
      }
    }

    printf("%d\n%d\n", empty_num, max_val);
  }
  return 0;
}

C++: //インクを落とす
#include<cstdio>

using namespace std;

int main(void){
	int pa[14][14];
	int i,j;	//ループカウンタ
	int x,y,size,da=0,not=0;
	
	//二次元配列の初期化
	for(i=0;i<14;i++){
		for(j=0;j<14;j++)
			pa[i][j]=0;
	}

	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		x=x+2;
		y=y+2;
		switch(size){
			case 1:	//小
				pa[y][x]++;
				pa[y-1][x]++;
				pa[y+1][x]++;
				pa[y][x-1]++;
				pa[y][x+1]++;
				break;
			case 2:	//中
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[y+i][x+j]++;
				}
				break;
			case 3:	//大
				for(i=-1;i<=1;i++){
					for(j=-1;j<=1;j++)
						pa[y+i][x+j]++;
				}
				pa[y-2][x]++;
				pa[y+2][x]++;
				pa[y][x-2]++;
				pa[y][x+2]++;
				break;
		}
	}
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(pa[i][j]==0)
				not++;
		}
	}
	for(i=2;i<12;i++){
		for(j=2;j<12;j++){
			if(pa[i][j]>da)
				da=pa[i][j];
		}
	}
	printf("%d\n%d\n",not,da);

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<stdio.h>
int main(){
	int x,y,size;
	std::vector<std::vector<int> > vec(10,std::vector<int>(10,0));
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	int no=0,max=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(vec[i][j]==0)no++;
			if(vec[i][j]>max)max=vec[i][j];
		}
	}
	std::cout<<no<<std::endl;
	std::cout<<max<<std::endl;
	return 0;
}