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;

bool onPaper(int x, int y) {
  return (0 <= x && x <= 10 &&
          0 <= y && y <= 10);
}

void smallDrop(int x, int y, int p[][10]) {
  if (onPaper(x-1, y))
    p[x-1][y]++;
  if (onPaper(x+1, y))
    p[x+1][y]++;
  if (onPaper(x, y-1))
    p[x][y-1]++;
  if (onPaper(x, y+1))
    p[x][y+1]++;
}

void middleDrop(int x, int y, int p[][10]) {
  smallDrop(x, y, p);
  if (onPaper(x-1, y-1))
    p[x-1][y-1]++;
  if (onPaper(x-1, y+1))
    p[x-1][y+1]++;
  if (onPaper(x+1, y-1))
    p[x+1][y-1]++;
  if (onPaper(x+1, y+1))
    p[x+1][y+1]++;
}

void bigDrop(int x, int y, int p[][10]) {
  middleDrop(x, y, p);
  if (onPaper(x-2, y))
    p[x-2][y]++;
  if (onPaper(x+2, y))
    p[x+2][y]++;
  if (onPaper(x, y-2))
    p[x][y-2]++;
  if (onPaper(x, y+2))
    p[x][y+2]++;
}

int main(int argc, char *argv[]) {
  int paper[10][10] = {0};
  int x, y, size;

  while (scanf("%d,%d,%d", &x, &y, &size) != -1) {
    paper[x][y]++;
    if (size == 1)
      smallDrop(x, y, paper);
    else if (size == 2)
      middleDrop(x, y, paper);
    else
      bigDrop(x, y, paper);
  }

  int white, black;
  white = black = 0;
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < 10; j++)
      if (paper[i][j] == 0)
        white++;
      else if (black < paper[i][j])
        black = paper[i][j];

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

C++: #include<iostream>
#include<stdlib.h>
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() {
	char x[1], y[1], size[1]; char tem[5];
	int white = 0; int most_intense=0;
	while(cin>>tem) {
		x[0] = tem[0]; y[0] = tem[2]; size[0] = tem[4];
		drop_ink(atoi(x),atoi(y),atoi(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 ;
	return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
int g[33][33];
int dy_1[]={0,0,1,-1};
int dx_1[]={1,-1,0,0};
int dy_2[]={1,1,-1,-1};
int dx_2[]={1,-1,1,-1};
int dy_3[]={2,-2,0,0};
int dx_3[]={0,0,2,-2};
void m(int y,int x,int size);
int main(){
  int x,y,size;
  while(scanf("%d,%d,%d",&x,&y,&size) != EOF){
    m( y , x , size );
  }
  int ret,count;
  count = ret = 0;
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(g[i][j] == 0)count++;
      ret = max( ret , g[i][j] );
    }
  }
  cout << count << endl;
  cout << ret << endl;
}
void m(int y,int x,int size){
  g[y][x]++;
  if(size == 3){
    for(int i=0;i<4;i++){
      g[y + dy_1[i]][x + dx_1[i]]++;
      g[y + dy_2[i]][x + dx_2[i]]++;
      g[y + dy_3[i]][x + dx_3[i]]++;
    }
  }
  if(size == 2){
    for(int i=0;i<4;i++){
      g[y + dy_1[i]][x + dx_1[i]]++;
      g[y + dy_2[i]][x + dx_2[i]]++;
    }
  }if(size == 1){
    for(int i=0;i<4;i++){
      g[y + dy_1[i]][x + dx_1[i]]++;
    }
  }
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;k<7;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==1){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==2){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==3){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			
			if(y-2>=0)paper[y-2][x]++;
			if(y+2<10)paper[y+2][x]++;
			if(x+2<10)paper[y][x+2]++;
			if(x-2>=0)paper[y][x-2]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		for(i=0;i<10;i++){
			for(j=0;j<10;j++){
				printf("%d ",paper[i][j]);
			}
			puts("");
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			printf("%d ",paper[i][j]);
		}
		puts("");
	}
	
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(paper[i][j]==0)c++;
			if(paper[i][j]>=max)max=paper[i][j];
		}
	}
	printf("%d\n%d\n",c,max);
	return 0;
}