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)
}

Python: import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    drop(x,y,z)

Python: import sys
table = [[0 for j in range(10)] for i in range(10)]


def flag(x, y):
    if x > 9 or y > 9 or x < 0 or y < 0:
        return False
    else:
        return True


def small(x, y):
    table[x][y] += 1
    if flag(x+1, y):
        table[x+1][y] += 1
    if flag(x-1, y):
        table[x-1][y] += 1
    if flag(x, y+1):
        table[x][y+1] += 1
    if flag(x, y-1):
        table[x][y-1] += 1


def medium(x, y):
    small(x, y)
    if flag(x+1, y+1):
        table[x+1][y+1] += 1
    if flag(x+1, y-1):
        table[x+1][y-1] += 1
    if flag(x-1, y+1):
        table[x-1][y+1] += 1
    if flag(x-1, y-1):
        table[x-1][y-1] += 1


def large(x, y):
    medium(x, y)
    if flag(x+2, y):
        table[x+2][y] += 1
    if flag(x-2, y):
        table[x-2][y] += 1
    if flag(x, y+2):
        table[x][y+2] += 1
    if flag(x, y-2):
        table[x][y-2] += 1


def ink(x, y, s):
    if s == 1:
        small(x, y)
    if s == 2:
        medium(x, y)
    if s == 3:
        large(x, y)


def Search():
    counter = 0
    thickest = 0
    for i in range(10):
        for j in range(10):
            if table[i][j] == 0:
                counter += 1
            elif thickest < table[i][j]:
                thickest = table[i][j]
    print(counter)
    print(thickest)


for l in sys.stdin:
    data = list(map(int, l.split(",")))
    x, y, s = data
    ink(x, y, s)

Search()

Python: import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    drop(x,y,z)

n = 0
m = 0
for f in field:
    for e in f:
        if e > m:
            m = e
        if e==0:
            n+=1

print(n)
print(m)

Python: # AOJ 0026 Dropping Ink
# Python3 2018.6.15 bal4u

paper = [[0 for i in range(15)] for j in range(15)]
base = 2

while True:
	try:
		x, y, s = list(map(int, input().split(',')))
	except EOFError:
		break
        
	x += 2
	y += 2
	if s == 3:
		paper[x-2][y] += 1
		paper[x+2][y] += 1
		paper[x][y-2] += 1
		paper[x][y+2] += 1

	if s >= 2:
		paper[x-1][y-1] += 1
		paper[x-1][y+1] += 1
		paper[x+1][y-1] += 1
		paper[x+1][y+1] += 1

	paper[x][y] += 1
	paper[x-1][y] += 1
	paper[x+1][y] += 1
	paper[x][y-1] += 1
	paper[x][y+1] += 1

cnt = max = 0;
for x in range(2, 12):
	for y in range(2, 12):
		if paper[x][y] == 0:
			cnt += 1
		if paper[x][y] > max:
			max = paper[x][y]

print(cnt, max, sep='\n')

Python: def small(x, y, a):
    a[x][y] += 1
    a[x + 1][y] += 1
    a[x - 1][y] += 1
    a[x][y + 1] += 1
    a[x][y - 1] += 1


def medium(x, y, a):
    small(x, y, a)
    a[x + 1][y + 1] += 1
    a[x - 1][y + 1] += 1
    a[x - 1][y - 1] += 1
    a[x + 1][y - 1] += 1


def large(x, y, a):
    medium(x, y, a)
    a[x + 2][y] += 1
    a[x - 2][y] += 1
    a[x][y + 2] += 1
    a[x][y - 2] += 1


p = [[0] * 13 for i in range(13)]
while 1:
    try:
        x, y, s = map(int, input().split(','))
        if s == 1:
            small(x, y, p)
        elif s == 2:
            medium(x, y, p)
        elif s == 3:
            large(x, y, p)
    except:
        break

w, dens = 0, 0
for i in range(10):
    for j in range(10):
        if p[i][j] == 0:
            w += 1
        if p[i][j] >= dens:
            dens = p[i][j]

print(w)
print(dens)