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 <algorithm>

using namespace std;

int main(void){

  int p[14][14] = {0};
  int x,y,size;
  char ten,tenten;
 back:;
  while( cin >> x >> ten >> y >> tenten >> size ){
    x += 2;
    y += 2;
    switch(size){
    case 3:
      p[x-2][y]++;
      p[x+2][y]++;
      p[x][y-2]++;
      p[x][y+2]++;
    case 2:
      p[x+1][y+1]++;
      p[x-1][y-1]++;
      p[x+1][y-1]++;
      p[x-1][y+1]++;
    case 1:
      p[x][y+1]++;
      p[x][y-1]++;
      p[x-1][y]++;
      p[x+1][y]++;
      p[x][y]++;
    }
  }
  
  int cnt = 0;
  int m = 0;
  for( int i = 2 ; i < 12 ; i++ ){
    for( int j = 2 ; j < 12 ; j++ ){
      if( p[i][j] == 0 ) cnt++;
      m = max( m , p[i][j] );
      cout << " " << p[i][j] << " ";
    }
    cout << endl;
  }
  cout << cnt << endl << m << endl;
  return 0;
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

#define XAXIS 10
#define YAXIS 10

int main(){
	int paper[XAXIS][YAXIS];
	int x,y,s;
	int white = 0, max=0;

	//initialize
	for(int i=0; i<XAXIS; i++)
	for(int j=0; j<YAXIS; j++)
		paper[i][j] = 0;

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		switch(s){
			case 3:
				if(x+2 <  XAXIS) paper[x+2][y] += 1; //2 right 
				if(y+2 <  YAXIS) paper[x][y+2] += 1; //2 down
				if(x-2 >= 0)     paper[x-2][y] += 1; //2 left
				if(y-2 >= 0)     paper[x][y-2] += 1; //2 up

			case 2:
				if(x+1 <  XAXIS && y+1 < YAXIS )  paper[x+1][y+1] += 1; //right upper
				if(x+1 <  XAXIS && y-1 > 0)       paper[x+1][y-1] += 1; //right downer
				if(x-1 >= 0     && y+1 < YAXIS )  paper[x-1][y+1] += 1; //left upper
				if(x-1 >= 0     && y-1 < 0)       paper[x-1][y-1] += 1; //left downer

			case 1:
				if(x+1 <  XAXIS) paper[x+1][y] += 1; //right
				if(y+1 <  YAXIS) paper[x][y+1] += 1; //down
				if(x-1 >= 0)     paper[x-1][y] += 1; //left
				if(y-1 >= 0)     paper[x][y-1] += 1; //up
				paper[x][y] += 1;
				break;
		}
	}

	for(int i=0; i<XAXIS; i++)
		for(int j=0; j<YAXIS; j++){
			if(paper[i][j] == 0 )  white++;
			if(max < paper[i][j] ) max = paper[i][j];
		}

	cout<<white<<endl<<max<<endl;
	return 0;
}

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

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

void drop_ink(int x,int y,int size) {
	if (size == 1) {
		for (int i = 0; i < 3; i++) {
			if (x + i - 1 >= 0 && y >= 0) { paper[x + i - 1][y] += 1; }
		}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y + i - 1 >= 0) {
				if (y + i - 1 != y) { paper[x][y + i - 1] += 1; }
			}
		}
	}
	else if (size == 2) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x >= 0 && y - 1 + i >= 0) {
				paper[x][y - 1 + i] += 1;
				}
			}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
				}
			}
	}
	else if (size == 3) {
		for (int i = 0; i < 3; i++) {
			if (x + 1 >= 0 && y - 1 + i >= 0) {
				paper[x + 1][y - 1 + i] += 1;
			}
		}
		for (int i = 0; i < 5; i++) {
			if (x >= 0 && y - 2 + i >= 0) {
				paper[x][y - 2 + i] += 1;
			}
		}
		for (int i = 0; i < 3; i++) {
			if (x - 1 >= 0 && y - 1 + i >= 0) {
				paper[x - 1][y - 1 + i] += 1;
			}
		}
		if (x + 2 >= 0 && y >= 0){paper[x + 2][y] += 1;}
		if (x - 2 >= 0 && y >= 0) { paper[x - 2][y] += 1; }
	}
}
int main() {
	int x, y, size;
	int white = 0, most_intense=0;
	while (scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		drop_ink(x,y,size);
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (paper[j][i] == 0) { white += 1; }
			if (most_intense < paper[j][i]) { most_intense = paper[j][i]; }
		}
	}
	cout << white << endl << most_intense ;
}

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 xy[10][10]={};
  int main(){
	  int x,y,s,i,j,num1=0;
	  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{
			  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) num1++;
			  if(xy[i][j]>max) max=xy[i][j];
		  }
	  }
	  printf("%d\n%d\n",num1,max);
	  return 0;
  }