Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d", count, max)
}

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;


}