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\n", count, max)
}

C++: #include <iostream>

#define SIZE 10

using namespace std;

int map[SIZE][SIZE] = {0};

void drop(int x, int y) {
	if (0 <= x && x < SIZE && 0 <= y && y < SIZE) {
		map[x][y]++;
	}
}

int main() {
	int x, y, s, count = 0, most = 0;
	char e;
	while (cin>>x>>e>>y>>e>>s) {
		x--;
		y--;
		drop(x, y);
		drop(x, y + 1);
		drop(x + 1, y);
		drop(x, y - 1);
		drop(x - 1, y);

		if (s > 1) {
			drop(x + 1, y + 1);
			drop(x + 1, y - 1);
			drop(x - 1, y - 1);
			drop(x - 1, y + 1);
		}

		if (s > 2) {
			drop(x, y + 2);
			drop(x, y - 2);
			drop(x + 2, y);
			drop(x - 2, y);
		}
	}

	for (int i = 0; i < SIZE; i++) {
		for (int j = 0; j < SIZE; j++) {
			if (map[i][j] > most) {
				most = map[i][j];
			}

			if (map[i][j] == 0) {
				count++;
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}

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

#define N 10
// init map
int MAP[N][N];
int D_MAX = 5;
int DROP[3][5][5] = {
  {
    {0,0,0,0,0},
    {0,0,1,0,0},
    {0,1,1,1,0},
    {0,0,1,0,0},
    {0,0,0,0,0},
  },
  {
    {0,0,0,0,0},
    {0,1,1,1,0},
    {0,1,1,1,0},
    {0,1,1,1,0},
    {0,0,0,0,0},
  },
  {
    {0,0,1,0,0},
    {0,1,1,1,0},
    {1,1,1,1,1},
    {0,1,1,1,0},
    {0,0,1,0,0},
  },
};

int main() {
  int x,y,size;
  while(~scanf("%d,%d,%d",&x,&y,&size)) {
    size = size - 1;
    for(int i=0;i<D_MAX;i++) {
      int xi = x + i - 2;
      if(xi <= -1 || xi >= N) continue;
      for(int j=0;j<D_MAX;j++) {
        int yi = y + j - 2;
        if(yi <= -1 || yi >= N) continue;
        MAP[xi][yi] += DROP[size][i][j];
      }
    }
  }

  int max_z = 0;
  int cnt = 0;
  for(int i=0;i<N;i++) {
    for(int j=0;j<N;j++) {
      if(MAP[i][j] == 0)
        cnt++;
      if(MAP[i][j] > max_z) {
        max_z = MAP[i][j];
      }
    }
  }
  printf("%d\n%d\n",cnt,max_z);
}

C++: #include <cstdio>

using namespace std;

int main() {
	/*
	int p[10][10];
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			p[i][j] = 0;
		}
	}
	int x,y,size;
	int dx[] = { 0, 0,-1, 1,-1,-1, 1, 1, 0, 0,-2, 2};
	int dy[] = {-1, 1, 0, 0,-1, 1,-1, 1,-2, 2, 0, 0};
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF) {
		p[x][y]++;
		for (int i=0; i<size*4; i++) {
			int mx=x+dx[i];
			int my=x+dy[i];
			if (mx>=0&&mx<10&&my>=0&&my<10) {
				p[mx][my]++;
			}
		}
	}
	int c=0,m=0;
	for (int i=0; i<10; i++) {
		for (int j=0; j<10; j++) {
			if (p[i][j] == 0) {
				c++;
			} else if (p[i][j]>m) {
				m=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",c,m);
	return 0;
	*/
		int map[10][10],ink,x,y,max=0,count=0;
	int dx[] = { 0, 0,-1, 1,-1,-1, 1, 1, 0, 0,-2, 2};
	int dy[] = {-1, 1, 0, 0,-1, 1,-1, 1,-2, 2, 0, 0};

	for(int i=0 ; i<10 ; i++){
		for(int j=0 ; j<10 ; j++){
			map[i][j] = 0;
		}
	}
	while( scanf("%d,%d,%d", &x, &y, &ink) != EOF ){
		map[y][x]++;
		for(int i=0 ; i<ink*4 ; i++){
			int mx = x + dx[i];
			int my = y + dy[i];
			if(mx>=0 && mx<10 && my>=0 && my<10){
				map[my][mx]++;
			}
		}
	}
	for(int y=0 ; y<10 ; y++){
		for(int x=0 ; x<10 ; x++){
			if(map[y][x]==0){
				count++;
			}
			if(map[y][x]>max){
				max = map[y][x];
			}
		}
	}
	printf("%d\n%d\n", count , max);
}

C++: #include<stdio.h>

int main(void){
  int xs[] = {-1,0,0,1},ys[] = {0,-1,1,0};
  int xm[] = {-1,-1,-1,0,0,1,1,1}, ym[] = {-1,0,1,-1,1,-1,0,1};
  int xl[] = {-2,-1,-1,-1,0,0,0,0,1,1,1,2};
  int yl[] = {0,-1,0,1,-2,-1,1,2,-1,0,1,0};

  int x,y,n;
  int max = 0, cnt = 100;

  int map[14][14] = {0};

  while(scanf("%d,%d,%d",&x,&y,&n) != EOF){
    //printf("a\n");
    x += 2;
    y += 2;
    switch(n){
    case 1:
      map[x][y]++;
      if(map[x][y] > max)
	max = map[x][y];
      for(int i = 0; i < 4; i++){
	map[x + xs[i]][y + ys[i]]++;
	if(map[x+xs[i]][y + ys[i]] > max){
	  max = map[x + xs[i]][y + ys[i]];
	}
      }
      break;

    case 2:
      map[x][y]++;
      if(map[x][y] > max)
	max = map[x][y];
      for(int i = 0; i < 8; i++){
	map[x + xm[i]][y + ym[i]]++;
	if(map[x + xm[i]][y + ym[i]] > max){
	  max = map[x + xm[i]][y + ym[i]];
	}
      }
      break;

    case 3:
      map[x][y]++;
      if(map[x][y] > max)
	max = map[x][y];
      for(int i = 0; i < 12; i++){
	map[x + xl[i]][y + yl[i]]++;
	if(map[x + xl[i]][y + yl[i]] > max){
	  max = map[x + xl[i]][y + yl[i]];
	}
      }
      break;
    }
  }

  // printf("test\n");
  for(int i = 2; i < 12; i++){
    for(int j = 2; j < 12; j++){
      if(map[i][j] == 0){
	cnt++;
      }
    }
  }
    
  printf("%d\n%d",cnt,max);


  return 0;
}