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<cstdio>
using namespace std;
 int map[10][10]={0};

void drop(int x,int y){
  if(x<0&&x>9&&y<0&&y>9)return;
  map[x][y]++;
}

int main(){
  int x,y,s;
 
  while(scanf("%d,%d,%d",&x,&y,&s)!= EOF){
    //  if(x==10)break;
    drop(x,y);
    drop(x+1,y);
    drop(x-1,y);
    drop(x,y+1);
    drop(x,y-1);
    if(s==2||s==3){
      drop(x+1,y+1);
      drop(x+1,y-1);
      drop(x-1,y+1);
      drop(x-1,y-1);
    }
    if(s==3){
      drop(x+2,y);
      drop(x-2,y);
      drop(x,y+2);
      drop(x,y-2);
    }
  }
  int max=0;
  int white=0;
  for(int i=0;i<10;i++){
    for(int j=0;i<10;j++){
      if(map[i][j]==0)white++;
      if(map[i][j]>max)max=map[i][j];
    }
  }
  cout<<white<<endl<<max;
}

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;

int field[10][10];
int x,y,size;


int main(void)
{
    for(int i=0; i<10; i++) {
        for(int j=0; j<10; j++) {
            field[i][j] = 0;
        }
    }

    char tmp;
    while(cin>>x>>tmp>>y>>tmp>>size) {
        if(size==1) {
            for(int dx=-1; dx<=1; dx++) {
                int nx = x + dx;
                if(0 <= nx && nx < 10)
                    field[y][nx]++;
            }
            for(int dy=-1; dy<=1; dy++) {
                int ny = y + dy;
                if(0 <= ny && ny < 10)
                    field[ny][x]++;
            }
            field[y][x]--;
        } else if(size == 2) {
            for(int dy=-1; dy<=1; dy++) {
                for(int dx=-1; dx<=1; dx++) {
                    int nx = x + dx, ny = y+dy;
                    if(0 <= nx && nx < 10)
                        if(0 <= ny && ny < 10)
                            field[ny][nx]++;
                }
            }
        } else if(size == 3) {
            for(int dy=-1; dy<=1; dy++) {
                for(int dx=-1; dx<=1; dx++) {
                    int nx = x + dx, ny = y+dy;
                    if(0 <= nx && nx < 10)
                        if(0 <= ny && ny < 10)
                            field[ny][nx]++;
                }
            }
            //field[y][x]--;
            for(int dx=-2; dx<=2; dx+=2) {
                int nx = x + dx;
                if(0 <= nx && nx < 10)
                    field[y][nx]++;
            }
            for(int dy=-2; dy<=2; dy+=2) {
                int ny = y + dy;
                if(0 <= ny && ny < 10)
                    field[ny][x]++;
            }
            field[y][x]--;

        }
    }

    int cnt=0, max=0;
    for(int i=0; i<10; i++) {
        for(int j=0; j<10; j++) {
            printf("%d\n",field[i][j]);
            if(field[i][j] == 0) cnt++;
            if(max < field[i][j]) max = field[i][j];
        }
    }

    printf("%d\n%d\n", cnt, max);

    return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(){

  int ink[10][10]={};
  int dx3[4] = {-2,2,0,0};
  int dy3[4] = {0,0,-2,2};
  int dx2[4] = {-1,-1,1,1};
  int dy2[4] = {-1,1,-1,1};
  int dx1[4] = {-1,1,0,0};
  int dy1[4] = {0,0,-1,1};

  int x,y,s,p=100,ma=0;
  
  while(scanf("%d",&x) != EOF){
    scanf(",%d,%d",&y,&s);
    
    if(s == 3){
      for(int i=0;i<4;i++){
	if(ink[ dy3[i]+y ][ dx3[i]+x ] == 0) p--;
	ink[ dy3[i]+y ][ dx3[i]+x ]++;
	ma = max(ma,ink[ dy3[i]+y ][ dx3[i]+x ]);
      }
    }
    if(s >= 2){
      for(int i=0;i<4;i++){
	if(ink[ dy2[i]+y ][ dx2[i]+x ] == 0) p--;
	ink[ dy2[i]+y ][ dx2[i]+x ]++;
	ma = max(ma,ink[ dy2[i]+y ][ dx2[i]+x ]);
      }
    }
    if(s >= 1){
      for(int i=0;i<4;i++){
	if(ink[ dy1[i]+y ][ dx1[i]+x ] == 0) p--;
	ink[ dy1[i]+y ][ dx1[i]+x ]++;
	ma = max(ma,ink[ dy1[i]+y ][ dx1[i]+x ]);
      }
    }
  }
  printf("%d\n%d\n",p,ma);
  return (0);
}

C++: #include<iostream>
#include<cstdio>

int paper[10][10]={};

void drop(int x,int y){
  if(x>=0&&y>=0&&x<=9&&y<=9){
    ++paper[x][y];
  }
}

void ink(int x,int y, int s){
  switch(s){
    case 3: drop(x+2,y);
            drop(x-2,y);
            drop(x,y+2);
            drop(x,y-2);
    case 2: drop(x+1,y+1);
            drop(x-1,y+1);
            drop(x-1,y-1);
            drop(x+1,y-1);
    case 1: drop(x,y);
            drop(x+1,y);
            drop(x-1,y);
            drop(x,y+1);
            drop(x,y-1);
  }

}

int main(){
  int x,y,s;

  //drop(9,9);

  /*for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      std::cout << paper[i][j] << std::endl;
    }
  }*/

  while(std::scanf(" %d,%d,%d",&x,&y,&s)){
    //std::cout << x << y << s;
    ink(x,y,s);
  }

  int spase=0,max=0;

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

  std::cout << spase << std::endl;
  std::cout << max << std::endl;


}