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 small(grid, x, y):
    grid[x][y] += 1
    grid[x + 1][y] += 1
    grid[x][y + 1] += 1
    grid[x][y - 1] += 1
    grid[x - 1][y] += 1
    return grid


def middle(grid, x, y):
    grid[x][y] += 1
    grid[x + 1][y] += 1
    grid[x][y + 1] += 1
    grid[x][y - 1] += 1
    grid[x - 1][y] += 1
    grid[x - 1][y - 1] += 1
    grid[x - 1][y + 1] += 1
    grid[x + 1][y + 1] += 1
    grid[x + 1][y - 1] += 1
    return grid


def large(grid, x, y):
    grid[x][y] += 1
    grid[x + 1][y] += 1
    grid[x][y + 1] += 1
    grid[x][y - 1] += 1
    grid[x - 1][y] += 1
    grid[x - 1][y - 1] += 1
    grid[x - 1][y + 1] += 1
    grid[x + 1][y + 1] += 1
    grid[x + 1][y - 1] += 1
    grid[x][y + 2] += 1
    grid[x][y - 2] += 1
    grid[x + 2][y] += 1
    grid[x - 2][y] += 1
    return grid


grid = [[0 for _ in range(14)] for __ in range(14)]
for line in sys.stdin:
    d = list(map(int, line.split(",")))
    x = d[0] + 2
    y = d[1] + 2
    ink_size = d[2]
    if ink_size == 1:
        grid = small(grid, x, y)
    elif ink_size == 2:
        grid = middle(grid, x, y)
    else:
        grid = large(grid, x, y)
max_element = 0
count = 0
for i in range(2, 12):
    for j in range(2, 12):
        max_element = max(max_element, grid[i][j])
        if grid[i][j] == 0:
            count += 1
print(count)
print(max_element)

Python: import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
def solve():
    P = []
    for line in readlines():
        x, y, s = map(int, line.split(","))
        P.append((x, y, s))
    L = 10
    MP = [[0]*L for i in range(L)]
    def update(k, ps):
        for x, y, s in P:
            if k <= s:
                for dx, dy in ps:
                    nx = x + dx; ny = y + dy
                    if not 0 <= nx < L or not 0 <= ny < L:
                        continue
                    MP[ny][nx] += 1
    update(0, [(0, 0)])
    update(1, [(-1, 0), (0, -1), (1, 0), (0, 1)])
    update(2, [(-1, -1), (1, -1), (-1, 1), (1, 1)])
    update(3, [(-2, 0), (0, -2), (2, 0), (0, 2)])
    z = m = 0
    for i in range(L):
        for j in range(L):
            if MP[i][j] == 0:
                z += 1
            m = max(m, MP[i][j])
    write("%d\n%d\n" % (z, m))
solve()

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)
        print(Masu)
               
    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: import sys
paper = [[0 for i in range(10)] for j in range(10)]
for line in sys.stdin:
    if line == "\n":
        break
    x, y, size = map(int, line.split(","))
    if size == 1:
        paper[y][x] += 1
        paper[y-1][x] += 1
        paper[y+1][x] += 1
        paper[y][x-1] += 1
        paper[y][x+1] += 1
    elif size == 2:
        for i in range(y-1, y+2):
            for j in range(x-1, x+2):
                paper[i][j] += 1
    else:
        for i in range(y-1, y+2):
            for j in range(x-1, x+2):
                paper[i][j] += 1
        paper[y-2][x] += 1
        paper[y+2][x] += 1
        paper[y][x-2] += 1
        paper[y][x+2] += 1
    #for i in range(10):
        #for j in range(10):
            #if j == 10 - 1:
                #print(paper[i][j])
            #else:
                #print(paper[i][j], end=" ")
cnt = 0
max_n = 0
for i in range(10):
    for j in range(10):
        if paper[i][j] == 0:
            cnt += 1
        if max_n < paper[i][j]:
            max_n = paper[i][j]
print(cnt)
print(max_n)

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] * 2, [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:
        paper[p[0] * 10 + p[1]] += 1

Python: def drop(x,y):
    if 0 <= x < 10 and 0<= y < 10:
        paper[y][x] += 1
    return

def ink(x,y,s):
    drop(x,y)
    drop(x+1,y); drop(x,y+1)
    drop(x-1,y); drop(x,y-1)
    if s == 1: return
    drop(x+1,y+1); drop(x+1,y-1)
    drop(x-1,y+1); drop(x-1,y-1)
    if s == 2: return
    drop(x+2,y); drop(x,y+2)
    drop(x-2,y); drop(x,y-2)
    return

while True:
    try:
        x, y, s = map(int, raw_input().split(","))
        ink(x,y,s)
    except:
        break