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 <cstdio>
#include <iostream>
using namespace std;

int d[10][10];

inline void drop2(int x, int y) {
	if (x>=0 && x<10 && y>=0 && y<10)
		d[y][x]++;
}

void drop(int x, int y, int size) {
	if (size == 1) {
		drop2(x-1, y);
		drop2(x, y-1);
		drop2(x, y);
		drop2(x, y+1);
		drop2(x+1, y);
	} else if (size == 2) {
		for (int i = -1; i <= 1; i++)
			for (int j = -1; j <= 1; j++)
				drop2(x+i, y+j);
	} else /* if (size == 3 */ {
		for (int i = -1; i <= 1; i++)
			for (int j = -1; j <= 1; j++)
				drop2(x+i, y+j);
		drop2(x-2, y);
		drop2(x, y-2);
		drop2(x, y+2);
		drop2(x+2, y);
	}
}

int main() {
	int x, y, size;
	for (int y = 0; y < 10; y++)
		for (int x = 0; x < 10; x++)
			d[y][x] = 0;
	
	while (scanf("%d,%d,%d", &x, &y, &size) == 3) {
		drop(x, y, size);
	}

	int zeronum = 0;
	int maxnum = 0;
	for (int y = 0; y < 10; y++) {
		for (int x = 0; x < 10; x++) {
			if (d[y][x] == 0)
				zeronum++;
			if (d[y][x] > maxnum)
				maxnum = d[y][x];
		}
	}
	cout << zeronum << endl;
	cout << maxnum << endl;
	return 0;
}

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;
}