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

syou = [[-1,0], [0,-1], [0,0], [0,1], [1,0]]
tyuu = [[-1,-1], [-1,1], [1,-1], [1,1]] + syou
dai = [[-2,0], [0,-2], [0,2], [2,0]] + tyuu



def drop(x,y,s):
	if s == 1: l = syou
	elif s == 2: l = tyuu
	elif s == 3: l = dai

	for dx,dy in l:
		nx = x + dx
		ny = y + dy
		if nx in range(10) and ny in range(10):
			masu[ny][nx] += 1



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

max = cnt = 0
for y in range(10):
	for x in range(10):
		if masu[y][x] == 0: cnt += 1
		if max < masu[y][x]: max = masu[y][x]

print(cnt)
print(max)

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

        # m size
        if s >= 2:
            if x - 1 >= 0 and y - 1 >= 0:
                paper[x - 1][y - 1] += 1
            if x + 1 < 10 and y - 1 >= 0:
                paper[x + 1][y - 1] += 1
            if x - 1 >= 0 and y + 1 < 10:
                paper[x - 1][y + 1] += 1
            if x + 1 < 10 and y + 1 < 10:
                paper[x + 1][y + 1] += 1

        # l size
        if s >= 3:
            if x - 2 >= 0:
                paper[x - 2][y] += 1
            if x + 2 < 10:
                paper[x + 2][y] += 1
            if y - 2 >= 0:
                paper[x][y - 2] += 1
            if y + 2 < 10:
                paper[x][y + 2] += 1
    except EOFError:
        break
flat_paper = sum(paper, [])
print(flat_paper.count(0))
print(max(flat_paper))

Python: import sys


class Paper(object):
    def __init__(self, x=None, y=None):
        if x == None:
            self.x = 10
        else:
            self.x = x
        if y == None:
            self.y = 10
        else:
            self.y = y
        t = [0] * self.x
        self.sheet = [t[:] for _ in range(self.y)]

    def drop_ink(self, ink):
        x, y, s = ink
        if s == 1:
            self.process_ink(x, y)
            self.process_ink(x+1, y)
            self.process_ink(x-1, y)
            self.process_ink(x, y+1)
            self.process_ink(x, y-1)
        elif s == 2:
            self.process_ink(x-1, y-1)
            self.process_ink(x, y-1)
            self.process_ink(x+1, y-1)
            self.process_ink(x-1, y)
            self.process_ink(x, y)
            self.process_ink(x+1, y)
            self.process_ink(x-1, y+1)
            self.process_ink(x, y+1)
            self.process_ink(x+1, y+1)
        elif s == 3:
            self.process_ink(x, y-2)
            self.process_ink(x-1, y-1)
            self.process_ink(x, y-1)
            self.process_ink(x+1, y-1)
            self.process_ink(x-2, y)
            self.process_ink(x-1, y)
            self.process_ink(x, y)
            self.process_ink(x+1, y)
            self.process_ink(x+2, y)
            self.process_ink(x-1, y+1)
            self.process_ink(x, y+1)
            self.process_ink(x+1, y+1)
            self.process_ink(x, y+2)

    def process_ink(self, x, y):
        if 0 <= x < self.x and 0 <= y < self.y:
            self.sheet[y][x] += 1

    def print_sheet(self):
        for row in self.sheet:
            print(row)


if __name__ == '__main__':
    ink_drops = []
    for line in sys.stdin:
        ink_drops.append([int(x) for x in line.strip().split(',')])

#    for line in sys.stdin:
#        try:
#            ink_drops.append([int(x) for x in line.strip().split(',')])
#        except ValueError:
#            break

    p = Paper(10, 10)
    for ink in ink_drops:
        p.drop_ink(ink)
        #p.print_sheet()
        #print('=' * 64)

    white_cell = 0
    max_ink = 0
    for r in p.sheet:
        white_cell += r.count(0)
        max_ink = max(max(r), max_ink)
    print(white_cell)
    print(max_ink)

Python: from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin
from collections import Counter
import sys
NUM = [[0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0],
       [0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],
       [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
paper = Counter()

for line in sys.stdin:
    x, y, size = (int(s) for s in line.split(','))
 
    xidx = [x, x-1, x, x+1, x-2, x-1, x, x+1, x+2, x-1, x, x+1, x]
    yidx = [y-2, y-1, y-1, y-1, y, y, y, y, y, y+1, y+1, y+1, y+2]
    val = NUM[size-1]
 
    for a, b, i in zip(xidx, yidx, xrange(len(xidx))):
        if a < 0 or 9 < a or b < 0 or 9 < b:
            continue
        paper[a + b * 10] += val[i]
 
print(sum(1 for i in xrange(100) if not paper[i]))
print(max(paper[i] for i in xrange(100)))

Python: #sheet...紙全体、sheet[x][y]は(x, y)のインクの濃さ
sheet = [[0 for _ in range(10)] for _ in range(10)]

#小、中、大のインクの範囲
small_range = ((0, 0), (1, 0), (0, 1), (-1, 0), (0, -1))
middle_range = ((0, 0), (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1))
large_range = ((0, 0), (1, 0), (2, 0), (1, 1), (0, 1), (0, 2), (-1, 1), (-1, 0), (-2, 0), (-1, -1), (0, -1), (0, -2), (1, -1))

#範囲内か判定してインクを足す
def drop(x, y, drop_range):
  for dx, dy in drop_range:
    newx, newy = x + dx, y + dy
    if 0 <= newx <= 9 and 0 <= newy <= 9:
      sheet[newx][newy] += 1

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

    if s == 1:
      drop(x, y, small_range)
    elif s == 2:
      drop(x, y, middle_range)
    else:
      drop(x, y, large_range)

  except EOFError:
    break

#0の個数
zero_cnt = 0

#インクの最大値
max_ink = 0

for x in range(10):
  for y in range(10):
    ink = sheet[x][y]

    if ink == 0:
      zero_cnt += 1

    if max_ink < ink:
      max_ink = ink

print(zero_cnt)
print(max_ink)