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[11][11];

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]++;
		if (size >= 1){
			paint(x, y - 1);
			paint(x, y + 1);
			paint(x - 1, y);
			paint(x + 1, y);
		}
		if (size >= 2){
			paint(x + 1, y - 1);
			paint(x + 1, y + 1);
			paint(x - 1, y + 1);
			paint(x - 1, y - 1);
		}
		if (size == 3){
			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>
#include<string>
#include<math.h>
using namespace std;
bool in(int x,int y){
  if(x<0||x>9||y<0||y>9) return false;
  return true;
}
int main(){
  int pa[10][10]={{}};
  string str;
  int i,j;
  while(cin >> str){
    int x=str[0]-'0',y=str[2]-'0',s=str[4]-'0';
    if(s==1){
      for(i=-1;i<=1;i++){
	for(j=-1+abs(i);j<=1-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==2){
      for(i=-1;i<=1;i++){
	for(j=-1;j<=1;j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }else if(s==3){
      for(i=-2;i<=2;i++){
	for(j=-2+abs(i);j<=2-abs(i);j++){
	  if(in(x+i,y+j)) pa[x+i][y+j]++;
	}
      }
    }
  }
  int o=0,m=0;
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      //cout << pa[i][j];
      m=max(m,pa[i][j]);
      if(pa[i][j]==0) o++;
    }
    //cout << endl;
  }
  cout << o << endl << m << endl;
  return 0;
}

C++: #include<functional>
#include<algorithm>
#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,x,n) for(int i=x;i<n;i++)
#define pf push_front
#define pb push_back
#define int long long
using namespace std;
const int INF=1000000007;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ex[4]={1,-1,1,-1};
int ey[4]={1,1,-1,-1};
int fx[4]={2,0,-2,0};
int fy[4]={0,2,0,-2};

int mp[20][20]={};

signed main(){
  int x,y,s;
  char z;
  while(cin>>x>>z>>y>>z>>s){
    x--;y--;
    if(s==1){
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
      }
    }
    else if(s==2){
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
        if(y-ey[i]>=0&&x-ex[i]>=0){
          mp[y+ey[i]][x+ex[i]]+=1;
        }
      }
    }
    else{
      mp[y][x]+=1;
      rep(i,4){
        if(y-dy[i]>=0&&x-dx[i]>=0){
          mp[y+dy[i]][x+dx[i]]+=1;
        }
        if(y-ey[i]>=0&&x-ex[i]>=0){
          mp[y+ey[i]][x+ex[i]]+=1;
        }
        if(y-fy[i]>=0&&x-fx[i]>=0){
          mp[y+fy[i]][x+fx[i]]+=1;
        }
      }
    }
  }
  int ans1=0,ans2=0;
  rep(i,10){
    rep(j,10){
      if(mp[i][j]==0)ans1++;
      if(ans2<mp[i][j])ans2=mp[i][j];
    }
  }
  cout<<ans1<<ans2<<endl;
  return 0;
}

C++: #include <stdio.h>

int main(){
	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 <iostream>

using namespace std;

inline bool valid(int y, int x) {
    return (0 <= y && y < 10 && 0 <= x && x < 10);
}

int main() {
	int paper[10][10] = {};
	int x, y, siz;
	char c;
	while (cin >> x >> c >> y >> c >> siz) {
		switch (siz) {
			case 3:
				if (valid(y-2, x)) paper[y-2][x] ++;
				if (valid(y, x-2)) paper[y][x-2] ++;
				if (valid(y, x+2)) paper[y][x+2] ++;
				if (valid(y+2, x)) paper[y+2][x] ++;
			case 2:
				if (valid(y-1, x-1)) paper[y-1][x-1] ++;
				if (valid(y-1, x+1)) paper[y-1][x+1] ++;
				if (valid(y+1, x-1)) paper[y+1][x-1] ++;
				if (valid(y+1, x+1)) paper[y+1][x+1] ++;
			case 1:
				if (valid(y-1, x)) paper[y-1][x] ++;
				if (valid(y, x-1)) paper[y][x-1] ++;
				if (valid(y,   x))   paper[y][x] ++;
				if (valid(y, x+1)) paper[y][x+1] ++;
				if (valid(y+1, x)) paper[y+1][x] ++;
		}
	}
	int empty = 0, mx = 0;
	for (int i=0; i<10; ++i) {
		for (int j=0; j<10; ++j) {
			empty += !paper[i][j];
			mx = max(mx, paper[i][j]);
		}
	}
	cout << empty << endl;
	cout << mx << endl;

	return 0;
}

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

int main(){
	
	int mp[10][10]={0};
	int dx[13]={0,0,1,0,-1,1,1,-1,-1,0,2,0,-2};
	int dy[13]={0,1,0,-1,0,1,-1,-1,1,2,0,-2,0};
	int x,y,s;
	int ans1=100,ans2=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		s=s*4+1;
		for(int i=0;i<s;i++){
			int X=x+dx[i];
			int Y=y+dy[i];
			if(0<=X && X<=9 && 0<=Y && Y<=9){
				if(mp[X][Y]==0)ans1--;
				mp[X][Y]++;
				ans2=max(ans2,mp[X][Y]);
			}
		}
	}
	cout<<ans1<<endl;
	cout<<ans2<<endl;
	
	return 0;
}

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++)
		if (out_of_range(x+dx[i], y+dy[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;
}