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: #!/usr/bin/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:
        if not 0 <= p[0] * 10 + p[1] <= 99: continue
        paper[p[0] * 10 + p[1]] += 1

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

def drop(x,y):
    global paper
    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

Python: def solve():
    from sys import stdin
    input_lines = stdin
    
    paper = [0] * 196
    
    size = [[0, -1, 1, -14, 14], [0, -1, 1, -15, -14, -13, 13, 14, 15],
            [0, -1, 1, -15, -14, -13, 13, 14, 15, -28, -2, 2, 28]]
    
    for line in input_lines:
        x, y, s = map(int, line.split(','))
        
        pos = 30 + x + 14 * y
        s -= 1
        
        for move in size[s]:
            paper[pos+move] += 1
    
    zero_cnt = 0
    max_density = 0
    for i in range(30, 157, 14):
        line = paper[i:i+10]
        zero_cnt += line.count(0)
        max_density = max(max_density, max(line))
    
    print(zero_cnt)
    print(max_density)

solve()

Python: 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 == 3:
        if (0 <= x+2 <= 9) and (0 <= y <= 9):
            area[x+2][y] += 1
        if (0 <= x <= 9) and (0 <= y+2 <= 9):
            area[x][y+2] += 1
        if (0 <= x-2 <= 9) and (0 <= y <= 9):
            area[x-2][y] += 1
        if (0 <= x <= 9) and (0 <= y-2 <= 9):
            area[x][y-2] += 1
    if s >= 2:
        if (0 <= x+1 <= 9) and (0 <= y+1 <= 9):
            area[x+1][y+1] += 1
        if (0 <= x+1 <= 9) and (0 <= y-1 <= 9):
            area[x+1][y-1] += 1
        if (0 <= x-1 <= 9) and (0 <= y+1 <= 9):
            area[x-1][y+1] += 1
        if (0 <= x-1 <= 9) and (0 <= y-1 <= 9):
            area[x-1][y-1] += 1
    if s >= 1:
        if (0 <= x+1 <= 9) and (0 <= y <= 9):
            area[x+1][y] += 1
        if (0 <= x <= 9) and (0 <= y+1 <= 9):
            area[x][y+1] += 1
        if (0 <= x-1 <= 9) and (0 <= y <= 9):
            area[x-1][y] += 1
        if (0 <= x <= 9) and (0 <= y-1 <= 9):
            area[x][y-1] += 1
        area[x][y] += 1
        print(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: Masu = []
def access(x,y):
    if x < 0 or y < 0:
        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: p = [[0 for j in range(10)] for i in range(10)]

s1i = [-1, 0, 0, 1]
s1j = [0, -1, 1, 0]
s2i = [-1, -1, -1, 0, 0, 1, 1, 1]
s2j = [-1, 0, 1, -1, 1, -1, 0, 1]
s3i = [-2, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 2]
s3j = [0, -1, 0, 1, -2, -1, 1, 2, -1, 0, 1, 0]

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

  p[y][x] += 1
  if s == 1:
    for k in range(len(s1i)):
      xx = x + s1j[k]
      yy = y + s1i[k]
      if 0 <= xx and xx < 10 and 0 <= yy and yy < 10:
        p[yy][xx] += 1
  elif s == 2:
    for k in range(len(s2i)):
      xx = x + s2j[k]
      yy = y + s2i[k]
      if 0 <= xx and xx < 10 and 0 <= yy and yy < 10:
        p[yy][xx] += 1
  else:
    for k in range(len(s3i)):
      xx = x + s3j[k]
      yy = y + s3i[k]
      if 0 <= xx and xx < 10 and 0 <= yy and yy < 10:
        p[yy][xx] += 1
    
cnt = 0
m = 0
for i in range(10):
  #print(p[i])
  for j in range(10):
    if p[i][j] == 0:
      cnt += 1
    else:
      pass
    m = max(p[i][j], m)

#print()
print(cnt)
print(m)