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: Masu = []
def access(x,y):
    if x < 0 or y < 0 or x > 9 or y > 9:
        return
    Masu[y][x] += 1

for i in range(10):
    Masu.append([0,0,0,0,0,0,0,0,0,0])
kosu = 0
komax = 0
while True:
    try:
        
        x,y,s = map(int,input().split(","))
        if s == 1:
            for j in range(3):
                access(y +1 - j,x)
            access(y,x - 1)
            access(y,x + 1)

        elif s == 2:
            for k in range(3):
                for l in range(3):
                    access(y + 1 - k,x + 1 -l)
        elif s == 3:
            for k in range(3):
                for l in range(3):
                    access(y + 1 - k,x + 1 -l)
            access(y - 2,x)
            access(y + 2,x)
            access(y,x + 2)
            access(y,x - 2)
               
    except (EOFError,ValueError):
        for i in range(10):
            kosu += Masu[i].count(0)
        for j in range(10):
            if komax < max(Masu[j]):
                komax = max(Masu[j])
        print(kosu)
        print(komax)
        break

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
	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: pap = [[0 for x in range(10)] for y in range(10)]
ink = [ [],
        [[-1,0],[0,-1],[0,0],[0,1],[1,0]],
        [[-1,-1],[-1,0],[-1,1],[0,-1],[0,0],[0,1],[1,-1],[1,0],[1,1]],
        [[-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]] ]

def brot(x,y,s):
    global pap
    for i in ink[s]:
        px = x + i[0]    
        py = y + i[1]
        if px in range(0,10) and py in range(0,10):
            pap[py][px] += 1

def ans():
    bmax = max(pap[y][x] for y in range(10) for x in range(10))
    wcount = sum(pap[y][x] == 0 for y in range(10) for x in range(10))
    return(wcount,bmax)

if __name__ == "__main__":
    while True:
        try:
            x,y,s = list(map(int, input().split(',')))
            brot(x,y,s)
        except EOFError:
            break

    print("%d\n%d" % ans())

Python: a = [[0 for i2 in range(10)] for i1 in range(10)]

def small_ink(x,y):
    a[x][y] += 1
    a[x-1][y] += 1
    try:
        a[x+1][y] += 1
    except:
        pass
    a[x][y-1] += 1
    try:
        a[x][y+1] += 1
    except:
        pass
    if x-1 < 0:
        a[x-1][y] -= 1
    if y-1 < 0:
        a[x][y-1] -= 1
    return 0

def mid_ink(x,y):
    for i in [-1,0,1]:
        for j in [-1,0,1]:
            if 9 >= x+i >= 0 and 9>= y+j >= 0:
                a[x+i][y+j] += 1
    return 0

def big_ink(x,y):
    mid_ink(x,y)
    a[x-2][y] += 1
    try:
        a[x+2][y] += 1
    except:
        pass
    a[x][y-2] += 1
    try:
        a[x][y+2] += 1
    except:
        pass
    if x-2 < 0:
        a[x-2][y] -= 1
    if y-2 < 0:
        a[x][y-2] -= 1
    return 0

def ink(x,y,s):
    if s == 1:
        small_ink(x,y)
    if s == 2:
        mid_ink(x,y)
    if s == 3:
        big_ink(x,y)
    return 0

while True:
    try:
        x,y,s = map(int,input().split(','))
        ink(x,y,s)
    except EOFError:
        break
nu = 0
for i in range(10):
    for j in range(10):
        if a[i][j] == 0:
            nu += 1
print(nu)
max_val = 0
for i in range(10):
    for j in range(10):
        if a[i][j] > max_val:
            max_val = a[i][j]
print(max_val)

Python: p = [[0 for i in range(14)] for j in range(14)]
c, m = 0, 0
while True:
    try:
        x, y, size = map(int,input().split(','))
    except:
        break
    x += 2
    y += 2
    p[x][y] += 1
    p[x - 1][y] += 1
    p[x + 1][y] += 1
    p[x][y - 1] += 1
    p[x][y + 1] += 1
    if size > 1:
        p[x - 1][y - 1] += 1
        p[x - 1][y + 1] += 1
        p[x + 1][y - 1] += 1
        p[x + 1][y + 1] += 1
        if size > 2:
            p[x - 2][y] += 1
            p[x + 2][y] += 1
            p[x][y - 2] += 1
            p[x][y + 2] += 1
for i in range(2, 12):
    for j in range(2, 12):
        if p[i][j] == 0:
            c += 1
        elif p[i][j] > m:
            m = p[i][j]
print(c)
print(m)

Python: import sys
a=[[0]*10for _ in[0]*10]
p=[[(-1,0),(0,-1),(0,0),(0,1),(1,0)],[(-1,-1),(-1,1),(1,-1),(1,1)],[(-2,0),(0,-2),(0,2),(2,0)]]
for e in sys.stdin:
 x,y,s=map(int,e.split(','))
 for f in p[:s]:
  for s,t in f:
   if 0<=y+s<10 and 0<=x+t<10:a[y+s][x+t]+=1
print(sum(1 for r in a for c in r if c==0))
print(max(max(r)for r in a))