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: paper = {}
counter = 0
i = 0
for i in range(10):
	for j in range(10):
		paper.update({(i,j):0})
while i < 50:
	try:
		x, y, s = list(map(int,input().split(",")))
	except:
		break
	if x - 1 < 0 or  x - 2 < 0 or  x - 3 < 0 or y - 1 < 0 or y - 2 < 0 or  y - 3 < 0:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x,y+2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
		paper[(x,y)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
	elif x - 1 < 0 or  x - 2 < 0 or  x - 3 < 0:
		if s == 3:
			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,y)] += 1
		paper[(x,y-1)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
	elif y - 1 < 0 or y - 2 < 0 or  y - 3 < 0:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x-2,y)] += 1
			paper[(x,y+2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
			paper[(x-1,y+1)] += 1
		paper[(x,y)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
		paper[(x-1,y)] += 1
	else:
		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,y-1)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
		paper[(x-1,y)] += 1
	i += 1

for i in range(10):
	for j in range(10):
		if paper[(i,j)] == 0:
			counter += 1
print(counter)
print(max(paper.values()))

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: def dot(h, w):
    global area
    if 0 <= h and h < 10 and 0 <= w and w < 10:
        area[h][w] += 1
def sdot(h,w):
    [dot(h + i, w + j) for j in range(-1, 2) for i in range(-1 + abs(j), 2 - abs(j))]
def mdot(h,w):
    [dot(h + i, w + j) for j in range(-1, 2) for i in range(-1, 2)]
def ldot(h, w):
    [dot(h + i, w + j) for j in range(-2, 3) for i in range(-2 + abs(j), 3 - abs(j))]
dots = (sdot, mdot, ldot)
area = [[0 for _ in range(10)] for _ in range(10)]
while True:
    try:w, h, s = map(int, input().split(","))
    except:break
    dots[s - 1](h, w)
print(sum(i.count(0) for i in area))
print(max(max(i) for i in area))

Python: import numpy as np
p = np.zeros((14,14), dtype=int)
while True:
    try:
        x_inp, y_inp, s = map(int, input().split(","))
        x = x_inp + 2
        y = y_inp + 2
        if s == 1:
            p[y-1][x] += 1
            p[y][x-1:x+2] += 1
            p[y+1][x] += 1
        elif s == 2:
            p[y-1][x-1:x+2] += 1
            p[y][x-1:x+2] += 1
            p[y+1][x-1:x+2] += 1
        else:
            p[y-2][x] += 1
            p[y-1][x-1:x+2] += 1
            p[y][x-2:x+3] += 1
            p[y+1][x-1:x+2] += 1
            p[y+2][x] += 1
    except:
        break
p_trim = p[2:12,2:12]
print(len(np.where(p_trim==0)[0]))
print(np.max(p_trim))

Python: paper = [[0 for i in range(10)] for j in range(10)]
while True :
    try :
        x, y, s = map(int, input().split(","))
        
        paper[x][y] += 1
        if x > 0 :
            paper[x-1][y] += 1
        if y > 0 :
            paper[x][y-1] += 1
        if x < 9 :
            paper[x+1][y] += 1
        if y < 9 :
            paper[x][y+1] += 1

        if s > 1 :
            if x > 0 :
                if y > 0 :
                    paper[x-1][y-1] += 1
                if y < 9 :
                    paper[x-1][y+1] += 1
            if x < 9 :
                if y > 0 :
                    paper[x+1][y-1] += 1
                if y < 9 :
                    paper[x+1][y+1] += 1
        if s > 2 :
            if x > 1 :
                paper[x-2][y] += 1
            if y > 1 :
                paper[x][y-2] += 1
            if x < 8 :
                paper[x+2][y] += 1
            if y < 8 :
                paper[x][y+2] += 1
                
    except EOFError :
        break


S = 0
M = 0
for i in range(10) :
    for j in range(10) :
        if paper[i][j] == 0 :
            S += 1
        if paper[i][j] > M :
            M = paper[i][j]
        
print(S)
print(M)

Python: paper = [0 for i in range(100)]
white_points = None
deep_points = None

def small(x, y):
    p = [[x, y]]
    for i, j in zip([-1, 0, 1, 0], [0, -1, 0, 1]):
        p.append([x + i, y + j])
    return p

def middle(x, y):
    p = small(x, y)
    for i, j in zip([1, -1, 1, -1], [1, 1, -1, -1]):
        p.append([x + i, y + j])
    return p

def big(x, y):
    p = middle(x, y)
    for i, j in zip([-2, 0, 2, 0], [0, -2, 0, 2]):
        p.append([x + i, y + j])
    return p

while True:
    try:
        x, y, size = map(int, input().split(','))
    except:
        print(paper.count(0))
        print(max(paper))
        break

    if size == 1:
        bp = small(x, y)
    elif size == 2:
        bp = middle(x, y)
    elif size == 3:
        bp = big(x, y)
    for p in bp:
        if not 0 <= p[1] * 10 + p[0] <= 99: continue
        paper[p[1] * 10 + p[0]] += 1

Python: ar = [[0]*14 for _ in range(14)]

while(True):
    try:
        x,y,s = map(int,input().split(","))
        if s == 3:
            for x1,y1 in [[-2,0],[0,2],[2,0],[0,-2],[-1,-1],[0,-1],[1,-1],[-1,0],[0,0],[1,0],[-1,1],[0,1],[1,1]]:
                ar[y1+y+2][x1+x+2] += 1
        elif s == 2:
            for x1,y1 in [[-1,-1],[0,-1],[1,-1],[-1,0],[0,0],[1,0],[-1,1],[0,1],[1,1]]:
                ar[y1+y+2][x1+x+2] += 1
        elif s == 1:
            for x1,y1 in [[0,-1],[-1,0],[0,0],[1,0],[0,1]]:
                ar[y1+y+2][x1+x+2] += 1
    except:
        break
br = [ a[2:12] for a in ar[2:12] ]
print(sum([b.count(0) for b in br]))
print(max([max(b) for b in br]))