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;

int SMALL = 1;
int MIDDLE = 2;
int BIG = 3;
int paper[10][10] = {0};

void Dropping_Ink(int x, int y, int size)
{
		if(x-1 > -1)    paper[y][x-1]++;
		if(x+1 < 10)    paper[y][x+1]++;
		if(y-1 > -1)    paper[y-1][x]++;
		if(y+1 < 10)    paper[y+1][x]++;

		if(size >= MIDDLE)
		{
			if(x-1 > -1)
			{
				if(y-1 > -1)    paper[y-1][x-1]++;
				if(y+1 < 10)    paper[y+1][x-1]++;
			}
			if(x+1 < 10)
			{
				if(y-1 > -1)    paper[y-1][x+1]++;
				if(y+1 < 10)    paper[y+1][x+1]++;
			}
		}

		if(size >= BIG)
		{
			if(x-2 > -1)    paper[y-2][x]++;
			if(x+2 < 10)    paper[y+2][x]++;
			if(y-2 > -1)    paper[y][x-2]++;
			if(y+2 < 10)    paper[y][x+2]++;
		}
}

int main()
{
	int x, y, size, white, color;
	char c[2];

	while(cin >> x >> c[0] >> y >> c[1] >> size)
	{
		if(cin.eof())    break;

		Dropping_Ink(x, y, size);

		white = 0;
		color = 0;	
	
		for(int i=0; i<10; i++)
		{
			for(int j=0; j<10; j++)
			{
				if(paper[i][j] == 0)    white++;
				if(paper[i][j] > color)    color = paper[i][j];
			}
		}	
	}

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

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
  vector<vector<int>> A(10, vector<int>(10,0));

  int x, y, s; char c;
  while(cin >> x >> c >> y >> c >> s){
    vector<int> dx, dy;
    if(s == 1){
      dx = {0, 1, 0, -1, 0};
      dy = {0, 0, 1, 0, -1};
    } else if (s == 2){
      dx = {0, 0, 0, 1, 1, 1, -1, -1, -1};
      dy = {0, 1, -1, 0, 1, -1, 0, 1, -1};
    } else {
      dx = {0, 0, 0, 0, 0, 1, 1, 1, -1, -1, -1, 2, -2};
      dy = {0, 1, -1, 2, -2, 0, 1, -1, 0, 1, -1, 0, 0};
    }

    for(int i=0; i<dx.size(); i++){
      int cx = x+dx[i], cy = y+dy[i];
      if(0 <= cx && cx < 10 && 0 <= cy && cy < 10){
        A[cx][cy]++;
      }
    }
  }

  int white = 0, darkest = 0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      darkest = max(darkest, A[i][j]);
      if(A[i][j] == 0) white++;
    }
  }

  cout << white << endl;
  cout << darkest << endl;
}

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

using namespace std;

int peper[15][15];

void paint(int x, int y)
{
	if (0 <= x && 0 <= y && x <= 9 && y <= 9)	peper[y][x]++;
}

int main()
{
	int x, y;
	int size;
	
	while (scanf("%d,%d,%d", &x, &y, &size) != EOF){
		peper[y][x]++;
		paint(x, y - 1);
		paint(x, y + 1);
		paint(x - 1, y);
		paint(x + 1, y);

		if (size > 1){
			paint(x + 1, y - 1);
			paint(x + 1, y + 1);
			paint(x - 1, y + 1);
			paint(x - 1, y - 1);
		}
		if (size > 2){
			paint(x, y - 2);
			paint(x, y + 2);
			paint(x - 2, y);
			paint(x + 2, y);
		}
	}
	int dark = 0;
	int blank = 0;
	
	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (peper[i][j] == 0)	blank++;
			dark = max(dark, peper[i][j]);
		}
	}
	printf("%d\n%d\n", blank, dark);
	return (0);
}

C++: #include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;

int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
int fl;
int fie[11][11];

bool in(int i){
  return 0 <= i && i< 10;
}

int & f(int x, int y){
  if(in(x) && in(y)){
    return fie[x][y];
  } else {
    return fl;
  }
}

void disp(){
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      cout << f(i,j) << " ";
    }
    cout << endl;
  }
}

int main(){
  memset(fie,0,sizeof(fie));
  int x,y,s;
  char a;
  while(cin >> x >> a >> y >> a >> s){
    f(x,y)++;
    for(int i=0; i<4; i++){
      f(x+dx[i],y+dy[i])++;
      if(s >= 2)
	f(x + dx[i] + dx[(i+1)%4], y + dy[i] + dy[(i+1)%4])++;
	if(s >= 3)
	  f(x+dx[i]*2,y+dy[i]*2)++;
    }
  }
  
  int c = 0, m = 0;
  for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
      if(!f(i,j)) c++;
      m = max(m,f(i,j));
    }
  }
  cout << c << endl;
  cout << m << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
int main()
{
	int a = 0;
	int s = 100;
	int xy[10][10] = {};
	while (true) {
		int x, y, n;
		char a, b;
		std::cin >> x;
		if (x == 0) {
			break;
		}
		std::cin >> a >> y >> b >> n;
		switch (n)
		{
		case 1: {
			if (x != 0) {
				++xy[x - 1][y];
			}
			++xy[x + 1][y];
			if (y != 0) {
				++xy[x][y - 1];
			}
			++xy[x][y + 1];
			break;
		}
		case 2: {
			if (x != 0) {
				++xy[x - 1][y];
				++xy[x - 1][y - 1];
				++xy[x - 1][y + 1];
			}
			if (y != 0) {
				++xy[x][y - 1];
				++xy[x + 1][y - 1];
			}
			++xy[x + 1][y];
			++xy[x][y + 1];
			++xy[x + 1][y + 1];
			break;
		}
		case 3: {
			if (x != 0) {
				++xy[x - 1][y];
				++xy[x - 1][y - 1];
				++xy[x - 1][y + 1];
			}
			if (y != 0) {
				++xy[x][y - 1];
				++xy[x + 1][y - 1];
			}
			++xy[x + 1][y];
			++xy[x][y + 1];
			++xy[x + 1][y + 1];
			if (x != 2) { ++xy[x - 2][y]; }
			++xy[x + 2][y];
			if (y != 2) {
				++xy[x][y - 2];
			}
			++xy[x][y + 2];
			break;
		}
		}
	}

	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (xy[i][j] > 0) {
				--s;
			}
		}
	}
	a = xy[0][0];
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (a < xy[i][j]) {
				a = xy[i][j];
			}
		}
	}
	std::cout << s-1 << std::endl;
	std::cout << a << std::endl;
	return 0;
}