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<iostream>
#include<cstdio>
using namespace std;
int main(){
int vx[]={ 0, 1,-1, 0, 0,-1,-1, 1, 1, 2,-2, 0, 0};
int vy[]={ 0, 0, 0, 1,-1,-1, 1,-1, 1, 0, 0, 2,-2};
int x,y,size;
int map[10][10];
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
map[i][j]=0;
}
}
int nm_ans=0,max_ans=0;
while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
switch(size){
case 1:
for(int i=0;i<5;i++){
if((min(x+vx[i],y+vy[i])>=0)&&max(x+vx[i],y+vy[i])<10){
map[x+vx[i]][y+vy[i]]++;
}
}
break;
case 2:
for(int i=0;i<9;i++){
if((min(x+vx[i],y+vy[i])>=0)&&max(x+vx[i],y+vy[i])<10){
map[x+vx[i]][y+vy[i]]++;
}
}
break;
case 3:
for(int i=0;i<13;i++){
if((min(x+vx[i],y+vy[i])>=0)&&max(x+vx[i],y+vy[i])<10){
map[x+vx[i]][y+vy[i]]++;
}
}
break;
}
}
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
if(map[i][j]>max_ans){
max_ans=map[i][j];
}
if(map[i][j]==0){
nm_ans++;
}
}
}
cout<<nm_ans<<endl;
cout<<max_ans<<endl;
return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int data[10][10], x, y, size, sum = 0, max = 0;
  char trash[2];


  for(int i = 0; i < 10; i++){
    for(int j = 0; j < 10; j++){
      data[i][j] = 0;
    }
  }


  while(cin >> x >> trash[0] >> y >> trash[1] >> size){

    if(size == 1){

      data[x][y]++;
      data[x][y-1]++;
      data[x-1][y]++;
      data[x+1][y]++;
      data[x][y+1]++;

    }else if(size == 2){

      data[x][y]++;
      data[x][y-1]++;
      data[x-1][y]++;
      data[x+1][y]++;
      data[x][y+1]++;
      data[x-1][y-1]++;
      data[x+1][y-1]++;
      data[x-1][y+1]++;
      data[x+1][y+1]++;

    }else{

      data[x][y]++;
      data[x][y-1]++;
      data[x-1][y]++;
      data[x+1][y]++;
      data[x][y+1]++;
      data[x-1][y-1]++;
      data[x+1][y-1]++;
      data[x-1][y+1]++;
      data[x+1][y+1]++;
      data[x-2][y]++;
      data[x+2][y]++;
      data[x][y+2]++;
      data[x][y-2]++;

      
 
    }
  }


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

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

  return 0;

}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
  int dec[10][10];
  int x,y,size,num,max;
  char a;
  num = 0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
       dec[i][j]=0;
    }
  }
                 
  while(cin >> y >> a>> x>> a>> size){
    if(size == 1){
      if(x+1 < 10 && x+1 >= 0 && y>=0 && y<10) dec[x+1][y] += 1;
      if(x-1 >=0 && x-1 < 10 && y>=0 && y<10) dec[x-1][y] += 1;
      if(x >= 0 && x < 10 && y+1<10 && y+1 >= 0) dec[x][y+1] += 1;
     if(x >=0 && x< 10 && y-1 <10 && y-1 >=0) dec[x][y-1] += 1;
        dec[x][y] += 1;
        } else if(size == 2){
      for(int i=-1;i<=1;i++){
    for(int j=-1;j<=1;j++){
      if(x+i >=0&& x+i<10 && y+j>=0&& y+j<10) dec[x+i][y+j] +=1;
    }
      }
    }else if(size==3){
      for(int i=-1;i<=1;i++){
    for(int j=-1;j<=1;j++){
      if(x+i >=0&& x+i<10 && y+j>=0&& y+j<10)  dec[x+i][y+j] +=1;
    }
      }
      if(x+2<10 && x+2 >=0 && y>=0 && y<10  )dec[x+2][y] +=1;
      if(x-2>=0 &&x-2 <10 && y>=0 && y<10  )dec[x-2][y] +=1;
      if(x<10 && x >=0 && y+2>=0 && y+2<10  )dec[x][y+2] +=1;
      if(x>=0 && x<10 && y-2>=0 && y-2<10  )dec[x][y-2] +=1;
    }
  }
  max = dec[0][0];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){ 
      if(dec[i][j]==0)
    num +=1; 
      if(max < dec[i][j])
    max=dec[i][j];
    }
  }
  cout << num << endl << max<<endl;
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;
int main ()
{
	int m[18][18] = {};
	int x, y, s;
	int dx1[4] = {0, 1, 0, -1}, dy1[4] = {1, 0, -1, 0};
	int dx2[8] = {0, 1, 1, 1, 0, -1, -1, -1}, dy2[8] = {1, 1, 0, -1, -1, -1, 0, 1};
	int dx3[12] = {0, -1, 0, 1, -2, -1, 1, 2, -1, 0, 1, 0}, dy3[12] = {2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2};
	while (scanf("%d,%d,%d", &x, &y, &s) != EOF)
	{
		x += 3;
		y += 3;
		m[x][y]++;
		switch (s)
		{
		case 1:
			for (int i = 0; i < 4; i++)m[x + dx1[i]][y + dy1[i]]++;
			break;
		case 2:
			for (int i = 0; i < 8; i++)m[x + dx2[i]][y + dy2[i]]++;
			break;
		case 3:
			for (int i = 0; i < 12; i++)m[x + dx3[i]][y + dy3[i]]++;
			break;
		}
	}
	int ans1 = 0, ans2 = 0;
	for (int x = 3; x <13; x++)
	{
		for (int y = 3; y < 13; y++)
		{
			if (m[x][y] == 0)ans1++;
			ans2 = max(ans2, m[x][y]);
		}
	}
	cout << ans1 << endl << ans2 << endl;
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
using namespace std;
int main() {
	int i,j,k,l,m,n,o,x,y,z;
	int max = 0;
	int count = 0;
	vector< vector<int> > s;
	s.resize(10);
	for (i = 0; i < 14; i++) {
		s[i].resize(14);
	}
	for (j = 0; j < 14; j++) {
		for (k = 0; k < 14; k++) {
			s[j][k] = 0;
		}
	}
	while (scanf("%d,%d,%d", &x, &y, &z)) {
		if (z == 1) {
			s[x + 2][y + 2] += 1;
			s[x + 1][y + 2] += 1;
			s[x + 3][y + 2] += 1;
			s[x + 2][y + 1] += 1;
			s[x + 2][y + 3] += 1;
		}
		else if (z == 2) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
				}
			}
		}
		else if (z == 3) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
					s[x][y + 2] += 1;
					s[x + 4][y + 2] += 1;
					s[x + 2][y] += 1;
					s[x + 2][y + 4] += 1;
				}
			}
		}
	}
	for (n = 2; n < 12; n++) {
		for (o = 2; o < 12; o++) {
			if (max < s[n][o]) {
				max = s[n][o];
			}
			if (s[n][o] == 0) {
				count += 1;
			}
		}
	}
	cout << count << endl;
	cout << max << endl;
	return 0;
}