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\n", count, max)
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  string str;
  int paper[10][10];
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      paper[i][j]=0;
    }
  }
  int I=50;
  while(cin >> str){
    int x,y,s;
    x=str[0]-48;
    y=str[2]-48;
    s=str[4]-48;
    if(s==1){
      paper[x][y]++;
      paper[x+1][y]++;
      paper[x-1][y]++;
      paper[x][y+1]++;
      paper[x][y-1]++;
    }
    else if(s==2){
      paper[x][y]++;
      paper[x][y+1]++;
      paper[x][y-1]++;
      paper[x+1][y]++;
      paper[x+1][y+1]++;
      paper[x+1][y-1]++;
      paper[x-1][y]++;
      paper[x-1][y+1]++;
      paper[x-1][y-1]++;
    }
    else if(s==3){
      paper[x][y-2]++;
      paper[x+1][y-1]++;
      paper[x][y-1]++;
      paper[x-1][y-1]++;
      paper[x-2][y]++;
      paper[x-1][y]++;
      paper[x][y]++;
      paper[x+1][y]++;
      paper[x+2][y]++;
      paper[x-1][y+1]++;
      paper[x][y+1]++;
      paper[x+1][y+1]++;
      paper[x][y+2]++;
    }
    int white=0,koii=0;
    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
        if(paper[i][j]==0)white++;
        koii=max(koii,paper[i][j]);
      }
    }
    cout << white << endl << koii << endl;
  }
}

C++: #include <iostream>

int main()
{
    int density[10][10] = {};
    int x, y, size;
    char comma;
    while (std::cin >> x >> comma >> y >> comma >> size) {
        switch (size) {
        case 3:
            if (x - 2 >= 0) ++density[x - 2][y];
            if (y - 2 >= 0) ++density[x][y - 2];
            if (x + 2 < 10) ++density[x + 2][y];
            if (y + 2 < 10) ++density[x][y + 2];
            // fall through
        case 2:
            if (x - 1 >= 0 && y - 1 >= 0) ++density[x - 1][y - 1];
            if (x - 1 >= 0 && y + 1 < 10) ++density[x - 1][y + 1];
            if (x + 1 < 10 && y - 1 >= 0) ++density[x + 1][y - 1];
            if (x + 1 < 10 && y + 1 < 10) ++density[x + 1][y + 1];
            // fall through
        case 1:
            if (x - 1 >= 0) ++density[x - 1][y];
            if (y - 1 >= 0) ++density[x][y - 1];
            if (x + 1 < 10) ++density[x + 1][y];
            if (y + 1 < 10) ++density[x][y + 1];
        }
        ++density[x][y];
    }

    int cnt = 0, max = 0;
    for (int i = 0; i < 10; ++i) {
        for (int j = 0; j < 10; ++j) {
            if (density[i][j] == 0) ++cnt;
            if (max < density[i][j]) max = density[i][j];
        }
    }
    std::cout << cnt << std::endl << max << std::endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<stdio.h>
int main(){
	int x,y,size;
	std::vector<std::vector<int> > vec(10,std::vector<int>(10,0));
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0,max=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
		if(max<vec[i])max=vec[i];
	}
	std::cout<<no<<std::endl;
	std::cout<<max<<std::endl;
	/*sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;*/
	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int field[10][10] = {0};

void dfs1(int x, int y) {
  field[y][x] += 1;
  for(int dx = -1 ; dx <= 1 ; dx++) {
    int nx = x + dx;
    if(0 <= nx && nx < 10 && nx != x) field[y][nx] += 1;
  }
  for(int dy = -1 ; dy <= 1 ; dy++) {
    int ny = y + dy;
    if(0 <= ny && ny < 10 && ny != y) field[ny][x] += 1;
  }
}

void dfs2(int x, int y) {
  for(int dx = -1 ; dx <= 1 ; dx++) {
    for(int dy = -1 ; dy <= 1 ; dy++) {
      int nx = x + dx, ny = y + dy;
      if(0 <= nx && nx < 10 && 0 <= ny && ny < 10) field[ny][nx] += 1;
    }
  }
}

void dfs3(int x, int y) {
  if(y+2 < 10) field[y+2][x] += 1;
  if(y-2 >= 0) field[y-2][x] += 1;
  if(x+2 < 10) field[y][x+2] += 1;
  if(x-2 >= 0) field[y][x-2] += 1;
  for(int dx = -1 ; dx <= 1 ; dx++) {
    for(int dy = -1 ; dy <= 1 ; dy++) {
      int nx = x + dx, ny = y + dy;
      if(0 <= nx && nx < 10 && 0 <= ny && ny < 10) field[ny][nx] += 1;
    }
  }
}

int main(void) {
  int x, y, size;
  char c1, c2;
  int max=0;
  int white=0;
  while(cin >> x >> c1  >> y >> c2 >> size) {
    if(size == 1) dfs1(x, y);
    if(size == 2) dfs2(x, y);
    if(size == 3) dfs3(x, y);
  }
  /*for(int i = 0 ; i < 10 ; i++) {
    for(int j = 0 ; j < 10 ; j++) {
      cout << field[i][j] << ' ';
    }
    cout << endl;
    }*/
  for(int i = 0 ; i < 10 ; i++) {
    for(int j = 0 ; j < 10 ; j++) {
      if(field[i][j] > max) max = field[i][j];
      if(field[i][j] == 0) white++;
    }
  }
  cout << white << endl;
  cout << max << endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int k[10][10]={0};
  int x,y,s,i,j;
  char c;
  int d=0,w=0;
  int S[4]={0,5,9,13};
  int X[]={0,1,-1,0,0,1,-1,1,-1,2,-2,0,0};
  int Y[]={0,0,0,1,-1,1,-1,-1,1,0,0,2,-2};
  while(cin>>x>>c>>y>>c>>s){
    for(i=0;i<S[s];i++){
      
      if(-1<x&&x<10&&-1<y&&y<10){
	if(-1<x+X[i]&&x+X[i]<10&&-1<y+Y[i]&&y+Y[i]<10){
	  k[x+X[i]][y+Y[i]]++;
	  if(k[x+X[i]][y+Y[i]]>d){
	    d=k[x+X[i]][y+Y[i]];
	  }
	}
      }
    }
  }
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(k[i][j]==0)w++;
    }
  }
  if(d!=0){
    cout<<w<<"\n"<<d<<endl;
  }
  return 0;
}