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 <stdio.h>

#pragma warning(disable : 4996)

int x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q), x--, y--)
	{
		if (q == 1)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (-1 <= i + j && i + j <= 1)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}

		if (q == 2)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
					{
						ok[y + i][x + j]++;
					}
				}
			}
		}

		if (q == 3)
		{
			for (int i = -2; i <= 2; i++)
			{
				for (int j = -2; j <= 2; j++)
				{
					if (-2 <= i + j && i + j <= 2)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}
	}

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

			if (ok[i][j] > r2)
			{
				r2 = ok[i][j];
			}
		}
	}

	printf("%d\n", r1);
	printf("%d\n", r2);

	return 0;
}

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

int f[10][10];
void solve(){

}
int dx[] = {1,0,-1,0,1,1,-1,-1,2,0,-2,0};
int dy[] = {0,1,0,-1,1,-1,1,-1,0,2,0,-2};
int cnt, d;
void ink(int x, int y, int s){
  for(int i = 0; i < 4*s; i++){
    int nx = dx[i] + x;
    int ny = dy[i] + y;
    if(nx < 0 || nx >= 10 || ny < 0 || ny >= 10)continue;  
    f[ny][nx]++;
    if(f[ny][nx] == 1)cnt++;
    d = max(d, f[ny][nx]);
  }
}
int main(){
  int x,y,size;
  cnt = d = 0;
  char c;
  memset(f, 0, sizeof(f));
  while(cin >> x >> c >> y >> c >> size){
    ink(x,y,size);
  }
  cout << 100 - cnt << endl << d << endl;
  return 0;
}

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

int map[10][10] = {{}};

void plot(int x, int y)
{
    if (0<=x && x<10 && 0<=y && y<10)
        ++map[x][y];
}

void small(int x, int y)
{
    plot(x  , y-1);
    plot(x-1, y  );
    plot(x,   y  );
    plot(x+1, y  );
    plot(x,   y+1);
}

void medium(int x, int y)
{
    for (int i = x-1; i <= x+1; ++i)
        for (int j = y-1; j <= y+1; ++j)
            plot(i, j);
}

void big(int x, int y)
{
    medium(x, y);
    plot(x, y-2);
    plot(x-2,y);
    plot(x+2,y);
    plot(x,y+2);
}

int main(void)
{
    int x, y, z;
    char c;
    while(cin >> x >> c >> y >> c >> z) {
        switch (z) {
            case 1:
                small(x, y);
                break;
            case 2:
                medium(x, y);
                break;
            case 3:
                big(x, y);
                break;
        }
    }

    int sum = 0, max = 0;
    for (int i = 0; i < 10; ++i) {
        for(int j = 0; j < 10; ++j) {
            if (map[i][j] == 0) ++sum;
            if (map[i][j] > max) max = map[i][j];
        }
    }
    cout << sum << endl << max << endl;
    return 0;
}

C++: ////#include <stdio.h>
////#include <math.h>
////int main(){
////double v;
////while(scanf("%lf",&v) != EOF){
////double y=v*v/19.6;
////int z=y;
////if(y==z){
////if(z%5==0){
////	z=y/5+1;
////printf("%d\n",z);
////continue;
////}
////}
////int q=y/5;
////q += 2;
////printf("%d\n",q);
////}
////return 0;
//
//#include <stdio.h>
//  int main(){ 
//	  int a[5],b[5],i,j;
//	  int hit=0,blow=0;
//	  while(scanf("%d %d %d %d %d %d %d %d",&a[1],&a[2],&a[3],&a[4],&b[1],&b[2],&b[3],&b[4]) != EOF){
//		  for(i=1;i<=4;i++){
//			  if(a[i]==b[i]){
//				  hit++;
//			  }
//		  }
//		  for(i=1;i<=4;i++){
//			  for(j=1;j<= 4;j++){
//				  if(j != i){
//				  if(a[i]==b[j]){
//					  blow++;
//				  }	  
//			  }
//			  }
//		  }
//		  printf("%d %d\n",hit,blow);
//		  hit=0; blow=0;
//	  }
//	  return 0;
//  }
#include <stdio.h>
  int main(){
               int x,y,s;
int i,j,num=0;
int xy[10][10]={};
	  while(scanf("%d,%d,%d",&x,&y,&s) != EOF){		  if(s==1){
			  xy[x][y]++;
			  xy[x-1][y]++;
			  xy[x+1][y]++;
			  xy[x][y-1]++;
			  xy[x][y+1]++;
		  }else if(s==2){
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
		  }else if(s==3){
			  xy[x-2][y]++;
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-2]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x][y+2]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
			  xy[x+2][y]++;
		  }
	  }
	  int max=xy[0][0];
	  for(i=0;i<10;i++){
		  for(j=0;j<10;j++){
			  if(xy[i][j]==0) num++;
			  if(xy[i][j]>max) max=xy[i][j];
		  }
	  }
	  printf("%d\n%d\n",num,max);
	  return 0;
  }

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int pap[11][11],dx[]={0,1,0,-1,1,-1,1,-1,2,0,-2,0},dy[]={1,0,-1,0,1,-1,-1,1,0,2,0,-2};
int main(){
int x,y,si,l,ma,cou;
fill(pap[0],pap[0]+10*10,0);
while(scanf("%d,%d,%d",&x,&y,&si)!=EOF){
    if(si==1)l=4;
    if(si==2)l=8;
    if(si==3)l=12;
    pap[x][y]+=1;
    for(int i=0;i<l;i++){
        pap[x+dx[i]][y+dy[i]]+=1;
    }
    /*for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        cout<<pap[i][j];
    }
    cout<<endl;
    }*/
}
for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        //cout<<pap[i][j];
        ma=max(ma,pap[i][j]);
        if(pap[i][j]==0){
            cou++;
        }
    }
    //cout<<endl;
}
cout<<cou+2<<endl<<ma<<endl;
return 0;
}