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>

using namespace std;

int peper[15][15];

void paint(int x, int y)
{
	if (x * y >= 0 && x >= 0)	peper[y][x]++;
}

int main()
{
	int x, y;
	int size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		peper[y][x]++;

		paint(x, y - 1);
		paint(x, y + 1);
		paint(x - 1, y);
		paint(x + 1, y);

		if (size > 1){
			paint(x + 1, y - 1);
			paint(x + 1, y + 1);
			paint(x - 1, y + 1);
			paint(x - 1, y - 1);
		}
		if (size > 2){
			paint(x, y - 2);
			paint(x, y + 2);
			paint(x - 2, y);
			paint(x + 2, y);
		}
	}
	int dark = 0;
	int blank = 0;
	
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (peper[i][j] == 0)	blank++;
			dark = max(dark, peper[i][j]);
		}
	}
	printf("%d\n%d\n", blank, dark);
	return (0);
}

C++: #include<iostream>

using namespace std;


main(){
  
  int map[10][10];
  int x,y,size;
  //initialize
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      map[i][j]=0;
    }
  }
  int white=0,Max=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    
    if(size==1){
      if(y>=0&&y<10&&(x-1)>=0&&(x-1)<10)map[y][x-1]++;    
      if((y-1)>=0&&(y-1)<10&&x>=0&&x<10)map[y-1][x]++;
	 if(y>=0&&y<10&&x>=0&&x<10)map[y][x]++;
	    if((y+1)>=0 &&(y+1)<10&&x>=0&&x<10)map[y+1][x]++;
	       if(y>=0&&y<10&&(x+1)>=0&&(x+1)<10)map[y][x+1]++;
		  
    }
    if(size==2){
      
      if(y-1>=0&&y-1<10&&(x-1)>=0&&(x-1)<10)map[y-1][x-1]++;
      if(y+1>=0&&y+1<10&&(x-1)>=0&&(x-1)<10)map[y+1][x-1]++;
      
      if(y-1>=0&&y-1<10&&(x+1)>=0&&(x+1)<10)map[y-1][x+1]++;
      if(y+1>=0&&y+1<10&&(x+1)>=0&&(x+1)<10)map[y+1][x+1]++;
       if(y>=0&&y<10&&(x-1)>=0&&(x-1)<10)map[y][x-1]++;    
      if((y-1)>=0&&(y-1)<10&&x>=0&&x<10)map[y-1][x]++;
	 if(y>=0&&y<10&&x>=0&&x<10)map[y][x]++;
	    if((y+1)>=0 &&(y+1)<10&&x>=0&&x<10)map[y+1][x]++;
	       if(y>=0&&y<10&&(x+1)>=0&&(x+1)<10)map[y][x+1]++;


    }
    if(size==3){                     if(y>=0&&y<10&&(x-2)>=0&&(x-2)<10) map[y][x-2]++;
                     
       if(y-2>=0&&y-2<10&&(x)>=0&&(x)<10)map[y-2][x]++; if(y+2>=0&&y+2<10&&(x)>=0&&(x)<10)  map[y+2][x]++;
                      
                                     if(y>=0&&y<10&&(x+2)>=0&&(x+2)<10)  map[y][x+2]++;
					  if(y-1>=0&&y-1<10&&(x-1)>=0&&(x-1)<10)map[y-1][x-1]++;
      if(y+1>=0&&y+1<10&&(x-1)>=0&&(x-1)<10)map[y+1][x-1]++;
      
      if(y-1>=0&&y-1<10&&(x+1)>=0&&(x+1)<10)map[y-1][x+1]++;
      if(y+1>=0&&y+1<10&&(x+1)>=0&&(x+1)<10)map[y+1][x+1]++;
       if(y>=0&&y<10&&(x-1)>=0&&(x-1)<10)map[y][x-1]++;    
      if((y-1)>=0&&(y-1)<10&&x>=0&&x<10)map[y-1][x]++;
	 if(y>=0&&y<10&&x>=0&&x<10)map[y][x]++;
	    if((y+1)>=0 &&(y+1)<10&&x>=0&&x<10)map[y+1][x]++;
	       if(y>=0&&y<10&&(x+1)>=0&&(x+1)<10)map[y][x+1]++;
					
    }
    
    
  }

    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	if(map[i][j]==0)white++;
	if(map[i][j]>=Max)Max=map[i][j];
      }
      
    }
  cout << white<<endl<< Max << endl;

  return 0;
}

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

//4方向ベクトル→↑←↓
const int px[4] ={1,0,-1,0};
const int py[4] ={0,-1,0,1};

int board[15][15];
int x,y,size;
int ans1,ans2;
int main()
{
  ans1 = 0;
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      board[i][j] = 0;
    }
  }
  while(scanf("%d,%d,%d",&x,&y,&size) !=EOF){
    if(x <0||y < 0||x >10 ||y >10){
      continue;
    }
    if(size ==1){
      board[y][x] +=1;
      for(int j = 0;j < 4;j++){
	int nx = x + px[j];
	int ny = y + py[j];
	if(nx <0 ||ny < 0||nx > 10||ny >10)
	  continue;
	board[ny][nx] += 1;
      }
    }else if(size ==2){
      for(int i = -1;i <=1;i++){
	for(int j = -1;j <=1;j++){
	 int nx = x +j;
	 int ny = y +i;
	  if(nx <0 ||nx >=10||ny <0||ny >=10)
	    continue;
	  board[ny][nx] +=1;
	}
      }
    }else if(size ==3){
      for(int i = -2;i <=2;i++){
	for(int j = -2;j <=2;j++){
	  if(i == -2&&j ==0){
	    board[y+i][x] +=1;
	  }else if(i == -1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i == 0){
	    board[y+i][x+j] +=1;
	  }else if(i == 1&&(j !=-2&&j !=2)){
	    board[y+i][x+j] +=1;
	  }else if(i ==2&&j ==0){
	    board[y+i][x] +=1;
	  }
	}
      }
    }
  }
  ans2 = 0; 
  for(int i = 0;i <10;i++){
    for(int j = 0;j < 10;j++){
      if(board[i][j] == 0){
	ans1++;
      }
      if(board[i][j] > ans2){
	ans2 = board[i][j];
      }
    }
  }
  cout <<ans1<<endl;
  cout <<ans2<<endl;
  return 0;
}