#python 3.5.2
_n = 9
_regions = """
1 2 2 3 4 5 5 5 6
1 7 8 8 4 9 9 10 6
7 7 11 11 11 11 12 10 13
14 14 15 15 16 17 12 10 13
18 19 20 21 16 17 17 22 23
18 19 20 21 16 24 25 22 23
18 26 26 27 27 24 25 28 28
29 29 30 31 32 32 32 32 28
33 33 30 31 34 34 34 35 35"""
_operations = "+10 +14 +8 +11 +11 +10 +11 +9 +7 +15 +30 +9 +7 +10 +6 +6 +20 +21 +6 +9 +10 +6 +17 +7 +10 +7 +12 +17 +8 +13 +8 +30 +10 +10 +10"
actions = []
# setval
# rempos
# mark
def add_action(actions, op, v, row, col):
actions.append((op, v, row, col))
def create_regions(ops, cell_str, n):
regions = {}
cells = cell_str.split()
for i in range(0,n):
for j in range(0,n):
index = i*n + j
key = int(cells[index])
if key in regions.keys():
cell_list = regions[key]
else:
cell_list = []