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 main(){
	int board[10][10]={0};
	fill(board[0], board[0] + 10 * 10, 0);
	const int INK[3][14][2] = {
		{{6},{0,-1},{-1,0},{0,0},{1,0},{0,1}},
		{{10},{-1,-1},{0,-1},{1,-1},{-1,0},{0,0},{1,0},{-1,1},{0,1},{1,1}},
		{{14},{0,-2},{-1,-1},{0,-1},{1,-1},{-2,0},{-1,0},{0,0},{1,0},{2,0},{-1,1},{0,1},{1,1},{0,2}}
	};
	int x,y,ink;
	int max = 0;
	int count = 100;
	while(scanf("%d,%d,%d",&x,&y,&ink)!=EOF){
		for(int i=1;i<INK[ink-1][0][0];++i){
			int dx = x + INK[ink-1][i][0];
			int dy = y + INK[ink-1][i][1];
			if(!(dx<0||dy<0||dx>9||dy>9)){
				if(board[dx][dy]==0)--count;
				++board[dx][dy];
				if(board[dx][dy]>max)max = board[dx][dy];
			}
		}
		/*debug
		for(int i=0;i<10;++i){
			for(int j=0;j<10;++j) cout << board[i][j] << " ";
			cout << "\n";
		}*/
	}
	cout << count << "\n" << max << "\n";
	return 0;
}

C++: #include<iostream>
#define DROP(x,y) if(x>=0&&y>=0&&x<10&&y<10)++cloth[x][y]
using namespace std;

int main(){

	int x, y, size;
	int cloth[10][10];
	int count, max;
	
	for (int i = 0; i < 10; ++i)
	for (int j = 0; j < 10; ++j)
		cloth[i][j] = 0;

	while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){
		if (size == 1){
			DROP(x, y);
			DROP(x + 1, y);
			DROP(x, y + 1);
			DROP(x - 1, y);
			DROP(x, y - 1);
		}

		else if (size == 2){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			DROP(x + 1, y + 1);
		}

		else if (size == 3){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			DROP(x + 1, y + 1);
			DROP(x + 2, y);
			DROP(x - 2, y);
			DROP(x, y + 2);
			DROP(x, y - 2);
		}
	}

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

	cout << count << endl << max << endl;

	



}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<random>
using namespace std;

int main(){

  int s3x[12] = {0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2};
  int s3y[12] = {1, 0, -1, 0, 1, -1, 1, -1, 2, 0, -2, 0};

  vector< vector<int> > p( 10, vector<int> (10, 0) );
  int x, y, s;
  int cnt = 0;
  int mx = 0;

  while( scanf("%d,%d,%d", &x, &y, &s) != EOF ){
    p[ x ][ y ]++;
    mx = max(mx, p[x][y]);
    cnt++;
    for(int i=0; i<s*4; i++){
      int tx = x + s3x[i];
      int ty = y + s3y[i];
      if( tx < 0 || ty < 0 || tx >= 10 || ty >= 10 ) continue;
      p[tx][ty]++;
      cnt++;
      mx = max(mx, p[tx][ty]);
    }
    // cerr << cnt << endl;
  }
  int ans = 0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if( p[i][j] == 0 ) ans++;
    }
  }
  cout << ans << endl;
  cout << mx << endl;
  return 0;
}




// EOF

C++: #include<iostream>
#include<fstream>
#include<sstream>
#include<cstdio>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
#include<cstring>
using namespace std;

int main(){
	int mat[10][10];
	memset(mat,0,sizeof(mat));
	int x,y,s;
	while(scanf("%d,%d,%d",&y,&x,&s)==3){
		mat[x][y]++;
		if(y-1>=0)mat[x][y-1]++;
		if(x-1>=0)mat[x-1][y]++;
		if(x+1<10)mat[x+1][y]++;
		if(y+1<10)mat[x][y+1]++;
		if(s>1){
			if(x-1>=0 && y-1>=0)mat[x-1][y-1]++;
			if(x+1<10 && y-1>=0)mat[x+1][y-1]++;
			if(x+1<10 && y+1<10)mat[x+1][y+1]++;
			if(x-1>=0 && y+1<10)mat[x-1][y+1]++;
			if(s==3){
				if(y-2>=0)mat[x][y-2]++;
				if(x-2>=0)mat[x-2][y]++;
				if(x+2<10)mat[x+2][y]++;
				if(y+2<10)mat[x][y+2]++;		
			}
		}
	}
	x = 0;
	s = 0;
	int maxi = 0;
	for(x=0;x<10;++x){
		for(y=0;y<10;++y){
			if(mat[x][y] == 0)s++;
			maxi = max(maxi,mat[x][y]);
		}
	}
	cout<<s<<endl<<maxi<<endl;
	return 0;
}

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

int main()
{
	int paper[10][10] = {{0}};
	int vecx[] = {0, 1, 0, -1};
	int vecy[] = {-1, 0, 1, 0};
	
	int x, y, size;
	while( scanf("%d, %d, %d", &x, &y, &size) != EOF ){
		switch( size ){
			case 1:
				paper[x][y]++;
				for(int i=0;i<4;i++){
					int nx = x + vecx[i];
					int ny = y + vecy[i];
					
					if(nx >= 0 && nx < 10 && ny >=0 && ny <10){
						paper[nx][ny]++;
					}
				}
				break;
				
			case 2:
				for(int i=-1;i<=1;i++){
					for(int j=-1;j<=1;j++){
						int nx = x + i;
						int ny = y + j;
						
						if(nx >= 0 && nx <10 && ny >= 0 && ny <10){
							paper[nx][ny]++;
						}
						
					}
				}
				break;
				
			case 3:
				for(int i=-1;i<=1;i++){
					for(int j=-1;j<=1;j++){
						int nx = x + i;
						int ny = y + j;
						
						if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10){
							paper[nx][ny]++;
						}
					}
				}
				for(int i=0;i<4;i++){
					int nx = x + vecx[i]*2;
					int ny = y + vecy[i]*2;
					
					if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10){
						paper[nx][ny]++;
					}
				}
				break;
			}
		
	}
	
	int plain = 0, max_c = 0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if( !paper[i][j]){
				plain++;
			}
			max_c = max( max_c, paper[i][j]);
		}
	}
	cout<<plain<<endl;
	cout<<max_c<<endl;
	
	return 0;
}