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

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    print(x,y,z)
    drop(x,y,z)

n = 0
m = 0
for f in field:
    for e in f:
        if e > m:
            m = e
        if e==0:
            n+=1

Python: import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    drop(1,1,1)

Python: class Paper:
    def __init__(self, x, y):
        
        self.A = [[0 for i in range(x)] for j in range(y)]
        self.size = (x, y)
    def drop(self, x, y, s):
        if s == 1:
            if y+1 <= self.size[1]-1:
                self.A[y+1][x] += 1            
            for i in range(max(0, x-1) , 1 + min(self.size[0]-1, x+1)):
                self.A[y][i] += 1
            if y-1 >= 0:
                self.A[y-1][x] += 1

        if s == 2:
            if y+1 <= self.size[1]-1:
                for i in range(max(0, x-1) , 1 + min(self.size[0]-1, x+1)):
                    self.A[y+1][i] += 1
            for i in range(max(0, x-1) , 1 + min(self.size[0]-1, x+1)):
                self.A[y][i] += 1
            if y-1 >= 0:
                for i in range(max(0, x-1) , 1 + min(self.size[0]-1, x+1)):
                    self.A[y-1][i] += 1

        if s == 3:
            if y+2 <= self.size[1]-1:
                self.A[y+2][x] += 1
            if y+1 <= self.size[1]-1:
                for i in range(max(0, x-1) , 1 + min(self.size[0]-1, x+1)):
                    self.A[y+1][i] += 1
            for i in range(max(0, x-2) , 1 + min(self.size[0]-1, x+2)):
                self.A[y][i] += 1
            if y-1 >= 0:
                for i in range(max(0, x-1) , 1 + min(self.size[0]-1, x+1)):
                    self.A[y-1][i] += 1
            if y-2 >= 0:
                self.A[y-2][x] += 1

if __name__ == "__main__":
    import sys 
    p = Paper(10, 10)
    L = sys.stdin.readlines()
    for l in L:
        x, y, s = map(int, l.split(','))
        p.drop(x, y, s)
#        for i in range(10):
#            print(p.A[i])
#        print()
    temp = []
    for y in p.A:
        temp.extend(y)

    A1 = temp.count(0)
    A2 = max(temp)

    print(A1)
    print(A2)

Python: from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin
from collections import Counter

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 stdin:
    if not line.strip():
        break
    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: import sys

class Board():
    
    def __init__(self):
        self.B = [0 for _ in range(12 * 12)]
        
        for i in range(0, 12):
            self.B[i] = -1
        for i in range(12, 12 * 12, 12):
            self.B[i] = -1
        for i in range(11, 11 * 12, 12):
            self.B[i] = -1
        for i in range(12 * 11, 12 * 12):
            self.B[i] = -1
    
    def print(self):
        cnt = 0
        for b in self.B:
            if b == 0:
                cnt += 1
        
        print(cnt)
        print(max(self.B))
    
    def inc_if_non_wall(self, x, y):
        idx = (y + 1) * 12 + (x + 1)
        
        if self.B[idx] != -1:
            self.B[idx] += 1
    
    def drop_s(self, x, y):
        self.inc_if_non_wall(x, y)
        self.inc_if_non_wall(x, y - 1)
        self.inc_if_non_wall(x - 1, y)
        self.inc_if_non_wall(x + 1, y)
        self.inc_if_non_wall(x, y + 1)
    
    def drop_m(self, x, y):
        self.drop_s(x, y)
        self.inc_if_non_wall(x - 1, y - 1)
        self.inc_if_non_wall(x + 1, y - 1)
        self.inc_if_non_wall(x - 1, y + 1)
        self.inc_if_non_wall(x + 1, y + 1)
    
    def drop_l(self, x, y):
        self.drop_m(x, y)
        
        idx = (y + 1) * 12 + (x + 1)
        if 12 * 3 < idx:
            self.inc_if_non_wall(x, y - 2)
        if idx < 12 * 9:
            self.inc_if_non_wall(x, y + 2)
        
        self.inc_if_non_wall(x - 2, y)
        self.inc_if_non_wall(x + 2, y)
    

if __name__ == "__main__":
    B = Board()
    for l in sys.stdin:
        x, y, s = map(int, l.split(','))
        if s == 1:
            B.drop_s(x, y)
        elif s == 2:
            B.drop_m(x, y)
        elif s == 3:
            B.drop_l(x, y)
    
    B.print()