Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

Python: a = [[0 for i in range(14)] for j in range(14)]
drop = [0 for i in range(3)]
drop[0] = [
	[0,0,0,0,0],
	[0,0,1,0,0],
	[0,1,1,1,0],
	[0,0,1,0,0],
	[0,0,0,0,0]
]
drop[1] = [
	[0,0,0,0,0],
	[0,1,1,1,0],
	[0,1,1,1,0],
	[0,1,1,1,0],
	[0,0,0,0,0]
]
drop[2] = [
	[0,0,1,0,0],
	[0,1,1,1,0],
	[1,1,1,1,1],
	[0,1,1,1,0],
	[0,0,1,0,0]
]

while(1):
	try:
		x,y,n = [int(i) for i in input().split(",")]
		for i in range(5):
			for j in range(5):
				a[x+i][y+j] = a[x+i][y+j] + drop[n-1][i][j]
	except EOFError:
		b = [[0 for i in range(10)] for j in range(10)]
		for i in range(10):
			for j in range(10):
				b[i][j] = a[i+2][j+2]
		zero = [sum([1 if b[i][j] == 0 else 0 for j in range(10)]) for i in range(10)]
		print(sum(zero))
		print(int(max([max(i) for i in b])))
		break

Python: paper = [[0 for _ in range(14)] for _ in range(14)]
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

while True:
    try:
        x, y, s = map(int, input().split())
    except EOFError:
        break
    x += 2
    y += 2
    paper[x][y] += 1
    for i in range(4):
        paper[x + dx[i]][y + dy[i]] += 1
    if s >= 2:
        for i in range(4):
            paper[x + dx[i] + dx[(i + 1) % 4]][y + dy[i] + dy[(i + 1) % 4]] += 1
    if s >= 3:
        for i in range(4):
            paper[x + 2 * dx[i]][y + 2 * dy[i]] += 1

paper = paper[2:12]
for i in range(10):
    paper[i] = paper[i][2:12]
print(sum(paper[i].count(0) for i in range(10)))
print(max(paper[i][j] for i in range(10) for j in range(10)))

Python: paper=[[0 for i in range(10)] for j in range(10)]
while 1:
    try:
        x,y,s=map(int,input().split(","))
        if s==1:
            r=[[-1,0],[1,0],[0,0],[0,-1],[0,1]]
        elif s==2:
            r=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,0],[0,1],[1,-1],[1,0],[1,1]]
        elif s==3:
            r=[[-2,0],[-1,-1],[-1,0],[-1,1],[0,-2],[0,-1],[0,0],[0,1],[0,2],[1,-1],[1,0],[1,1],[2,0]]
        for i in r:
            if y+i[0]<0 or y+i[0]>9 or x+i[1]<0 or x+i[1]>9:pass
            else:
                paper[y+i[0]][x+i[1]]+=1
    except:break
ans=0
dark=0
for i in paper:
    for j in i:
        if j==0:ans+=1
        else:dark=max(dark,j)
print(ans)
print(dark)

Python: def check(x, y):
    return 0 <= x <= 9 and 0 <= y <= 9


def small(x, y, area):
    if check(x+1, y):
        area[x+1][y] += 1
    if check(x, y+1):
        area[x][y+1] += 1
    if check(x-1, y):
        area[x-1][y] += 1
    if check(x, y-1):
        area[x][y-1] += 1
    area[x][y] += 1
    return area


def mediam(x, y, area):
    area = small(x, y, area)
    if check(x+1, y+1):
        area[x+1][y+1] += 1
    if check(x+1, y-1):
        area[x+1][y-1] += 1
    if check(x-1, y+1):
        area[x-1][y+1] += 1
    if check(x-1, y-1):
        area[x-1][y-1] += 1
    return area


def large(x, y, area):
    area = mediam(x, y, area)
    if check(x+2, y):
        area[x+2][y] += 1
    if check(x, y+2):
        area[x][y+2] += 1
    if check(x-2, y):
        area[x-2][y] += 1
    if check(x, y-2):
        area[x][y-2] += 1
    return area

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

while True:
    try:
        x, y, s = map(int, input().split(','))
    except:
        break

    if s == 1:
        area = small(x, y, area)
    if s == 2:
        area = mediam(x, y, area)
    if s == 3:
        area = large(x, y, area)

max = 0
cnt = 0

for i in range(10):
    for j in range(10):
        if area[i][j] == 0:
            cnt += 1
        if area[i][j] > max:
            max = area[i][j]
print(cnt)
print(max)

Python: import sys
n1 = [[0, 1], [1, 0], [-1, 0], [0, -1]]
n2 = n1 + [[a, b] for a in [-1,1] for b in [-1, 1]]
n3 = n2 + [[a*2, b*2] for a, b in n1]
mas = [[0]*10 for i in range(10)]
for i in sys.stdin:
    try:
        x, y, a = list(map(int,i.split(",")))
        mas[y][x] += 1
        for j in eval("n"+str(a)):
            try:
                mas[y+j[1]][x+j[0]] += 1
            except IndexError:
                continue
    except:
        break
print(len([i for x in mas for i in x if not i]))
print(max([max(v) for v in mas]))

Python: from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin
from collections import Counter

NUM = [[0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0],
       [0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],
       [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
paper = Counter()
for line in stdin:
    if not line.strip():
        break
    x, y, size = (int(s) for s in line.split(','))

    xidx = [x, x-1, x, x+1, x-2, x-1, x, x+1, x+2, x-1, x, x+1, x]
    yidx = [y-2, y-1, y-1, y-1, y, y, y, y, y, y+1, y+1, y+1, y+2]
    val = iter(NUM[size-1])

    for a, b in zip(xidx, yidx):
        if a < 0 or 9 < a or b < 0 or 9 < b:
            continue
        paper[a + b * 10] += next(val)

for y in xrange(10):
    for x in xrange(10):
        print('{:02d} '.format(paper[x + y * 10]), end='')
    print()
print(sum(1 for i in xrange(100) if not paper[i]))
print(max(paper[i] for i in xrange(100)))

Python: from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin
from collections import Counter

NUM = [[0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0],
       [0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],
       [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
paper = Counter()
for line in stdin:
    if not line.strip():
        break
    x, y, size = (int(s) for s in line.split(','))

    xidx = [x, x-1, x, x+1, x-2, x-1, x, x+1, x+2, x-1, x, x+1, x]
    yidx = [y-2, y-1, y-1, y-1, y, y, y, y, y, y+1, y+1, y+1, y+2]
    val = iter(NUM[size-1])

    for x, y in zip(xidx, yidx):
        paper[x + y * 10] += next(val)

print(sum(1 for i in xrange(100) if not paper[i]))
print(max(paper[i] for i in xrange(100)))