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>

using namespace std;


main(){
  
  int map[10][10];
  int x,y,size;
  //initialize
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      map[i][j]=0;
    }
  }
  int white=0,Max=0;
  while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
    
    if(size==1){
      if(y>=0&&y<10&&(x-1)>=0&&(x-1)<10)map[y][x-1]++;    
      if((y-1)>=0&&(y-1)<10&&x>=0&&x<10)map[y-1][x]++;
	 if(y>=0&&y<10&&x>=0&&x<10)map[y][x]++;
	    if((y+1)>=0 &&(y+1)<10&&x>=0&&x<10)map[y+1][x]++;
	       if(y>=0&&y<10&&(x+1)>=0&&(x+1)<10)map[y][x+1]++;
		  
    }
    if(size==2){
      
      if(y-1>=0&&y-1<10&&(x-1)>=0&&(x-1)<10)map[y-1][x-1]++;
      if(y+1>=0&&y+1<10&&(x-1)>=0&&(x-1)<10)map[y+1][x-1]++;
      
      if(y-1>=0&&y-1<10&&(x+1)>=0&&(x+1)<10)map[y-1][x+1]++;
      if(y+1>=0&&y+1<10&&(x+1)>=0&&(x+1)<10)map[y+1][x+1]++;
       if(y>=0&&y<10&&(x-1)>=0&&(x-1)<10)map[y][x-1]++;    
      if((y-1)>=0&&(y-1)<10&&x>=0&&x<10)map[y-1][x]++;
	 if(y>=0&&y<10&&x>=0&&x<10)map[y][x]++;
	    if((y+1)>=0 &&(y+1)<10&&x>=0&&x<10)map[y+1][x]++;
	       if(y>=0&&y<10&&(x+1)>=0&&(x+1)<10)map[y][x+1]++;


    }
    if(size==3){                     if(y>=0&&y<10&&(x-2)>=0&&(x-2)<10) map[y][x-2]++;
                     
       if(y-2>=0&&y-2<10&&(x)>=0&&(x)<10)map[y-2][x]++; if(y+2>=0&&y+2<10&&(x)>=0&&(x)<10)  map[y+2][x]++;
                      
                                     if(y>=0&&y<10&&(x+2)>=0&&(x+2)<10)  map[y][x+2]++;
					  if(y-1>=0&&y-1<10&&(x-1)>=0&&(x-1)<10)map[y-1][x-1]++;
      if(y+1>=0&&y+1<10&&(x-1)>=0&&(x-1)<10)map[y+1][x-1]++;
      
      if(y-1>=0&&y-1<10&&(x+1)>=0&&(x+1)<10)map[y-1][x+1]++;
      if(y+1>=0&&y+1<10&&(x+1)>=0&&(x+1)<10)map[y+1][x+1]++;
       if(y>=0&&y<10&&(x-1)>=0&&(x-1)<10)map[y][x-1]++;    
      if((y-1)>=0&&(y-1)<10&&x>=0&&x<10)map[y-1][x]++;
	 if(y>=0&&y<10&&x>=0&&x<10)map[y][x]++;
	    if((y+1)>=0 &&(y+1)<10&&x>=0&&x<10)map[y+1][x]++;
	       if(y>=0&&y<10&&(x+1)>=0&&(x+1)<10)map[y][x+1]++;
					
    }
    
    
  }

    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	if(map[i][j]==0)white++;
	if(map[i][j]>=Max)Max=map[i][j];
      }
      
    }
  cout << white<<" "<< Max << endl;

  return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int x, y, s;
    char c;
    vector<vector<int>> v(14, vector<int>(14, 0));
    while (cin >> x >> c >> y >> c >> s) {
        x += 2; y += 2;
        switch (s) {
            case 3:
                v[x][y-2]++; v[x][y+2]++;
                v[x-2][y]++; v[x+2][y]++;
            case 2:
                v[x-1][y-1]++; v[x-1][y+1]++;
                v[x+1][y-1]++; v[x+1][y+1]++;
            case 1:
                v[x+1][y]++; v[x-1][y]++;
                v[x][y-1]++; v[x][y+1]++;
                v[x][y]++;
                break;
        }
    }
    
    int mx = 0, cnt = 0;
    for (int i = 2; i < 12; i++) {
        for (int j = 2; j < 12; j++) {
            mx = max(mx, v[i][j]);
            if (v[i][j] == 0) cnt++;
        }
    }
    cout << cnt << "\n" << mx << endl;
    return 0;
}

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 ]++;
    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;
  }
  cout << cnt << endl;
  cout << mx << endl;
  return 0;
}




// EOF

C++: #include <iostream>
#include <string>
#include <vector>
#include <cstdlib>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

vector<string> split(const string &str, char delim)
{
  vector<string> res;
  size_t current = 0, found;
  while((found = str.find_first_of(delim, current)) != string::npos)
  {
    res.push_back(string(str, current, found - current));
    current = found + 1;
  }
  res.push_back(string(str, current, str.size() - current));
  return res;
}

int f[10][10];

bool checkf(int x,int y)
{
	if(0 <= x && x < 10 && 0 <= y && y < 10)
	{
		return true;
	}
	else
	{
		return false;
	}
}

void dropInk(int x,int y,int size)
{
	if(size == 1)
	{
		f[x][y]++;
		if(checkf(x+1,y)) f[x+1][y]++;
		if(checkf(x-1,y)) f[x-1][y]++;
		if(checkf(x,y+1)) f[x][y+1]++;
		if(checkf(x,y-1)) f[x][y-1]++;
	}
	else if(size == 2)
	{
		REP(i,-1,2)
		{
			REP(j,-1,2)
			{
				if(checkf(x+i,y+j)) f[x+i][y+j]++;
			}
		}
	}
	else if(size == 3)
	{
		REP(i,-1,2)
		{
			REP(j,-1,2)
			{
				if(checkf(x+i,y+j)) f[x+i][y+j]++;
			}
		}
		if(checkf(x+2,y)) f[x+2][y]++;
		if(checkf(x-2,y)) f[x-2][y]++;
		if(checkf(x,y+2)) f[x][y+2]++;
		if(checkf(x,y-2)) f[x][y-2]++;
	}
}

int main()
{
	memset(f,0,sizeof(f));
	string s;
	while(cin >> s)
	{
		vector<string> _s = split(s,',');
		int x = atoi(_s[0].c_str());
		int y = atoi(_s[1].c_str());
		int size = atoi(_s[2].c_str());

		dropInk(y,x,size);
	}

	int count = 0;
	int ans = 0;
	rep(i,10)
	{
		rep(j,10)
		{
			if(f[i][j] == 0)
			{
				count++;
			}
			ans = max(ans,f[i][j]);
		}
	}

	cout << count << endl << ans << endl;
	return 0;
}