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: paper = {}
counter = 0
i = 0
for i in range(10):
	for j in range(10):
		paper.update({(i,j):0})
while i < 50:
	try:
		x, y, s = list(map(int,input().split(",")))
	except:
		break
	if x - 1 < 0 and x - 2 < 0 and x - 3 < 0 and y - 1 < 0 and y - 2 < 0 and y - 3 < 0:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x,y+2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
		paper[(x,y)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
	else:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x-2,y)] += 1
			paper[(x,y+2)] += 1
			paper[(x,y-2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
			paper[(x+1,y-1)] += 1
			paper[(x-1,y+1)] += 1
			paper[(x-1,y-1)] += 1
		paper[(x,y)] += 1
		paper[(x,y-1)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
		paper[(x-1,y)] += 1
	i += 1

for i in range(10):
	for j in range(10):
		if paper[(i,j)] == 0:
			counter += 1
print(counter)
print(max(paper.values()))

Python: pap = [[0 for x in range(10)] for y in range(10)]
ink = [ [],
        [[-1,0],[0,-1],[0,0],[0,1],[1,0]],
        [[-1,-1],[-1,0],[-1,1],[0,-1],[0,0],[0,1],[1,-1],[1,0],[1,1]],
        [[-2,0],[-1,-1],[-1,0],[-1,1],[0,-2],[0,-1],[0,0],[0,1],[0,2],[1,-1],[1,0],[1,1],[2,0]] ]

def brot(x,y,s):
    global pap
    for i in ink[s]:
        px = x + i[0]    
        py = y + i[1]
        if px in range(0,10) and py in range(0,10):
            pap[py][px] += 1

def ans():
    bmax = max(pap[y][x] for y in range(10) for x in range(10))
    wcount = sum(pap[y][x] == 0 for y in range(10) for x in range(10))
    return(wcount,bmax)

if __name__ == "__main__":
    while True:
        try:
            x,y,s = list(map(int, input().split(',')))
            brot(x,y,s)
        except EOFError:
            break

    print("%d\n%d" % ans())

Python: a = [[0 for i2 in range(10)] for i1 in range(10)]

def small_ink(x,y):
    a[x][y] += 1
    a[x-1][y] += 1
    try:
        a[x+1][y] += 1
    except:
        pass
    a[x][y-1] += 1
    try:
        a[x][y+1] += 1
    except:
        pass
    if x-1 < 0:
        a[x-1][y] -= 1
    if y-1 < 0:
        a[x][y-1] -= 1
    return 0

def mid_ink(x,y):
    for i in [-1,0,1]:
        for j in [-1,0,1]:
            if 9 >= x+i >= 0 and 9>= y+j >= 0:
                a[x+i][y+j] += 1
    return 0

def big_ink(x,y):
    mid_ink(x,y)
    a[x-2][y] += 1
    try:
        a[x+2][y] += 1
    except:
        pass
    a[x][y-2] += 1
    try:
        a[x][y+2] += 1
    except:
        pass
    if x-2 < 0:
        a[x-2][y] -= 1
    if y-2 < 0:
        a[x][y-2] -= 1
    return 0

def ink(x,y,s):
    if s == 1:
        small_ink(x,y)
    if s == 2:
        mid_ink(x,y)
    if s == 3:
        big_ink(x,y)
    return 0

while True:
    try:
        x,y,s = map(int,input().split(','))
        ink(x,y,s)
    except EOFError:
        break
nu = 0
for i in range(10):
    for j in range(10):
        if a[i][j] == 0:
            nu += 1
print(nu)
max_val = 0
for i in range(10):
    for j in range(10):
        if a[i][j] > max_val:
            max_val = a[i][j]
print(max_val)

Python: p = [[0 for i in range(14)] for j in range(14)]
c, m = 0, 0
while True:
    try:
        x, y, size = map(int,input().split(','))
    except:
        break
    x += 2
    y += 2
    p[x][y] += 1
    p[x - 1][y] += 1
    p[x + 1][y] += 1
    p[x][y - 1] += 1
    p[x][y + 1] += 1
    if size > 1:
        p[x - 1][y - 1] += 1
        p[x - 1][y + 1] += 1
        p[x + 1][y - 1] += 1
        p[x + 1][y + 1] += 1
        if size > 2:
            p[x - 2][y] += 1
            p[x + 2][y] += 1
            p[x][y - 2] += 1
            p[x][y + 2] += 1
for i in range(2, 12):
    for j in range(2, 12):
        if p[i][j] == 0:
            c += 1
        elif p[i][j] > m:
            m = p[i][j]
print(c)
print(m)

Python: import sys
a=[[0]*10for _ in[0]*10]
p=[[(-1,0),(0,-1),(0,0),(0,1),(1,0)],[(-1,-1),(-1,1),(1,-1),(1,1)],[(-2,0),(0,-2),(0,2),(2,0)]]
for e in sys.stdin:
 x,y,s=map(int,e.split(','))
 for f in p[:s]:
  for s,t in f:
   if 0<=y+s<10 and 0<=x+t<10:a[y+s][x+t]+=1
print(sum(1 for r in a for c in r if c==0))
print(max(max(r)for r in a))

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

def middle_ink(paper,x,y):
  paper = small_ink(paper,x,y)
  if (0 <= x-1 and x-1 < 10) and (0 <= y-1 and y-1 < 10):
    paper[x-1][y-1] += 1
  if (0 <= x-1 and x-1 < 10) and (0 <= y+1 and y+1 < 10):
    paper[x-1][y+1] += 1
  if (0 <= x+1 and x+1 < 10) and (0 <= y-1 and y-1 < 10):
    paper[x+1][y-1] += 1
  if (0 <= x+1 and x+1 < 10) and (0 <= y+1 and y+1 < 10):
    paper[x+1][y+1] += 1
  return paper

def large_ink(paper,x,y):
  paper = middle_ink(paper,x,y)
  if (0 <= x-2 and x-2 < 10):
    paper[x-2][y] += 1
  if (0 <= y-2 and y-2 < 10):
    paper[x][y-2] += 1
  if (0 <= y+2 and y+2 < 10):
    paper[x][y+2] += 1
  if (0 <= x+2 and x+2 < 10):
    paper[x+2][y] += 1
  return paper

paper = [([0 for _ in range(10)]) for _ in range(10)]

while True:
  try:
    x,y,s = map(int, input().split(','))
  except EOFError:
    break
  if s == 1:
    paper = small_ink(paper,x,y)
  elif s == 2:
    paper = middle_ink(paper,x,y)
  elif s == 3:
    paper = large_ink(paper,x,y)

sum0 = 0
max_ink = 0
for i in range(10):
  for j in range(10):
    if paper[i][j] == 0:
      sum0 += 1
    if paper[i][j] > max_ink:
      max_ink = paper[i][j]
print(sum0)
print(max_ink)