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 <cstring>
using namespace std;

int dx[12] = { 1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0 };
int dy[12] = { 0, 1, 0, -1, -1, 1, 1, -1, 0, 2, 0, -2 };
int map[10][10];

inline bool out_of_range(int x, int y) {
	if (x<0||x>9||y<0||y>9) return false;
	return true;
}

inline void drop(int x, int y, int s) {
	for (int i=0; i<4*s; i++)
		map[y+dy[i]][x+dx[i]]++;
}

int main() {
	memset(map, 0, sizeof(map));
	int x, y, s;
	char c;
	while (cin >> x >> c >> y >> c >> s) {
		drop(x, y, s);
	}

	int cnt=0,dep=0;
	for (int i=0; i<10; i++)
	for (int j=0; j<10; j++) {
		if (map[j][i]==0) cnt++;
		if (map[j][i] > dep) dep=map[j][i];
	}
	cout << cnt << endl << dep << endl;
	return 0;
}

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

void function(int board[14][14],int x,int y,int n){


	if(n == 1){
		board[x-1][y]++;
		board[x+1][y]++;
		board[x][y]++;
		board[x][y-1]++;
		board[x][y+1]++;
	}

	else if (n == 2){
		for(int i=-1;i<2;i++){
			for(int  j = -1;j<2;j++){
				board[x+i][y+j]++;
			}
		}
	}

	else{
		for(int i=-1;i<2;i++){
			for(int  j = -1;j<2;j++){
				board[x+i][y+j]++;
			}
		}
		board[x+2][y]++;
		board[x-2][y]++;
		board[x][y-2]++;
		board[x][y+2]++;
	}
}

int main(){

	int board[14][14];
	int max=0;
	int sum=0;

	for(int i=0;i<14;i++){
		for(int j=0;j<14;j++){
			board[i][j] = 0;
		}
	}

	char str[10];

	while(cin>>str){
		/*
		if(str[0]=='a'){
			break;
		}
		*/

		function(board,(int)(str[0]-'0'+2),(int)(str[2]-'0'+2),(int)(str[4]-'0'));

	}

	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(board[i][j]==0){
				sum++;
			}
			if(max<=board[i][j]){
				max = board[i][j];
			}
		}
	}
	/*
	for(int i=0;i<14;i++){
		for(int j=0;j<14;j++){
			printf("%d ",board[i][j]);
		}
		printf("\n");
	}
	*/

	cout<<sum<<endl;
	cout<<max<<endl;

	return 0;
}

C++: #include <stdio.h>

int main(void) {
  int i, j, k, p[10][10], x, y, s, ansn = 0, ansm = 0;
  for(i = 0; i < 10; ++i) for(j = 0; j < 10; ++j) p[i][j] = 0;
  int inkx[4][4] = {
   {0, 0, 0, 0},
   {1, 0, 0, -1},
   {1, 1, -1, -1},
   {2, 0, 0, -2}
  }, inky[4][4] = {
    {0, 0, 0, 0},
    {0, 1, -1, 0},
    {1, -1, 1, -1},
    {0, -2, 2, 0}
  };
  while(scanf("%d,%d,%d", &x, &y, &s) != EOF) {
    p[y][x]++;
    for(i = 1; i <= s; ++i) for(j = 0; j < 4; ++j) 
        if(x + inkx[i][j] >= 0 && y + inky[i][j] >= 0 && x + inkx[i][j] < 10 && y + inky[i][j] < 10) p[y + inky[i][j]][x + inkx[i][j]]++;
  }
  for(i = 0; i < 10; ++i) for(j = 0; j < 10; ++j) {
    if(!p[i][j]) ++ansn;
    if(p[i][j] > ansm) ansm = p[i][j];
  }
  printf("%d\n%d\n", ansn, ansm);
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int x, y, s;
	char a, b;
	vector<int> X, Y, S, m;
	vector<int> L1 = { -1,1 }, L2 = { -1,0,1 }, L3 = { -2,2 };
	while (cin >> x >> a >> y >> b >> s) {
		X.push_back(x);
		Y.push_back(y);
		S.push_back(s);
	}
	vector<vector<int>> matrix;
	for (int i = 0; i < 30; i++) {
		for (int j = 0; j < 30; j++) {
			m.push_back(0);
		}
		matrix.push_back(m);
	}
	for (int i = 0; i < X.size(); i++) {
		if (S[i] == 1) {
			matrix[X[i] + 10][Y[i] + 10] += 1;
			for (int j = 0; j < L1.size(); j++) {
				matrix[X[i] + 10 + L1[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L1[j]] += 1;
			}
		}
		else if (S[i] == 2) {
			for (int j = 0; j < L2.size(); j++) {
				for (int k = 0; k < L2.size(); k++) {
					matrix[X[i] + 10 + L2[j]][Y[i] + 10 + L2[k]] += 1;
				}
			}
		}
		else {
			for (int k = 0; k < L2.size(); k++) {
				for (int j = 0; j < L2.size(); j++) {
					matrix[X[i] + 10 + L2[k]][Y[i] + 10 + L2[j]] += 1;
				}
			}
			for (int j = 0; j < L3.size(); j++) {
				matrix[X[i] + 10 + L3[j]][Y[i] + 10] += 1;
				matrix[X[i] + 10][Y[i] + 10 + L3[j]] += 1;
			}
		}
	}
	int ctr1 = 0, max = INT_MIN;
	for (int i = 10; i < 20; i++) {
		for (int j = 10; j < 20; j++) {
			if (matrix[i][j] == 0) {
				ctr1++;
			}
			else {
				if (max < matrix[i][j])max = matrix[i][j];
			}
		}
	}
	cout << ctr1 << endl;
	cout << max << endl;
	return 0;
}

C++: #include <stdio.h>

int main(void) {

  int nocolor=0,dark=0;

  int map[10][10];

  int x,y,size;
  int nx,ny;
  int dx[12]={1,0,-1,0,1,-1,-1,1,2,0,-2,0};
  int dy[12]={0,1,0,-1,1,1,-1,-1,0,2,0,-2};

  int i;

  for(x=0;x<10;x++) for(y=0;y<10;y++) map[x][y]=0;

  //for(x=0;x<10;x++) for(y=0;y<10;y++) printf("%d ",map[x][y]);
  
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF) {

    switch(size) {

    case 1:
      
      map[x][y]++;

      for(i=0;i<4;i++) {

	nx=x+dx[i];
	ny=y+dy[i];

	if(nx>=0 && nx<10 && ny>=0 && ny<10) map[nx][ny]++;

      }

      break;

    case 2:

      map[x][y]++;

      for(i=0;i<8;i++) {

	nx=x+dx[i];
	ny=y+dy[i];

	if(nx>=0 && nx<10 && ny>=0 && ny<10) map[nx][ny]++;

      }

      break;

    case 3:

      map[x][y]++;

      for(i=0;i<12;i++) {

	nx=x+dx[i];
	ny=y+dy[i];

	if(nx>=0 && nx<10 && ny>=0 && ny<10) map[nx][ny]++;

      }

      break;

    }

  }

  for(x=0;x<10;x++) {

    for(y=0;y<10;y++) {

      if(map[x][y]==0) nocolor++;

      if(dark<map[x][y]) dark=map[x][y];

    }

  }

  printf("%d\n%d\n",nocolor,dark);

  return 0;

}