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: import sys

def plot(x, y):
    global ban
    if 0 <= x < 10 and 0 <= y < 10: ban[y][x] += 1

def drop(x, y, s):
    for dx, dy in [(0, 0), (-1, 0), (1, 0), (0, -1), (0, 1)]:
        plot(x + dx, y + dy)
    if s == 1: return
    for dx, dy in [(-1, -1), (-1, 1), (1, -1), (1, 1)]:
        plot(x + dx, y + dy)
    if s == 2: return
    for dx, dy in [(-2, 0), (2, 0), (0, -2), (0, 2)]:
        plot(x + dx, y + dy)

ban = [[0 for x in range(10)] for y in range(10)]
for line in sys.stdin:
    x, y, size = map(int, line.split(','))
    drop(x, y, size)

print(sum(ban[y][x] == 0 for y in range(10) for x in range(10)))
print(max(ban[y][x] for y in range(10) for x in range(10)))

Python: d = [[0] * 10 for i in range(10)]

def b(x, y):
    for i in range(x - 2, x + 3):
        a = 3 - abs(x - i)
        for a in range(y - a + 1, y + a):
            if 0 <= i < 10 and 0 <= a < 10:
                d[a][i] += 1


def m(x, y):
    for i in range(x - 1, x + 2):
        for j in range(y - 1, y + 2):
            if 0 <= i < 10 and 0 <= j < 10:
                d[j][i] += 1


def s(x, y):
    r = (1, 0)
    for i in range(x - 1, x + 2):
        a = abs(x - i)
        for j in range(y - r[a], y + r[a] + 1):
            if 0 <= i < 10 and 0 <= j < 10:
                d[j][i] += 1

while 1:
    try:
        f = (None, s, m, b)
        x, y, size = list(map(int, input().split(',')))
        f[size](x, y)

    except:
        break


r1 = r2 = 0
for i in range(10):
    for j in range(10):
        r1 += 1 if d[i][j] == 0 else 0
        r2 = max(r2, d[i][j])

print(r1, r2)

Python: paper = [[0] * 10 for i in range(10)]

while True:
    try:
        x,y,s = map(int,input().split(','))
    except:
        break
    if s == 1:
        for i in range(10):
            for j in range(10):
                if abs(x - i) + abs(y - j) <= 1:
                    paper [i] [j] += 1
    elif s == 2:
        for i in range(10):
            for j in range(10):
                if abs(x - i) <= 1 and abs(y - j) <= 1:
                    paper [i] [j] += 1
    else:
        for i in range(10):
            for j in range(10):
                if abs(x - i) + abs(y - j) <= 2:
                    paper [i] [j] += 1

ls = sum(paper,[])
print(ls.count(0))
print(max(ls))

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 and  x - 2 < 0 and  x - 3 < 0 and y - 1 < 0 and y - 2 < 0 and  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 and  x - 2 < 0 and  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 and y - 2 < 0 and  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

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: board = [[0]*10 for _ in range(10)]
while True:
    try:
        x, y, size = map(int, input().split(','))
    except:
        break
    small = [(-1, 0), (0, -1), (0, 0), (0, 1), (1, 0)]
    med = [(-1, -1), (-1, 0), (-1, 1),
           (0, -1), (0, 0), (0, 1),
           (1, -1), (1, 0), (1, 1)]
    large = [(-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)]
    dyx = [small, med, large][size-1]
    for dy, dx in dyx:
        ny, nx = y + dy, x + dx
        if 0 <= nx < 10 and 0 <= ny < 10:
            board[ny][nx] += 1

print(sum(sum(1 for i in range(10) if row[i] == 0) for row in board))
print(max([max(row) for row in board]))