Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d", count, max)
}

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)))