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<array>
using namespace std;
void center(array<int, 100> &a, int x, int y){
  a[y*10+x]++;
}
void left(array<int, 100> &a, int x, int y){
  if(x>0){a[y*10+x-1]++;}
}
void right(array<int, 100> &a, int x, int y){
  if(x<9){a[y*10+x+1]++;}
}
void up(array<int, 100> &a, int x, int y){
  if(y>0){a[(y-1)*10+x]++;}
}
void down(array<int, 100> &a, int x, int y){
  if(y<9){a[(y+1)*10+x]++;}
}
void leftup(array<int, 100> &a, int x, int y){
  if(x>0&&y>0){a[(y-1)*10+x-1]++;}
}
void rightup(array<int, 100> &a, int x, int y){
  if(x<9&&y>0){a[(y-1)*10+x+1]++;}
}
void rightdown(array<int, 100> &a, int x, int y){
  if(x<9&&y<9){a[(y+1)*10+x+1]++;}
}
void leftdown(array<int, 100> &a, int x, int y){
  if(x>0&&y<9){a[(y+1)*10+x-1]++;}
}
void leftleft(array<int, 100> &a, int x, int y){
  if(x>1){a[y*10+x-2]++;}
}
void rightright(array<int, 100> &a, int x, int y){
  if(x<8){a[y*10+x+2]++;}
}
void upup(array<int, 100> &a, int x, int y){
  if(y>1){a[(y-2)*10+x]++;}
}
void downdown(array<int, 100> &a, int x, int y){
  if(y<8){a[(y+2)*10+x]++;}
}

void small(array<int, 100> &a,int x,int y){
  center(a,x,y);
  left(a,x,y);
  right(a,x,y);
  up(a,x,y);
  down(a,x,y);
}
void med(array<int, 100> &a,int x,int y){
  small(a,x,y);
  leftup(a,x,y);
  rightup(a,x,y);
  rightdown(a,x,y);
  leftdown(a,x,y);
}
void large(array<int, 100> &a,int x,int y){
  med(a,x,y);
  leftleft(a,x,y);
  rightright(a,x,y);
  upup(a,x,y);
  downdown(a,x,y);
}

int main(){
  array<int, 100> a{};
  int x,y,size;
  while(scanf("%d,%d,%d",&x,&y,&size)>0){
    switch(size){
    case 1:small(a,x,y);break;
    case 2:med(a,x,y);break;
    case 3:large(a,x,y);break;
    }
  }
  int zero=0,max=0;
  for(int i=0;i<100;i++){
    if(max<a[i]) max=a[i];
    if(a[i]==0) zero++;
  }
  printf("%d\n%d\n",zero,max);
}

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

int main()
{
  int x, y, size;
  int canvas[10][10];
  int emp, max;
  char comma;
  int i, j;

  for(i=0; i<10; i++){
    for(j=0; j<10; j++) canvas[i][j]=0;
  }
  while(cin >> x >> comma >> y >> comma >> size){
    canvas[x][y]++;
    if(x>0) canvas[x-1][y]++;
    if(x<9) canvas[x+1][y]++;
    if(y>0) canvas[x][y-1]++;
    if(y<9) canvas[x][y+1]++;
    if(size>1){
      for(i=-1; i<=1; i+=2){
        for(j=-1; j<=1; j+=2){
          if(x+i>=0 && x+i<=9 && y+j>=0 && y+j<=9) canvas[x+i][y+j]++;
        }
      }
    }
    if(size>2){
      if(x>1) canvas[x-2][y]++;
      if(x<8) canvas[x+2][y]++;
      if(y>1) canvas[x][y-2]++;
      if(y<8) canvas[x][y+2]++;
    }
  }
  emp=0; max=0;
  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(canvas[i][j]==0) emp++;
      if(max<canvas[i][j]) max=canvas[i][j];
    }
  }
  printf("%d\n%d\n", emp, max);

  return 0;
}

C++: #include<iostream>

using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(cin>>x>>c>>y>>c>>s){
		
		while(1){
			data[x][y]++;
			if(y-1>=0)data[x][y-1]++;
			if(x+1<10)data[x+1][y]++;
			if(y+1<10)data[x][y+1]++;
			if(x-1>=0)data[x-1][y]++;
			if(s==1)break;
			if(x+1<10 && y+1<10)data[x+1][y+1]++;
			if(x+1<10 && y-1>=0)data[x+1][y-1]++;
			if(x-1>=0 && y-1>=0)data[x-1][y-1]++;
			if(x-1>=0 && y+1<10)data[x-1][y+1]++;
			if(s==2)break;
			if(x+2<10)data[x+2][y]++;
			if(y-2>=0)data[x][y-2]++;
			if(y+2<10)data[x][y+2]++;
			if(x-2>=0)data[x-2][y]++;
			break;
		}
		
	}
	int white=0,ma=0;
	for(int i=0;i<i<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<" "<<ma<<endl;
}

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

int paper[10][10] = {0};

void size_s(int x, int y);
void size_m(int x, int y);
void size_l(int x, int y);
void disp();

int main(){
	int inpx, inpy, size;
	while(scanf("%d,%d,%d", &inpx, &inpy, &size) != EOF){
		if(size == 1) size_s(inpx, inpy);
		if(size == 2) size_m(inpx, inpy);
		if(size == 3) size_l(inpx, inpy);
	}
	disp();
	return 0;
}

void size_s(int x, int y){
	int sousax[4] = {0, 1, 0, -1};
	int sousay[4] = {-1, 0, 1, 0};
	paper[y][x]++;
	for(int i = 0; i < 4; i++){
		int pointx = x + sousax[i], pointy = y + sousay[i];
		if(pointx < 0 || pointx > 9 || pointy < 0 || pointy > 9) continue;
		else paper[pointy][pointx]++;
	}
}

void size_m(int x, int y){
	int sousax[8] = {0, 1, 1, 1, 0, -1, -1, -1};
	int sousay[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
	paper[y][x]++;
	for(int i = 0; i < 8; i++){
		int pointx = x + sousax[i], pointy = y + sousay[i];
		if(pointx < 0 || pointx > 9 || pointy < 0 || pointy > 9) continue;
		else paper[pointy][pointx]++;
	}
}

void size_l(int x, int y){
	int sousax[12] = {0, 2, 0, -2, 0, 1, 1, 1, 0, -1, -1, -1};
	int sousay[12] = {-2, 0, 2, 0, -1, -1, 0, 1, 1, 1, 0, -1};
	paper[y][x]++;
	for(int i = 0; i < 12; i++){
		int pointx = x + sousax[i], pointy = y + sousay[i];
		if(pointx < 0 || pointx > 9 || pointy < 0 || pointy > 9) continue;
		else paper[pointy][pointx]++;
	}
}

void disp(){
	int white = 0, deep = -1;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(paper[i][j] > deep) deep = paper[i][j];
			if(paper[i][j] == 0) white++;
		}
	}
	cout <<white <<endl <<deep <<endl;
}