diff --git a/day-16/01.py b/day-16/01.py new file mode 100644 index 0000000..29c136f --- /dev/null +++ b/day-16/01.py @@ -0,0 +1,37 @@ +from ops import ops +from copy import copy + +with open('input.txt', 'r') as f: + raw = f.readlines() + + samples = [] + i = 0 + while 1: + sample = {} + if raw[i] == '\n': + break + + sample['in'] = [int(x) for x in raw[i][9:-2].split(', ')] + sample['op'] = [int(x) for x in raw[i + 1].strip().split(' ')] + sample['out'] = [int(x) for x in raw[i + 2][9:-2].split(', ')] + samples.append(sample) + i += 4 + +print(samples) + +res = 0 + +for sample in samples: + count = 0 + num, a, b, c = sample['op'] + for op in ops: + try: + if sample['out'] == op(copy(sample['in']), a, b, c): + count += 1 + except: + pass + if count >= 3: + res += 1 + # print(sample) + +print(res) \ No newline at end of file diff --git a/day-16/02.py b/day-16/02.py new file mode 100644 index 0000000..30871bd --- /dev/null +++ b/day-16/02.py @@ -0,0 +1,72 @@ +from ops import ops +from copy import copy +from pprint import pprint + +with open('input.txt', 'r') as f: + raw = f.readlines() + + samples = [] + i = 0 + while 1: + sample = {} + if raw[i] == '\n': + break + + sample['in'] = [int(x) for x in raw[i][9:-2].split(', ')] + sample['op'] = [int(x) for x in raw[i + 1].strip().split(' ')] + sample['out'] = [int(x) for x in raw[i + 2][9:-2].split(', ')] + samples.append(sample) + i += 4 + +# print(samples) + +observations = dict() + +for sample in samples: + count = 0 + num, a, b, c = sample['op'] + valid = set() + for op in ops: + try: + if sample['out'] == op(copy(sample['in']), a, b, c): + count += 1 + valid.add(op) + except: + pass + + if observations.get(num) is None: + observations[num] = valid + else: + observations[num] = observations[num].intersection(valid) + +# pprint(observations) +ops_map = dict() + +while len(observations) != 0: + to_del = list() + for num, funcs in observations.items(): + funcs = funcs - set(ops_map.values()) + if len(funcs) == 1: + ops_map[num] = next(iter(funcs)) + to_del.append(num) + for num in to_del: + del observations[num] + +pprint(ops_map) + +with open('input.txt', 'r') as f: + raw = f.readlines() + instructions = [] + for line in raw[i + 2:]: + instructions.append([int(x) for x in line.strip().split(' ')]) + +pprint(instructions) + +reg = [0, 0, 0, 0] + +for ins in instructions: + num, a, b, c = ins + reg = ops_map[num](reg, a, b, c) + +print(reg) +print(reg[0]) \ No newline at end of file diff --git a/day-16/example.txt b/day-16/example.txt new file mode 100644 index 0000000..b90bc4b --- /dev/null +++ b/day-16/example.txt @@ -0,0 +1,5 @@ +Before: [3, 2, 1, 1] +9 2 1 2 +After: [3, 2, 2, 1] + + diff --git a/day-16/input.txt b/day-16/input.txt new file mode 100644 index 0000000..c47e0eb --- /dev/null +++ b/day-16/input.txt @@ -0,0 +1,4024 @@ +Before: [3, 0, 1, 3] +15 2 1 3 +After: [3, 0, 1, 1] + +Before: [1, 3, 2, 0] +11 2 2 0 +After: [4, 3, 2, 0] + +Before: [0, 3, 3, 1] +14 3 2 0 +After: [3, 3, 3, 1] + +Before: [2, 3, 1, 3] +9 2 1 1 +After: [2, 1, 1, 3] + +Before: [1, 2, 3, 0] +0 2 1 2 +After: [1, 2, 2, 0] + +Before: [3, 2, 1, 3] +8 2 3 2 +After: [3, 2, 3, 3] + +Before: [1, 0, 1, 3] +15 2 1 2 +After: [1, 0, 1, 3] + +Before: [0, 0, 1, 1] +15 3 1 1 +After: [0, 1, 1, 1] + +Before: [1, 3, 2, 3] +9 0 1 0 +After: [1, 3, 2, 3] + +Before: [1, 0, 0, 1] +15 3 1 1 +After: [1, 1, 0, 1] + +Before: [0, 2, 2, 0] +4 0 1 3 +After: [0, 2, 2, 1] + +Before: [0, 0, 3, 1] +5 0 2 0 +After: [0, 0, 3, 1] + +Before: [0, 1, 0, 2] +14 3 1 0 +After: [3, 1, 0, 2] + +Before: [0, 2, 2, 0] +5 0 2 3 +After: [0, 2, 2, 0] + +Before: [1, 1, 2, 3] +10 3 2 0 +After: [2, 1, 2, 3] + +Before: [1, 2, 3, 2] +13 0 1 1 +After: [1, 2, 3, 2] + +Before: [0, 3, 2, 0] +1 1 2 1 +After: [0, 6, 2, 0] + +Before: [1, 2, 2, 3] +1 0 2 1 +After: [1, 2, 2, 3] + +Before: [3, 1, 2, 2] +13 0 3 2 +After: [3, 1, 6, 2] + +Before: [3, 3, 2, 1] +14 3 2 3 +After: [3, 3, 2, 3] + +Before: [0, 3, 1, 0] +5 0 1 0 +After: [0, 3, 1, 0] + +Before: [1, 0, 2, 3] +12 0 1 0 +After: [1, 0, 2, 3] + +Before: [3, 0, 2, 2] +3 2 2 0 +After: [2, 0, 2, 2] + +Before: [0, 1, 1, 3] +6 0 0 1 +After: [0, 0, 1, 3] + +Before: [0, 0, 2, 2] +6 0 0 2 +After: [0, 0, 0, 2] + +Before: [2, 3, 1, 3] +9 2 1 0 +After: [1, 3, 1, 3] + +Before: [3, 0, 1, 1] +15 2 1 1 +After: [3, 1, 1, 1] + +Before: [1, 2, 1, 2] +8 0 3 1 +After: [1, 3, 1, 2] + +Before: [3, 2, 3, 2] +13 0 3 2 +After: [3, 2, 6, 2] + +Before: [0, 0, 0, 2] +6 0 0 1 +After: [0, 0, 0, 2] + +Before: [1, 2, 3, 3] +1 1 2 3 +After: [1, 2, 3, 4] + +Before: [3, 1, 2, 2] +10 0 2 3 +After: [3, 1, 2, 2] + +Before: [0, 2, 3, 3] +5 0 2 3 +After: [0, 2, 3, 0] + +Before: [1, 0, 3, 0] +10 2 2 2 +After: [1, 0, 2, 0] + +Before: [1, 0, 3, 3] +12 0 1 1 +After: [1, 1, 3, 3] + +Before: [0, 1, 3, 2] +6 0 0 1 +After: [0, 0, 3, 2] + +Before: [2, 1, 2, 2] +2 2 3 0 +After: [3, 1, 2, 2] + +Before: [1, 2, 1, 0] +4 1 1 0 +After: [3, 2, 1, 0] + +Before: [3, 1, 0, 3] +7 2 1 0 +After: [1, 1, 0, 3] + +Before: [0, 2, 0, 2] +6 0 0 3 +After: [0, 2, 0, 0] + +Before: [0, 0, 1, 3] +5 0 3 1 +After: [0, 0, 1, 3] + +Before: [1, 3, 2, 0] +10 1 2 2 +After: [1, 3, 2, 0] + +Before: [1, 0, 3, 3] +3 3 1 2 +After: [1, 0, 3, 3] + +Before: [0, 1, 1, 3] +6 0 0 2 +After: [0, 1, 0, 3] + +Before: [2, 0, 3, 1] +0 2 0 2 +After: [2, 0, 2, 1] + +Before: [1, 1, 0, 2] +7 2 1 0 +After: [1, 1, 0, 2] + +Before: [2, 1, 3, 3] +0 2 0 1 +After: [2, 2, 3, 3] + +Before: [0, 2, 2, 1] +6 0 0 0 +After: [0, 2, 2, 1] + +Before: [1, 0, 1, 0] +15 2 1 1 +After: [1, 1, 1, 0] + +Before: [2, 3, 0, 0] +4 2 3 0 +After: [3, 3, 0, 0] + +Before: [3, 1, 1, 2] +13 0 3 3 +After: [3, 1, 1, 6] + +Before: [2, 3, 2, 1] +11 0 2 1 +After: [2, 4, 2, 1] + +Before: [0, 0, 2, 1] +4 0 3 1 +After: [0, 3, 2, 1] + +Before: [2, 3, 1, 2] +13 1 3 3 +After: [2, 3, 1, 6] + +Before: [1, 3, 3, 2] +9 0 1 1 +After: [1, 1, 3, 2] + +Before: [2, 0, 3, 2] +13 2 3 0 +After: [6, 0, 3, 2] + +Before: [0, 0, 2, 0] +3 2 2 2 +After: [0, 0, 2, 0] + +Before: [2, 2, 3, 3] +0 2 1 3 +After: [2, 2, 3, 2] + +Before: [1, 0, 3, 2] +8 0 3 0 +After: [3, 0, 3, 2] + +Before: [0, 2, 3, 2] +6 0 0 1 +After: [0, 0, 3, 2] + +Before: [0, 0, 2, 0] +6 0 0 0 +After: [0, 0, 2, 0] + +Before: [0, 2, 3, 1] +0 2 1 3 +After: [0, 2, 3, 2] + +Before: [1, 2, 1, 2] +4 1 1 0 +After: [3, 2, 1, 2] + +Before: [2, 1, 1, 2] +2 0 3 0 +After: [3, 1, 1, 2] + +Before: [0, 2, 1, 3] +6 0 0 2 +After: [0, 2, 0, 3] + +Before: [1, 0, 0, 1] +15 3 1 2 +After: [1, 0, 1, 1] + +Before: [2, 3, 3, 0] +10 2 2 1 +After: [2, 2, 3, 0] + +Before: [0, 1, 3, 1] +10 2 2 3 +After: [0, 1, 3, 2] + +Before: [0, 0, 0, 2] +6 0 0 2 +After: [0, 0, 0, 2] + +Before: [1, 2, 2, 1] +8 0 2 2 +After: [1, 2, 3, 1] + +Before: [2, 3, 3, 3] +0 2 0 0 +After: [2, 3, 3, 3] + +Before: [0, 3, 1, 2] +9 2 1 2 +After: [0, 3, 1, 2] + +Before: [0, 1, 2, 3] +5 0 2 1 +After: [0, 0, 2, 3] + +Before: [0, 3, 0, 3] +6 0 0 0 +After: [0, 3, 0, 3] + +Before: [0, 2, 2, 1] +13 3 1 2 +After: [0, 2, 2, 1] + +Before: [1, 3, 1, 3] +3 3 1 0 +After: [3, 3, 1, 3] + +Before: [3, 3, 2, 3] +10 1 2 2 +After: [3, 3, 2, 3] + +Before: [2, 2, 0, 3] +4 1 1 0 +After: [3, 2, 0, 3] + +Before: [1, 1, 2, 3] +10 3 2 2 +After: [1, 1, 2, 3] + +Before: [0, 2, 2, 1] +11 2 2 3 +After: [0, 2, 2, 4] + +Before: [0, 1, 0, 2] +4 0 2 1 +After: [0, 2, 0, 2] + +Before: [3, 1, 3, 0] +10 2 2 1 +After: [3, 2, 3, 0] + +Before: [3, 3, 1, 1] +9 2 1 3 +After: [3, 3, 1, 1] + +Before: [1, 3, 0, 3] +3 3 3 3 +After: [1, 3, 0, 3] + +Before: [3, 0, 2, 1] +8 1 2 2 +After: [3, 0, 2, 1] + +Before: [1, 0, 1, 3] +3 3 1 2 +After: [1, 0, 3, 3] + +Before: [3, 2, 3, 2] +1 1 2 1 +After: [3, 4, 3, 2] + +Before: [1, 0, 0, 1] +12 0 1 3 +After: [1, 0, 0, 1] + +Before: [3, 0, 2, 3] +1 3 3 2 +After: [3, 0, 9, 3] + +Before: [3, 2, 3, 2] +13 2 3 3 +After: [3, 2, 3, 6] + +Before: [0, 0, 3, 3] +1 3 3 1 +After: [0, 9, 3, 3] + +Before: [0, 2, 1, 3] +1 1 3 3 +After: [0, 2, 1, 6] + +Before: [3, 1, 2, 3] +10 3 2 3 +After: [3, 1, 2, 2] + +Before: [1, 3, 2, 0] +9 0 1 1 +After: [1, 1, 2, 0] + +Before: [1, 0, 3, 1] +12 0 1 3 +After: [1, 0, 3, 1] + +Before: [0, 2, 2, 3] +11 1 2 1 +After: [0, 4, 2, 3] + +Before: [2, 0, 3, 0] +10 2 2 1 +After: [2, 2, 3, 0] + +Before: [2, 1, 1, 2] +8 1 3 3 +After: [2, 1, 1, 3] + +Before: [0, 0, 0, 0] +6 0 0 3 +After: [0, 0, 0, 0] + +Before: [0, 0, 1, 0] +6 0 0 3 +After: [0, 0, 1, 0] + +Before: [0, 1, 1, 0] +4 2 2 0 +After: [3, 1, 1, 0] + +Before: [1, 0, 2, 1] +12 0 1 0 +After: [1, 0, 2, 1] + +Before: [2, 3, 1, 3] +3 3 1 1 +After: [2, 3, 1, 3] + +Before: [1, 0, 0, 3] +3 3 1 0 +After: [3, 0, 0, 3] + +Before: [0, 3, 3, 3] +4 0 1 0 +After: [1, 3, 3, 3] + +Before: [1, 3, 2, 0] +3 2 2 3 +After: [1, 3, 2, 2] + +Before: [3, 1, 0, 2] +14 3 1 0 +After: [3, 1, 0, 2] + +Before: [0, 2, 3, 3] +0 2 1 1 +After: [0, 2, 3, 3] + +Before: [3, 2, 3, 2] +10 2 2 3 +After: [3, 2, 3, 2] + +Before: [1, 1, 2, 1] +8 2 1 3 +After: [1, 1, 2, 3] + +Before: [0, 3, 2, 3] +10 3 2 2 +After: [0, 3, 2, 3] + +Before: [0, 3, 1, 0] +6 0 0 2 +After: [0, 3, 0, 0] + +Before: [3, 0, 1, 1] +15 3 1 0 +After: [1, 0, 1, 1] + +Before: [1, 2, 3, 3] +0 2 1 1 +After: [1, 2, 3, 3] + +Before: [0, 0, 3, 1] +10 2 2 0 +After: [2, 0, 3, 1] + +Before: [0, 1, 3, 1] +6 0 0 1 +After: [0, 0, 3, 1] + +Before: [0, 2, 0, 1] +6 0 0 1 +After: [0, 0, 0, 1] + +Before: [1, 0, 2, 1] +15 3 1 2 +After: [1, 0, 1, 1] + +Before: [1, 2, 0, 3] +13 0 1 2 +After: [1, 2, 2, 3] + +Before: [1, 0, 2, 0] +12 0 1 2 +After: [1, 0, 1, 0] + +Before: [3, 3, 0, 2] +13 0 3 0 +After: [6, 3, 0, 2] + +Before: [1, 2, 2, 1] +11 1 2 1 +After: [1, 4, 2, 1] + +Before: [0, 3, 3, 0] +5 0 1 1 +After: [0, 0, 3, 0] + +Before: [1, 1, 2, 2] +14 3 1 0 +After: [3, 1, 2, 2] + +Before: [0, 2, 2, 2] +11 1 2 3 +After: [0, 2, 2, 4] + +Before: [2, 1, 3, 3] +1 3 3 1 +After: [2, 9, 3, 3] + +Before: [0, 2, 3, 0] +2 1 3 3 +After: [0, 2, 3, 3] + +Before: [1, 2, 0, 2] +4 1 1 1 +After: [1, 3, 0, 2] + +Before: [1, 0, 0, 1] +12 0 1 0 +After: [1, 0, 0, 1] + +Before: [1, 1, 0, 0] +7 3 1 2 +After: [1, 1, 1, 0] + +Before: [2, 1, 0, 0] +7 3 1 1 +After: [2, 1, 0, 0] + +Before: [2, 3, 0, 3] +3 3 1 0 +After: [3, 3, 0, 3] + +Before: [2, 0, 2, 1] +14 3 2 3 +After: [2, 0, 2, 3] + +Before: [2, 3, 2, 3] +11 0 2 2 +After: [2, 3, 4, 3] + +Before: [2, 0, 2, 1] +11 0 2 3 +After: [2, 0, 2, 4] + +Before: [3, 3, 3, 2] +13 2 3 0 +After: [6, 3, 3, 2] + +Before: [2, 2, 2, 1] +3 2 2 2 +After: [2, 2, 2, 1] + +Before: [0, 1, 2, 3] +10 3 2 3 +After: [0, 1, 2, 2] + +Before: [0, 3, 2, 3] +5 0 2 1 +After: [0, 0, 2, 3] + +Before: [1, 0, 0, 2] +12 0 1 3 +After: [1, 0, 0, 1] + +Before: [2, 1, 0, 1] +7 2 1 2 +After: [2, 1, 1, 1] + +Before: [2, 0, 2, 1] +15 3 1 3 +After: [2, 0, 2, 1] + +Before: [3, 2, 2, 1] +11 1 2 1 +After: [3, 4, 2, 1] + +Before: [0, 1, 1, 2] +14 3 1 0 +After: [3, 1, 1, 2] + +Before: [2, 2, 1, 2] +2 1 3 1 +After: [2, 3, 1, 2] + +Before: [1, 1, 2, 0] +1 0 3 1 +After: [1, 3, 2, 0] + +Before: [0, 0, 2, 2] +8 1 2 3 +After: [0, 0, 2, 2] + +Before: [1, 0, 3, 0] +12 0 1 3 +After: [1, 0, 3, 1] + +Before: [3, 0, 1, 2] +15 2 1 1 +After: [3, 1, 1, 2] + +Before: [0, 3, 1, 3] +6 0 0 1 +After: [0, 0, 1, 3] + +Before: [0, 1, 2, 0] +5 0 2 1 +After: [0, 0, 2, 0] + +Before: [0, 0, 3, 0] +6 0 0 2 +After: [0, 0, 0, 0] + +Before: [1, 1, 2, 0] +7 3 1 2 +After: [1, 1, 1, 0] + +Before: [0, 2, 2, 2] +11 2 2 0 +After: [4, 2, 2, 2] + +Before: [0, 2, 1, 3] +3 3 0 0 +After: [3, 2, 1, 3] + +Before: [1, 2, 3, 1] +0 2 1 3 +After: [1, 2, 3, 2] + +Before: [2, 1, 0, 2] +7 2 1 3 +After: [2, 1, 0, 1] + +Before: [3, 0, 1, 2] +13 0 3 0 +After: [6, 0, 1, 2] + +Before: [2, 2, 3, 2] +0 2 0 3 +After: [2, 2, 3, 2] + +Before: [0, 2, 1, 3] +5 0 3 1 +After: [0, 0, 1, 3] + +Before: [2, 1, 2, 0] +8 3 2 0 +After: [2, 1, 2, 0] + +Before: [2, 2, 0, 1] +9 3 1 2 +After: [2, 2, 1, 1] + +Before: [1, 1, 1, 0] +1 2 3 1 +After: [1, 3, 1, 0] + +Before: [2, 0, 2, 0] +5 1 0 3 +After: [2, 0, 2, 0] + +Before: [0, 2, 1, 2] +6 0 0 1 +After: [0, 0, 1, 2] + +Before: [0, 1, 1, 2] +6 0 0 3 +After: [0, 1, 1, 0] + +Before: [3, 0, 3, 3] +10 2 2 0 +After: [2, 0, 3, 3] + +Before: [0, 3, 2, 2] +1 1 2 2 +After: [0, 3, 6, 2] + +Before: [3, 3, 2, 0] +10 1 2 3 +After: [3, 3, 2, 2] + +Before: [2, 3, 1, 3] +8 2 3 2 +After: [2, 3, 3, 3] + +Before: [1, 0, 0, 1] +12 0 1 1 +After: [1, 1, 0, 1] + +Before: [1, 0, 0, 2] +12 0 1 0 +After: [1, 0, 0, 2] + +Before: [1, 3, 1, 2] +13 1 3 0 +After: [6, 3, 1, 2] + +Before: [3, 1, 0, 2] +7 2 1 2 +After: [3, 1, 1, 2] + +Before: [3, 0, 1, 1] +5 1 0 2 +After: [3, 0, 0, 1] + +Before: [3, 1, 2, 0] +11 2 2 2 +After: [3, 1, 4, 0] + +Before: [3, 3, 3, 2] +0 2 3 2 +After: [3, 3, 2, 2] + +Before: [1, 3, 3, 3] +10 2 2 1 +After: [1, 2, 3, 3] + +Before: [0, 0, 1, 0] +15 2 1 1 +After: [0, 1, 1, 0] + +Before: [3, 2, 1, 1] +9 3 1 3 +After: [3, 2, 1, 1] + +Before: [0, 3, 1, 0] +9 2 1 2 +After: [0, 3, 1, 0] + +Before: [0, 1, 3, 3] +10 2 2 3 +After: [0, 1, 3, 2] + +Before: [1, 2, 1, 0] +2 1 3 3 +After: [1, 2, 1, 3] + +Before: [0, 1, 3, 2] +14 3 1 0 +After: [3, 1, 3, 2] + +Before: [3, 1, 2, 0] +1 1 2 1 +After: [3, 2, 2, 0] + +Before: [1, 0, 0, 0] +12 0 1 3 +After: [1, 0, 0, 1] + +Before: [0, 1, 2, 1] +1 1 3 1 +After: [0, 3, 2, 1] + +Before: [3, 2, 2, 1] +11 2 2 3 +After: [3, 2, 2, 4] + +Before: [3, 0, 2, 0] +8 1 2 1 +After: [3, 2, 2, 0] + +Before: [1, 0, 1, 3] +15 2 1 0 +After: [1, 0, 1, 3] + +Before: [0, 2, 2, 2] +8 0 2 2 +After: [0, 2, 2, 2] + +Before: [3, 0, 2, 1] +11 2 2 2 +After: [3, 0, 4, 1] + +Before: [3, 2, 3, 1] +14 3 2 2 +After: [3, 2, 3, 1] + +Before: [0, 2, 1, 1] +6 0 0 1 +After: [0, 0, 1, 1] + +Before: [3, 2, 0, 1] +9 3 1 2 +After: [3, 2, 1, 1] + +Before: [2, 0, 3, 1] +15 3 1 3 +After: [2, 0, 3, 1] + +Before: [0, 1, 0, 3] +6 0 0 3 +After: [0, 1, 0, 0] + +Before: [1, 0, 2, 3] +1 0 2 1 +After: [1, 2, 2, 3] + +Before: [1, 3, 3, 2] +0 2 3 2 +After: [1, 3, 2, 2] + +Before: [0, 0, 1, 3] +6 0 0 3 +After: [0, 0, 1, 0] + +Before: [3, 3, 2, 0] +11 2 2 0 +After: [4, 3, 2, 0] + +Before: [0, 0, 0, 3] +4 0 2 2 +After: [0, 0, 2, 3] + +Before: [0, 3, 2, 2] +11 2 2 0 +After: [4, 3, 2, 2] + +Before: [2, 3, 1, 3] +1 3 3 0 +After: [9, 3, 1, 3] + +Before: [2, 0, 3, 3] +0 2 0 2 +After: [2, 0, 2, 3] + +Before: [2, 3, 0, 2] +4 2 3 2 +After: [2, 3, 3, 2] + +Before: [0, 2, 3, 3] +5 0 1 2 +After: [0, 2, 0, 3] + +Before: [1, 0, 3, 1] +10 2 2 2 +After: [1, 0, 2, 1] + +Before: [2, 0, 0, 3] +1 0 3 3 +After: [2, 0, 0, 6] + +Before: [1, 3, 3, 0] +9 0 1 1 +After: [1, 1, 3, 0] + +Before: [0, 3, 1, 2] +6 0 0 3 +After: [0, 3, 1, 0] + +Before: [0, 0, 2, 0] +11 2 2 2 +After: [0, 0, 4, 0] + +Before: [2, 1, 3, 2] +13 2 3 0 +After: [6, 1, 3, 2] + +Before: [1, 0, 3, 2] +12 0 1 2 +After: [1, 0, 1, 2] + +Before: [3, 1, 3, 2] +13 2 3 3 +After: [3, 1, 3, 6] + +Before: [0, 3, 2, 0] +4 0 1 3 +After: [0, 3, 2, 1] + +Before: [3, 3, 2, 2] +10 0 2 2 +After: [3, 3, 2, 2] + +Before: [0, 2, 2, 0] +8 0 2 1 +After: [0, 2, 2, 0] + +Before: [0, 0, 0, 3] +5 0 3 2 +After: [0, 0, 0, 3] + +Before: [2, 2, 3, 1] +0 2 0 2 +After: [2, 2, 2, 1] + +Before: [1, 0, 2, 1] +14 3 2 3 +After: [1, 0, 2, 3] + +Before: [1, 0, 2, 2] +12 0 1 0 +After: [1, 0, 2, 2] + +Before: [3, 0, 3, 0] +10 2 2 3 +After: [3, 0, 3, 2] + +Before: [0, 1, 0, 1] +7 2 1 0 +After: [1, 1, 0, 1] + +Before: [0, 1, 0, 0] +7 2 1 3 +After: [0, 1, 0, 1] + +Before: [1, 1, 0, 3] +1 3 3 1 +After: [1, 9, 0, 3] + +Before: [3, 0, 1, 0] +15 2 1 1 +After: [3, 1, 1, 0] + +Before: [0, 3, 0, 3] +5 0 3 0 +After: [0, 3, 0, 3] + +Before: [3, 1, 0, 1] +7 2 1 3 +After: [3, 1, 0, 1] + +Before: [0, 3, 3, 1] +5 0 3 2 +After: [0, 3, 0, 1] + +Before: [1, 1, 2, 1] +14 3 2 3 +After: [1, 1, 2, 3] + +Before: [1, 2, 2, 0] +11 1 2 1 +After: [1, 4, 2, 0] + +Before: [2, 2, 1, 3] +1 1 3 2 +After: [2, 2, 6, 3] + +Before: [0, 2, 1, 0] +6 0 0 0 +After: [0, 2, 1, 0] + +Before: [0, 0, 3, 3] +6 0 0 3 +After: [0, 0, 3, 0] + +Before: [0, 0, 3, 1] +14 3 2 0 +After: [3, 0, 3, 1] + +Before: [0, 0, 2, 1] +6 0 0 2 +After: [0, 0, 0, 1] + +Before: [1, 0, 2, 1] +14 3 2 2 +After: [1, 0, 3, 1] + +Before: [0, 2, 2, 1] +11 2 2 0 +After: [4, 2, 2, 1] + +Before: [3, 0, 3, 3] +10 2 2 1 +After: [3, 2, 3, 3] + +Before: [2, 0, 1, 0] +2 0 3 0 +After: [3, 0, 1, 0] + +Before: [3, 3, 2, 3] +3 3 1 0 +After: [3, 3, 2, 3] + +Before: [1, 3, 2, 1] +14 3 2 2 +After: [1, 3, 3, 1] + +Before: [3, 0, 3, 2] +0 2 3 1 +After: [3, 2, 3, 2] + +Before: [0, 0, 0, 1] +15 3 1 2 +After: [0, 0, 1, 1] + +Before: [1, 1, 3, 1] +14 3 2 0 +After: [3, 1, 3, 1] + +Before: [0, 2, 3, 2] +5 0 1 1 +After: [0, 0, 3, 2] + +Before: [3, 1, 3, 3] +1 2 3 3 +After: [3, 1, 3, 9] + +Before: [2, 0, 1, 1] +1 2 3 2 +After: [2, 0, 3, 1] + +Before: [1, 0, 2, 3] +10 3 2 2 +After: [1, 0, 2, 3] + +Before: [0, 2, 1, 2] +4 0 3 2 +After: [0, 2, 3, 2] + +Before: [0, 3, 2, 0] +3 2 0 0 +After: [2, 3, 2, 0] + +Before: [3, 2, 2, 2] +11 1 2 3 +After: [3, 2, 2, 4] + +Before: [1, 0, 1, 2] +15 2 1 3 +After: [1, 0, 1, 1] + +Before: [2, 1, 1, 2] +14 3 1 0 +After: [3, 1, 1, 2] + +Before: [1, 3, 2, 3] +11 2 2 3 +After: [1, 3, 2, 4] + +Before: [0, 2, 2, 1] +3 2 2 3 +After: [0, 2, 2, 2] + +Before: [1, 0, 2, 3] +12 0 1 1 +After: [1, 1, 2, 3] + +Before: [1, 3, 0, 3] +8 2 3 1 +After: [1, 3, 0, 3] + +Before: [0, 2, 2, 3] +10 3 2 2 +After: [0, 2, 2, 3] + +Before: [0, 1, 3, 2] +5 0 3 1 +After: [0, 0, 3, 2] + +Before: [3, 1, 1, 2] +8 1 3 1 +After: [3, 3, 1, 2] + +Before: [2, 3, 1, 3] +1 0 3 2 +After: [2, 3, 6, 3] + +Before: [2, 0, 3, 1] +14 3 2 0 +After: [3, 0, 3, 1] + +Before: [1, 2, 2, 1] +13 0 1 0 +After: [2, 2, 2, 1] + +Before: [1, 2, 3, 3] +10 2 2 2 +After: [1, 2, 2, 3] + +Before: [3, 1, 0, 0] +7 2 1 3 +After: [3, 1, 0, 1] + +Before: [2, 3, 2, 2] +13 1 3 0 +After: [6, 3, 2, 2] + +Before: [0, 1, 3, 3] +10 2 2 2 +After: [0, 1, 2, 3] + +Before: [2, 1, 2, 2] +14 3 1 0 +After: [3, 1, 2, 2] + +Before: [2, 3, 3, 2] +0 2 3 3 +After: [2, 3, 3, 2] + +Before: [2, 3, 0, 1] +4 2 3 1 +After: [2, 3, 0, 1] + +Before: [0, 1, 2, 0] +4 0 3 1 +After: [0, 3, 2, 0] + +Before: [0, 1, 2, 0] +6 0 0 2 +After: [0, 1, 0, 0] + +Before: [2, 1, 0, 2] +2 0 3 3 +After: [2, 1, 0, 3] + +Before: [0, 3, 3, 0] +4 0 2 1 +After: [0, 2, 3, 0] + +Before: [0, 1, 3, 3] +3 3 0 0 +After: [3, 1, 3, 3] + +Before: [3, 1, 1, 0] +7 3 1 0 +After: [1, 1, 1, 0] + +Before: [1, 3, 1, 1] +9 0 1 1 +After: [1, 1, 1, 1] + +Before: [0, 2, 0, 1] +9 3 1 2 +After: [0, 2, 1, 1] + +Before: [0, 0, 2, 3] +11 2 2 3 +After: [0, 0, 2, 4] + +Before: [1, 2, 2, 1] +1 0 2 1 +After: [1, 2, 2, 1] + +Before: [0, 2, 2, 2] +11 3 2 2 +After: [0, 2, 4, 2] + +Before: [0, 1, 1, 0] +7 3 1 3 +After: [0, 1, 1, 1] + +Before: [2, 3, 2, 0] +11 2 2 3 +After: [2, 3, 2, 4] + +Before: [2, 0, 2, 0] +2 0 3 1 +After: [2, 3, 2, 0] + +Before: [0, 3, 3, 3] +6 0 0 0 +After: [0, 3, 3, 3] + +Before: [1, 1, 3, 1] +8 1 2 1 +After: [1, 3, 3, 1] + +Before: [2, 3, 0, 3] +8 2 3 1 +After: [2, 3, 0, 3] + +Before: [2, 2, 3, 2] +0 2 3 2 +After: [2, 2, 2, 2] + +Before: [1, 2, 1, 1] +13 0 1 1 +After: [1, 2, 1, 1] + +Before: [2, 3, 2, 2] +2 2 3 1 +After: [2, 3, 2, 2] + +Before: [0, 1, 2, 0] +3 2 0 2 +After: [0, 1, 2, 0] + +Before: [1, 3, 0, 3] +9 0 1 0 +After: [1, 3, 0, 3] + +Before: [1, 1, 0, 3] +7 2 1 1 +After: [1, 1, 0, 3] + +Before: [1, 0, 2, 1] +12 0 1 1 +After: [1, 1, 2, 1] + +Before: [0, 0, 2, 0] +8 0 2 1 +After: [0, 2, 2, 0] + +Before: [0, 2, 1, 0] +5 0 1 3 +After: [0, 2, 1, 0] + +Before: [1, 2, 3, 0] +8 0 2 0 +After: [3, 2, 3, 0] + +Before: [1, 0, 2, 2] +12 0 1 2 +After: [1, 0, 1, 2] + +Before: [2, 3, 2, 0] +2 2 3 1 +After: [2, 3, 2, 0] + +Before: [1, 3, 3, 2] +13 1 3 1 +After: [1, 6, 3, 2] + +Before: [2, 0, 2, 1] +15 3 1 1 +After: [2, 1, 2, 1] + +Before: [0, 3, 1, 3] +9 2 1 2 +After: [0, 3, 1, 3] + +Before: [3, 3, 1, 0] +4 3 2 1 +After: [3, 2, 1, 0] + +Before: [2, 1, 0, 2] +7 2 1 2 +After: [2, 1, 1, 2] + +Before: [0, 2, 2, 3] +4 0 1 2 +After: [0, 2, 1, 3] + +Before: [2, 0, 2, 1] +5 1 0 0 +After: [0, 0, 2, 1] + +Before: [2, 0, 3, 0] +0 2 0 1 +After: [2, 2, 3, 0] + +Before: [1, 3, 2, 3] +9 0 1 2 +After: [1, 3, 1, 3] + +Before: [3, 1, 1, 3] +3 3 1 2 +After: [3, 1, 3, 3] + +Before: [0, 1, 0, 2] +14 3 1 2 +After: [0, 1, 3, 2] + +Before: [3, 0, 1, 2] +15 2 1 0 +After: [1, 0, 1, 2] + +Before: [2, 2, 2, 3] +10 3 2 0 +After: [2, 2, 2, 3] + +Before: [1, 2, 0, 1] +13 3 1 0 +After: [2, 2, 0, 1] + +Before: [0, 3, 0, 3] +6 0 0 2 +After: [0, 3, 0, 3] + +Before: [0, 2, 2, 1] +14 3 2 3 +After: [0, 2, 2, 3] + +Before: [2, 1, 0, 3] +7 2 1 3 +After: [2, 1, 0, 1] + +Before: [0, 1, 0, 3] +7 2 1 0 +After: [1, 1, 0, 3] + +Before: [3, 0, 2, 3] +1 2 3 1 +After: [3, 6, 2, 3] + +Before: [0, 2, 3, 2] +5 0 3 3 +After: [0, 2, 3, 0] + +Before: [1, 3, 3, 2] +13 1 3 0 +After: [6, 3, 3, 2] + +Before: [1, 1, 1, 3] +1 3 3 2 +After: [1, 1, 9, 3] + +Before: [3, 2, 2, 0] +4 1 1 0 +After: [3, 2, 2, 0] + +Before: [1, 1, 3, 2] +0 2 3 1 +After: [1, 2, 3, 2] + +Before: [1, 0, 2, 0] +12 0 1 1 +After: [1, 1, 2, 0] + +Before: [0, 0, 2, 1] +14 3 2 2 +After: [0, 0, 3, 1] + +Before: [3, 1, 3, 0] +4 3 2 1 +After: [3, 2, 3, 0] + +Before: [2, 0, 0, 3] +1 0 2 0 +After: [4, 0, 0, 3] + +Before: [1, 2, 3, 0] +13 0 1 1 +After: [1, 2, 3, 0] + +Before: [0, 1, 3, 0] +7 3 1 2 +After: [0, 1, 1, 0] + +Before: [0, 1, 2, 0] +2 2 3 0 +After: [3, 1, 2, 0] + +Before: [1, 0, 3, 2] +0 2 3 3 +After: [1, 0, 3, 2] + +Before: [1, 3, 2, 3] +1 1 3 2 +After: [1, 3, 9, 3] + +Before: [1, 0, 2, 3] +12 0 1 3 +After: [1, 0, 2, 1] + +Before: [3, 2, 2, 2] +2 1 3 3 +After: [3, 2, 2, 3] + +Before: [0, 1, 0, 1] +7 2 1 3 +After: [0, 1, 0, 1] + +Before: [3, 0, 2, 3] +10 0 2 0 +After: [2, 0, 2, 3] + +Before: [0, 3, 3, 3] +5 0 3 1 +After: [0, 0, 3, 3] + +Before: [2, 1, 3, 1] +0 2 0 2 +After: [2, 1, 2, 1] + +Before: [2, 1, 2, 1] +3 2 0 2 +After: [2, 1, 2, 1] + +Before: [1, 2, 0, 0] +2 1 3 3 +After: [1, 2, 0, 3] + +Before: [3, 0, 0, 1] +15 3 1 0 +After: [1, 0, 0, 1] + +Before: [2, 2, 3, 0] +10 2 2 2 +After: [2, 2, 2, 0] + +Before: [1, 1, 3, 0] +8 0 2 3 +After: [1, 1, 3, 3] + +Before: [2, 1, 2, 2] +14 3 1 2 +After: [2, 1, 3, 2] + +Before: [3, 1, 2, 2] +11 3 2 3 +After: [3, 1, 2, 4] + +Before: [1, 1, 3, 0] +10 2 2 3 +After: [1, 1, 3, 2] + +Before: [1, 2, 0, 1] +9 3 1 0 +After: [1, 2, 0, 1] + +Before: [1, 3, 3, 2] +13 1 3 2 +After: [1, 3, 6, 2] + +Before: [3, 3, 3, 2] +13 2 3 3 +After: [3, 3, 3, 6] + +Before: [2, 1, 0, 2] +7 2 1 1 +After: [2, 1, 0, 2] + +Before: [3, 2, 3, 1] +0 2 1 2 +After: [3, 2, 2, 1] + +Before: [0, 0, 1, 1] +5 0 3 2 +After: [0, 0, 0, 1] + +Before: [0, 1, 1, 0] +5 0 1 1 +After: [0, 0, 1, 0] + +Before: [3, 1, 0, 1] +7 2 1 0 +After: [1, 1, 0, 1] + +Before: [1, 1, 1, 3] +8 2 3 3 +After: [1, 1, 1, 3] + +Before: [1, 0, 2, 1] +12 0 1 2 +After: [1, 0, 1, 1] + +Before: [2, 2, 1, 0] +2 0 3 3 +After: [2, 2, 1, 3] + +Before: [3, 0, 2, 2] +3 2 2 2 +After: [3, 0, 2, 2] + +Before: [0, 2, 0, 0] +2 1 3 3 +After: [0, 2, 0, 3] + +Before: [2, 2, 2, 1] +14 3 2 1 +After: [2, 3, 2, 1] + +Before: [0, 1, 2, 3] +11 2 2 1 +After: [0, 4, 2, 3] + +Before: [3, 2, 0, 0] +4 1 1 1 +After: [3, 3, 0, 0] + +Before: [1, 1, 3, 3] +8 1 3 1 +After: [1, 3, 3, 3] + +Before: [1, 0, 3, 2] +8 0 2 3 +After: [1, 0, 3, 3] + +Before: [3, 1, 2, 3] +11 2 2 0 +After: [4, 1, 2, 3] + +Before: [3, 1, 2, 1] +10 0 2 1 +After: [3, 2, 2, 1] + +Before: [3, 1, 2, 1] +3 2 2 0 +After: [2, 1, 2, 1] + +Before: [0, 1, 0, 0] +6 0 0 2 +After: [0, 1, 0, 0] + +Before: [1, 0, 1, 2] +8 2 3 0 +After: [3, 0, 1, 2] + +Before: [3, 0, 3, 2] +13 0 3 1 +After: [3, 6, 3, 2] + +Before: [1, 2, 2, 1] +11 1 2 3 +After: [1, 2, 2, 4] + +Before: [0, 2, 0, 3] +6 0 0 3 +After: [0, 2, 0, 0] + +Before: [1, 0, 3, 3] +12 0 1 2 +After: [1, 0, 1, 3] + +Before: [0, 1, 2, 2] +6 0 0 3 +After: [0, 1, 2, 0] + +Before: [2, 2, 0, 0] +2 1 3 3 +After: [2, 2, 0, 3] + +Before: [0, 1, 3, 2] +6 0 0 0 +After: [0, 1, 3, 2] + +Before: [3, 0, 3, 1] +15 3 1 1 +After: [3, 1, 3, 1] + +Before: [0, 0, 2, 1] +14 3 2 3 +After: [0, 0, 2, 3] + +Before: [0, 3, 0, 1] +6 0 0 3 +After: [0, 3, 0, 0] + +Before: [1, 3, 1, 1] +9 2 1 1 +After: [1, 1, 1, 1] + +Before: [1, 0, 1, 0] +12 0 1 3 +After: [1, 0, 1, 1] + +Before: [3, 0, 1, 1] +1 2 3 3 +After: [3, 0, 1, 3] + +Before: [3, 3, 3, 1] +14 3 2 0 +After: [3, 3, 3, 1] + +Before: [2, 2, 1, 1] +9 3 1 3 +After: [2, 2, 1, 1] + +Before: [1, 1, 3, 2] +14 3 1 2 +After: [1, 1, 3, 2] + +Before: [1, 0, 2, 2] +1 0 2 3 +After: [1, 0, 2, 2] + +Before: [1, 2, 3, 3] +4 1 1 1 +After: [1, 3, 3, 3] + +Before: [2, 2, 3, 1] +9 3 1 0 +After: [1, 2, 3, 1] + +Before: [2, 2, 3, 0] +0 2 0 0 +After: [2, 2, 3, 0] + +Before: [0, 1, 3, 1] +10 2 2 1 +After: [0, 2, 3, 1] + +Before: [3, 1, 2, 3] +8 2 1 1 +After: [3, 3, 2, 3] + +Before: [1, 0, 0, 3] +12 0 1 0 +After: [1, 0, 0, 3] + +Before: [1, 0, 1, 0] +12 0 1 1 +After: [1, 1, 1, 0] + +Before: [2, 2, 2, 2] +2 0 3 1 +After: [2, 3, 2, 2] + +Before: [2, 1, 3, 0] +7 3 1 3 +After: [2, 1, 3, 1] + +Before: [3, 2, 2, 0] +11 1 2 2 +After: [3, 2, 4, 0] + +Before: [1, 0, 1, 3] +3 3 0 2 +After: [1, 0, 3, 3] + +Before: [3, 3, 3, 1] +10 2 2 0 +After: [2, 3, 3, 1] + +Before: [2, 0, 1, 1] +15 2 1 0 +After: [1, 0, 1, 1] + +Before: [2, 0, 2, 2] +11 2 2 3 +After: [2, 0, 2, 4] + +Before: [0, 0, 1, 1] +15 3 1 0 +After: [1, 0, 1, 1] + +Before: [3, 2, 3, 0] +2 1 3 3 +After: [3, 2, 3, 3] + +Before: [2, 1, 1, 2] +1 0 2 3 +After: [2, 1, 1, 4] + +Before: [3, 2, 3, 1] +10 2 2 1 +After: [3, 2, 3, 1] + +Before: [2, 2, 3, 2] +13 2 3 0 +After: [6, 2, 3, 2] + +Before: [1, 3, 2, 1] +14 3 2 0 +After: [3, 3, 2, 1] + +Before: [1, 0, 0, 3] +8 0 3 3 +After: [1, 0, 0, 3] + +Before: [3, 1, 1, 2] +14 3 1 2 +After: [3, 1, 3, 2] + +Before: [2, 3, 0, 3] +1 3 3 3 +After: [2, 3, 0, 9] + +Before: [0, 3, 1, 3] +3 3 3 3 +After: [0, 3, 1, 3] + +Before: [0, 2, 0, 1] +9 3 1 0 +After: [1, 2, 0, 1] + +Before: [1, 2, 2, 1] +1 0 2 3 +After: [1, 2, 2, 2] + +Before: [2, 0, 1, 0] +15 2 1 3 +After: [2, 0, 1, 1] + +Before: [0, 1, 2, 3] +10 3 2 2 +After: [0, 1, 2, 3] + +Before: [1, 1, 3, 2] +14 3 1 0 +After: [3, 1, 3, 2] + +Before: [0, 0, 1, 3] +15 2 1 0 +After: [1, 0, 1, 3] + +Before: [0, 1, 0, 1] +5 0 1 0 +After: [0, 1, 0, 1] + +Before: [3, 0, 3, 2] +13 0 3 3 +After: [3, 0, 3, 6] + +Before: [2, 3, 3, 1] +14 3 2 1 +After: [2, 3, 3, 1] + +Before: [3, 0, 3, 1] +15 3 1 0 +After: [1, 0, 3, 1] + +Before: [0, 2, 2, 3] +5 0 1 1 +After: [0, 0, 2, 3] + +Before: [0, 3, 1, 0] +4 0 3 0 +After: [3, 3, 1, 0] + +Before: [1, 0, 2, 3] +12 0 1 2 +After: [1, 0, 1, 3] + +Before: [3, 0, 1, 1] +15 3 1 3 +After: [3, 0, 1, 1] + +Before: [0, 3, 3, 3] +5 0 2 2 +After: [0, 3, 0, 3] + +Before: [2, 0, 0, 3] +4 1 2 3 +After: [2, 0, 0, 2] + +Before: [1, 3, 1, 0] +9 0 1 3 +After: [1, 3, 1, 1] + +Before: [0, 0, 1, 2] +15 2 1 0 +After: [1, 0, 1, 2] + +Before: [1, 0, 0, 3] +8 0 3 0 +After: [3, 0, 0, 3] + +Before: [0, 2, 3, 2] +10 2 2 0 +After: [2, 2, 3, 2] + +Before: [0, 1, 0, 2] +5 0 3 0 +After: [0, 1, 0, 2] + +Before: [0, 0, 3, 0] +5 0 2 0 +After: [0, 0, 3, 0] + +Before: [3, 2, 2, 2] +13 0 3 0 +After: [6, 2, 2, 2] + +Before: [3, 0, 2, 1] +4 2 1 1 +After: [3, 3, 2, 1] + +Before: [1, 3, 3, 1] +9 0 1 2 +After: [1, 3, 1, 1] + +Before: [1, 0, 3, 3] +3 3 0 2 +After: [1, 0, 3, 3] + +Before: [0, 1, 0, 2] +14 3 1 1 +After: [0, 3, 0, 2] + +Before: [0, 0, 2, 3] +4 2 1 3 +After: [0, 0, 2, 3] + +Before: [1, 2, 2, 3] +13 0 1 3 +After: [1, 2, 2, 2] + +Before: [1, 1, 2, 0] +8 0 2 1 +After: [1, 3, 2, 0] + +Before: [0, 0, 2, 2] +6 0 0 1 +After: [0, 0, 2, 2] + +Before: [2, 2, 2, 3] +3 2 2 3 +After: [2, 2, 2, 2] + +Before: [3, 0, 2, 2] +13 0 3 2 +After: [3, 0, 6, 2] + +Before: [0, 2, 0, 2] +5 0 1 3 +After: [0, 2, 0, 0] + +Before: [2, 0, 0, 3] +3 3 3 3 +After: [2, 0, 0, 3] + +Before: [1, 3, 2, 1] +10 1 2 0 +After: [2, 3, 2, 1] + +Before: [0, 1, 3, 2] +0 2 3 0 +After: [2, 1, 3, 2] + +Before: [2, 0, 1, 3] +1 0 3 1 +After: [2, 6, 1, 3] + +Before: [0, 3, 1, 2] +6 0 0 2 +After: [0, 3, 0, 2] + +Before: [3, 1, 3, 0] +10 2 2 2 +After: [3, 1, 2, 0] + +Before: [3, 1, 3, 2] +14 3 1 1 +After: [3, 3, 3, 2] + +Before: [0, 1, 3, 2] +0 2 3 3 +After: [0, 1, 3, 2] + +Before: [0, 1, 2, 1] +11 2 2 3 +After: [0, 1, 2, 4] + +Before: [0, 2, 1, 0] +4 2 2 0 +After: [3, 2, 1, 0] + +Before: [1, 1, 3, 1] +14 3 2 1 +After: [1, 3, 3, 1] + +Before: [3, 3, 3, 3] +1 1 3 3 +After: [3, 3, 3, 9] + +Before: [2, 3, 1, 1] +9 2 1 0 +After: [1, 3, 1, 1] + +Before: [2, 1, 3, 2] +2 0 3 3 +After: [2, 1, 3, 3] + +Before: [0, 1, 0, 2] +8 1 3 3 +After: [0, 1, 0, 3] + +Before: [2, 3, 3, 2] +13 2 3 2 +After: [2, 3, 6, 2] + +Before: [2, 3, 1, 2] +9 2 1 2 +After: [2, 3, 1, 2] + +Before: [3, 2, 2, 0] +2 1 3 2 +After: [3, 2, 3, 0] + +Before: [3, 2, 1, 1] +13 3 1 0 +After: [2, 2, 1, 1] + +Before: [0, 0, 1, 3] +15 2 1 1 +After: [0, 1, 1, 3] + +Before: [1, 3, 2, 1] +9 0 1 0 +After: [1, 3, 2, 1] + +Before: [0, 0, 1, 2] +5 0 2 0 +After: [0, 0, 1, 2] + +Before: [0, 1, 3, 1] +6 0 0 3 +After: [0, 1, 3, 0] + +Before: [3, 1, 3, 0] +7 3 1 2 +After: [3, 1, 1, 0] + +Before: [0, 3, 2, 1] +1 1 2 1 +After: [0, 6, 2, 1] + +Before: [0, 2, 1, 3] +3 3 3 3 +After: [0, 2, 1, 3] + +Before: [0, 0, 3, 3] +5 0 2 2 +After: [0, 0, 0, 3] + +Before: [0, 2, 2, 0] +3 2 2 3 +After: [0, 2, 2, 2] + +Before: [2, 0, 1, 0] +15 2 1 2 +After: [2, 0, 1, 0] + +Before: [3, 2, 2, 3] +3 3 3 0 +After: [3, 2, 2, 3] + +Before: [1, 0, 3, 0] +12 0 1 2 +After: [1, 0, 1, 0] + +Before: [0, 1, 2, 0] +7 3 1 1 +After: [0, 1, 2, 0] + +Before: [2, 0, 3, 1] +0 2 0 1 +After: [2, 2, 3, 1] + +Before: [3, 3, 2, 2] +11 2 2 2 +After: [3, 3, 4, 2] + +Before: [0, 0, 2, 3] +6 0 0 0 +After: [0, 0, 2, 3] + +Before: [0, 3, 0, 2] +6 0 0 2 +After: [0, 3, 0, 2] + +Before: [2, 1, 0, 2] +2 0 3 2 +After: [2, 1, 3, 2] + +Before: [0, 3, 1, 0] +5 0 1 2 +After: [0, 3, 0, 0] + +Before: [3, 1, 1, 1] +1 1 3 2 +After: [3, 1, 3, 1] + +Before: [2, 0, 3, 1] +0 2 0 3 +After: [2, 0, 3, 2] + +Before: [1, 0, 1, 1] +15 3 1 3 +After: [1, 0, 1, 1] + +Before: [1, 0, 2, 1] +12 0 1 3 +After: [1, 0, 2, 1] + +Before: [3, 2, 2, 3] +11 2 2 1 +After: [3, 4, 2, 3] + +Before: [1, 3, 0, 0] +9 0 1 1 +After: [1, 1, 0, 0] + +Before: [2, 1, 2, 0] +7 3 1 0 +After: [1, 1, 2, 0] + +Before: [0, 3, 0, 3] +3 3 1 1 +After: [0, 3, 0, 3] + +Before: [0, 1, 1, 3] +8 2 3 2 +After: [0, 1, 3, 3] + +Before: [2, 1, 0, 3] +7 2 1 1 +After: [2, 1, 0, 3] + +Before: [2, 2, 3, 1] +0 2 1 3 +After: [2, 2, 3, 2] + +Before: [1, 0, 1, 1] +12 0 1 1 +After: [1, 1, 1, 1] + +Before: [0, 3, 1, 0] +9 2 1 3 +After: [0, 3, 1, 1] + +Before: [1, 0, 3, 0] +12 0 1 0 +After: [1, 0, 3, 0] + +Before: [0, 0, 3, 2] +4 0 2 1 +After: [0, 2, 3, 2] + +Before: [0, 0, 1, 1] +15 2 1 2 +After: [0, 0, 1, 1] + +Before: [2, 2, 2, 2] +2 2 3 0 +After: [3, 2, 2, 2] + +Before: [0, 0, 1, 1] +15 3 1 3 +After: [0, 0, 1, 1] + +Before: [1, 0, 3, 3] +3 3 3 1 +After: [1, 3, 3, 3] + +Before: [2, 0, 2, 2] +2 2 3 3 +After: [2, 0, 2, 3] + +Before: [0, 1, 0, 1] +7 2 1 1 +After: [0, 1, 0, 1] + +Before: [0, 2, 3, 1] +10 2 2 3 +After: [0, 2, 3, 2] + +Before: [1, 0, 1, 2] +12 0 1 2 +After: [1, 0, 1, 2] + +Before: [3, 1, 2, 0] +1 1 3 3 +After: [3, 1, 2, 3] + +Before: [0, 3, 1, 0] +9 2 1 0 +After: [1, 3, 1, 0] + +Before: [2, 0, 1, 2] +15 2 1 3 +After: [2, 0, 1, 1] + +Before: [2, 3, 1, 0] +9 2 1 1 +After: [2, 1, 1, 0] + +Before: [1, 0, 0, 0] +12 0 1 1 +After: [1, 1, 0, 0] + +Before: [2, 2, 3, 3] +3 3 3 2 +After: [2, 2, 3, 3] + +Before: [3, 3, 1, 1] +1 2 3 2 +After: [3, 3, 3, 1] + +Before: [3, 3, 2, 2] +13 0 3 0 +After: [6, 3, 2, 2] + +Before: [0, 1, 1, 0] +4 1 2 2 +After: [0, 1, 3, 0] + +Before: [1, 3, 2, 0] +2 2 3 3 +After: [1, 3, 2, 3] + +Before: [0, 3, 1, 1] +9 2 1 1 +After: [0, 1, 1, 1] + +Before: [0, 2, 3, 1] +5 0 1 0 +After: [0, 2, 3, 1] + +Before: [0, 2, 2, 2] +5 0 3 3 +After: [0, 2, 2, 0] + +Before: [0, 3, 3, 3] +10 2 2 2 +After: [0, 3, 2, 3] + +Before: [1, 3, 1, 3] +3 3 1 3 +After: [1, 3, 1, 3] + +Before: [3, 3, 3, 2] +0 2 3 1 +After: [3, 2, 3, 2] + +Before: [3, 3, 0, 1] +4 2 3 0 +After: [3, 3, 0, 1] + +Before: [0, 0, 0, 3] +6 0 0 3 +After: [0, 0, 0, 0] + +Before: [3, 0, 2, 1] +14 3 2 3 +After: [3, 0, 2, 3] + +Before: [1, 0, 3, 2] +13 2 3 2 +After: [1, 0, 6, 2] + +Before: [0, 1, 2, 0] +7 3 1 2 +After: [0, 1, 1, 0] + +Before: [3, 3, 2, 2] +11 3 2 1 +After: [3, 4, 2, 2] + +Before: [2, 2, 2, 3] +1 3 2 3 +After: [2, 2, 2, 6] + +Before: [2, 0, 2, 2] +11 3 2 1 +After: [2, 4, 2, 2] + +Before: [0, 2, 3, 2] +0 2 1 1 +After: [0, 2, 3, 2] + +Before: [1, 0, 2, 0] +12 0 1 3 +After: [1, 0, 2, 1] + +Before: [3, 3, 1, 2] +13 0 3 3 +After: [3, 3, 1, 6] + +Before: [3, 2, 3, 1] +9 3 1 2 +After: [3, 2, 1, 1] + +Before: [2, 2, 2, 0] +11 2 2 3 +After: [2, 2, 2, 4] + +Before: [1, 0, 1, 1] +4 2 2 1 +After: [1, 3, 1, 1] + +Before: [2, 2, 2, 1] +14 3 2 2 +After: [2, 2, 3, 1] + +Before: [1, 1, 2, 2] +11 3 2 0 +After: [4, 1, 2, 2] + +Before: [2, 2, 3, 2] +0 2 0 2 +After: [2, 2, 2, 2] + +Before: [1, 1, 0, 1] +1 1 3 0 +After: [3, 1, 0, 1] + +Before: [2, 3, 1, 0] +2 0 3 3 +After: [2, 3, 1, 3] + +Before: [1, 3, 3, 1] +9 0 1 1 +After: [1, 1, 3, 1] + +Before: [3, 3, 2, 2] +10 1 2 1 +After: [3, 2, 2, 2] + +Before: [0, 2, 3, 0] +0 2 1 2 +After: [0, 2, 2, 0] + +Before: [0, 3, 3, 1] +6 0 0 0 +After: [0, 3, 3, 1] + +Before: [3, 2, 2, 2] +2 2 3 0 +After: [3, 2, 2, 2] + +Before: [1, 0, 0, 2] +12 0 1 1 +After: [1, 1, 0, 2] + +Before: [1, 0, 0, 2] +12 0 1 2 +After: [1, 0, 1, 2] + +Before: [0, 2, 1, 2] +5 0 3 1 +After: [0, 0, 1, 2] + +Before: [0, 0, 3, 3] +5 0 3 2 +After: [0, 0, 0, 3] + +Before: [0, 1, 1, 0] +1 2 3 0 +After: [3, 1, 1, 0] + +Before: [0, 1, 1, 2] +5 0 3 3 +After: [0, 1, 1, 0] + +Before: [3, 3, 2, 0] +10 0 2 0 +After: [2, 3, 2, 0] + +Before: [1, 0, 0, 1] +12 0 1 2 +After: [1, 0, 1, 1] + +Before: [1, 3, 1, 1] +9 0 1 3 +After: [1, 3, 1, 1] + +Before: [1, 0, 2, 1] +14 3 2 1 +After: [1, 3, 2, 1] + +Before: [0, 0, 1, 1] +5 0 2 3 +After: [0, 0, 1, 0] + +Before: [2, 3, 2, 3] +3 3 3 1 +After: [2, 3, 2, 3] + +Before: [1, 2, 2, 0] +2 2 3 3 +After: [1, 2, 2, 3] + +Before: [3, 3, 1, 0] +9 2 1 1 +After: [3, 1, 1, 0] + +Before: [1, 0, 3, 3] +12 0 1 0 +After: [1, 0, 3, 3] + +Before: [3, 0, 3, 0] +10 2 2 2 +After: [3, 0, 2, 0] + +Before: [2, 2, 3, 2] +0 2 3 0 +After: [2, 2, 3, 2] + +Before: [2, 0, 0, 2] +2 0 3 2 +After: [2, 0, 3, 2] + +Before: [2, 1, 2, 3] +11 2 2 2 +After: [2, 1, 4, 3] + +Before: [3, 3, 2, 2] +2 2 3 1 +After: [3, 3, 2, 2] + +Before: [0, 0, 2, 1] +11 2 2 2 +After: [0, 0, 4, 1] + +Before: [0, 3, 3, 1] +14 3 2 1 +After: [0, 3, 3, 1] + +Before: [3, 2, 0, 2] +13 0 3 2 +After: [3, 2, 6, 2] + +Before: [2, 2, 2, 0] +4 2 1 0 +After: [3, 2, 2, 0] + +Before: [3, 0, 1, 1] +15 2 1 3 +After: [3, 0, 1, 1] + +Before: [2, 1, 3, 2] +0 2 0 1 +After: [2, 2, 3, 2] + +Before: [1, 3, 1, 0] +9 0 1 0 +After: [1, 3, 1, 0] + +Before: [1, 1, 1, 0] +4 1 2 3 +After: [1, 1, 1, 3] + +Before: [1, 1, 2, 0] +7 3 1 3 +After: [1, 1, 2, 1] + +Before: [2, 3, 1, 3] +9 2 1 3 +After: [2, 3, 1, 1] + +Before: [3, 3, 1, 0] +9 2 1 3 +After: [3, 3, 1, 1] + +Before: [2, 3, 2, 3] +3 3 1 3 +After: [2, 3, 2, 3] + +Before: [3, 1, 2, 2] +8 2 1 2 +After: [3, 1, 3, 2] + +Before: [0, 0, 1, 0] +15 2 1 2 +After: [0, 0, 1, 0] + +Before: [1, 0, 2, 2] +4 1 3 1 +After: [1, 3, 2, 2] + +Before: [0, 3, 2, 1] +5 0 1 2 +After: [0, 3, 0, 1] + +Before: [1, 3, 0, 3] +9 0 1 3 +After: [1, 3, 0, 1] + +Before: [1, 2, 3, 2] +1 3 2 0 +After: [4, 2, 3, 2] + +Before: [1, 1, 0, 0] +4 0 2 0 +After: [3, 1, 0, 0] + +Before: [1, 0, 1, 0] +4 1 2 1 +After: [1, 2, 1, 0] + +Before: [1, 3, 3, 2] +10 2 2 0 +After: [2, 3, 3, 2] + +Before: [3, 2, 3, 2] +2 1 3 2 +After: [3, 2, 3, 2] + +Before: [1, 2, 1, 1] +9 3 1 3 +After: [1, 2, 1, 1] + +Before: [0, 1, 2, 2] +14 3 1 0 +After: [3, 1, 2, 2] + +Before: [3, 3, 0, 2] +13 1 3 0 +After: [6, 3, 0, 2] + +Before: [3, 0, 2, 0] +1 0 2 3 +After: [3, 0, 2, 6] + +Before: [0, 3, 3, 2] +13 2 3 1 +After: [0, 6, 3, 2] + +Before: [1, 0, 3, 1] +12 0 1 0 +After: [1, 0, 3, 1] + +Before: [0, 0, 0, 1] +4 0 3 2 +After: [0, 0, 3, 1] + +Before: [2, 0, 1, 1] +15 3 1 3 +After: [2, 0, 1, 1] + +Before: [3, 0, 2, 1] +15 3 1 2 +After: [3, 0, 1, 1] + +Before: [3, 3, 2, 3] +1 3 2 3 +After: [3, 3, 2, 6] + +Before: [2, 1, 1, 3] +8 2 3 2 +After: [2, 1, 3, 3] + +Before: [0, 0, 1, 3] +15 2 1 2 +After: [0, 0, 1, 3] + +Before: [3, 1, 3, 1] +10 2 2 2 +After: [3, 1, 2, 1] + +Before: [2, 3, 1, 0] +9 2 1 2 +After: [2, 3, 1, 0] + +Before: [0, 0, 2, 2] +6 0 0 3 +After: [0, 0, 2, 0] + +Before: [0, 0, 2, 0] +8 0 2 0 +After: [2, 0, 2, 0] + +Before: [0, 0, 2, 1] +3 2 2 1 +After: [0, 2, 2, 1] + +Before: [3, 2, 2, 0] +2 2 3 0 +After: [3, 2, 2, 0] + +Before: [3, 2, 3, 2] +0 2 3 3 +After: [3, 2, 3, 2] + +Before: [2, 0, 2, 3] +11 2 2 3 +After: [2, 0, 2, 4] + +Before: [1, 2, 2, 2] +11 2 2 3 +After: [1, 2, 2, 4] + +Before: [0, 1, 0, 1] +8 0 1 2 +After: [0, 1, 1, 1] + +Before: [1, 0, 1, 2] +15 2 1 2 +After: [1, 0, 1, 2] + +Before: [1, 2, 1, 1] +9 3 1 2 +After: [1, 2, 1, 1] + +Before: [3, 1, 3, 0] +7 3 1 1 +After: [3, 1, 3, 0] + +Before: [0, 1, 1, 3] +8 1 3 0 +After: [3, 1, 1, 3] + +Before: [2, 2, 3, 0] +0 2 1 0 +After: [2, 2, 3, 0] + +Before: [2, 0, 0, 3] +5 1 0 3 +After: [2, 0, 0, 0] + +Before: [2, 0, 2, 2] +2 2 3 0 +After: [3, 0, 2, 2] + +Before: [0, 2, 3, 3] +10 2 2 0 +After: [2, 2, 3, 3] + +Before: [3, 0, 1, 2] +15 2 1 3 +After: [3, 0, 1, 1] + +Before: [3, 1, 2, 0] +2 2 3 1 +After: [3, 3, 2, 0] + +Before: [0, 1, 3, 2] +4 0 2 1 +After: [0, 2, 3, 2] + +Before: [1, 0, 0, 3] +12 0 1 3 +After: [1, 0, 0, 1] + +Before: [2, 2, 3, 3] +0 2 1 0 +After: [2, 2, 3, 3] + +Before: [0, 1, 1, 1] +5 0 1 3 +After: [0, 1, 1, 0] + +Before: [1, 0, 1, 2] +15 2 1 0 +After: [1, 0, 1, 2] + +Before: [2, 1, 3, 0] +10 2 2 2 +After: [2, 1, 2, 0] + +Before: [0, 2, 3, 2] +1 1 2 3 +After: [0, 2, 3, 4] + +Before: [1, 1, 0, 1] +7 2 1 0 +After: [1, 1, 0, 1] + +Before: [0, 3, 1, 0] +6 0 0 0 +After: [0, 3, 1, 0] + +Before: [3, 1, 0, 0] +7 3 1 3 +After: [3, 1, 0, 1] + +Before: [1, 0, 1, 3] +12 0 1 0 +After: [1, 0, 1, 3] + +Before: [1, 0, 1, 1] +12 0 1 2 +After: [1, 0, 1, 1] + +Before: [0, 3, 3, 3] +1 1 3 0 +After: [9, 3, 3, 3] + +Before: [3, 0, 3, 2] +5 1 0 0 +After: [0, 0, 3, 2] + +Before: [1, 2, 1, 1] +13 3 1 2 +After: [1, 2, 2, 1] + +Before: [1, 3, 0, 3] +9 0 1 1 +After: [1, 1, 0, 3] + +Before: [0, 3, 2, 3] +8 0 2 1 +After: [0, 2, 2, 3] + +Before: [2, 1, 0, 1] +7 2 1 0 +After: [1, 1, 0, 1] + +Before: [0, 0, 3, 2] +6 0 0 2 +After: [0, 0, 0, 2] + +Before: [0, 3, 0, 2] +4 2 1 0 +After: [1, 3, 0, 2] + +Before: [0, 1, 2, 1] +5 0 3 3 +After: [0, 1, 2, 0] + +Before: [2, 3, 1, 2] +9 2 1 0 +After: [1, 3, 1, 2] + +Before: [0, 3, 1, 2] +9 2 1 3 +After: [0, 3, 1, 1] + +Before: [0, 2, 1, 2] +4 0 1 2 +After: [0, 2, 1, 2] + +Before: [1, 0, 2, 2] +12 0 1 1 +After: [1, 1, 2, 2] + +Before: [3, 3, 1, 2] +9 2 1 3 +After: [3, 3, 1, 1] + +Before: [2, 2, 0, 2] +2 0 3 2 +After: [2, 2, 3, 2] + +Before: [3, 2, 2, 0] +1 0 2 2 +After: [3, 2, 6, 0] + +Before: [0, 3, 2, 0] +2 2 3 2 +After: [0, 3, 3, 0] + +Before: [1, 2, 3, 2] +0 2 3 0 +After: [2, 2, 3, 2] + +Before: [0, 1, 2, 3] +3 3 0 2 +After: [0, 1, 3, 3] + +Before: [0, 3, 1, 2] +6 0 0 1 +After: [0, 0, 1, 2] + +Before: [1, 2, 2, 0] +2 2 3 1 +After: [1, 3, 2, 0] + +Before: [1, 3, 1, 0] +9 2 1 3 +After: [1, 3, 1, 1] + +Before: [2, 1, 0, 0] +4 1 2 0 +After: [3, 1, 0, 0] + +Before: [0, 1, 3, 2] +8 0 1 2 +After: [0, 1, 1, 2] + +Before: [0, 2, 3, 2] +1 3 2 2 +After: [0, 2, 4, 2] + +Before: [0, 1, 0, 0] +7 2 1 1 +After: [0, 1, 0, 0] + +Before: [0, 2, 3, 1] +0 2 1 2 +After: [0, 2, 2, 1] + +Before: [3, 3, 2, 2] +11 2 2 0 +After: [4, 3, 2, 2] + +Before: [3, 0, 0, 3] +1 0 3 3 +After: [3, 0, 0, 9] + +Before: [1, 1, 0, 3] +7 2 1 0 +After: [1, 1, 0, 3] + +Before: [3, 1, 0, 2] +7 2 1 0 +After: [1, 1, 0, 2] + +Before: [1, 0, 2, 0] +2 2 3 0 +After: [3, 0, 2, 0] + +Before: [2, 1, 0, 0] +7 3 1 2 +After: [2, 1, 1, 0] + +Before: [2, 2, 1, 2] +1 3 2 3 +After: [2, 2, 1, 4] + +Before: [2, 0, 3, 0] +0 2 0 0 +After: [2, 0, 3, 0] + +Before: [3, 0, 3, 2] +0 2 3 3 +After: [3, 0, 3, 2] + +Before: [0, 1, 2, 2] +11 3 2 0 +After: [4, 1, 2, 2] + +Before: [1, 1, 2, 0] +7 3 1 0 +After: [1, 1, 2, 0] + +Before: [0, 1, 2, 0] +2 2 3 2 +After: [0, 1, 3, 0] + +Before: [2, 0, 1, 1] +1 0 2 3 +After: [2, 0, 1, 4] + +Before: [0, 1, 3, 1] +5 0 2 2 +After: [0, 1, 0, 1] + +Before: [0, 2, 2, 0] +2 2 3 3 +After: [0, 2, 2, 3] + +Before: [1, 3, 0, 3] +9 0 1 2 +After: [1, 3, 1, 3] + +Before: [2, 0, 3, 3] +10 2 2 1 +After: [2, 2, 3, 3] + +Before: [2, 2, 3, 1] +0 2 1 1 +After: [2, 2, 3, 1] + +Before: [0, 0, 1, 2] +6 0 0 2 +After: [0, 0, 0, 2] + +Before: [0, 0, 2, 3] +10 3 2 2 +After: [0, 0, 2, 3] + +Before: [3, 2, 2, 1] +3 2 2 3 +After: [3, 2, 2, 2] + +Before: [0, 0, 0, 2] +1 3 2 1 +After: [0, 4, 0, 2] + +Before: [1, 0, 3, 3] +12 0 1 3 +After: [1, 0, 3, 1] + +Before: [2, 1, 2, 2] +11 0 2 1 +After: [2, 4, 2, 2] + +Before: [1, 3, 2, 3] +10 3 2 1 +After: [1, 2, 2, 3] + +Before: [0, 0, 1, 2] +5 0 3 3 +After: [0, 0, 1, 0] + +Before: [0, 0, 2, 0] +11 2 2 3 +After: [0, 0, 2, 4] + +Before: [1, 1, 2, 0] +11 2 2 0 +After: [4, 1, 2, 0] + +Before: [3, 1, 1, 3] +3 3 3 2 +After: [3, 1, 3, 3] + +Before: [1, 3, 0, 2] +13 1 3 2 +After: [1, 3, 6, 2] + +Before: [1, 1, 0, 0] +1 0 3 0 +After: [3, 1, 0, 0] + +Before: [1, 0, 1, 1] +12 0 1 3 +After: [1, 0, 1, 1] + +Before: [1, 0, 3, 2] +12 0 1 3 +After: [1, 0, 3, 1] + +Before: [0, 0, 3, 3] +10 2 2 0 +After: [2, 0, 3, 3] + +Before: [0, 2, 3, 3] +0 2 1 3 +After: [0, 2, 3, 2] + +Before: [2, 2, 1, 1] +9 3 1 0 +After: [1, 2, 1, 1] + +Before: [1, 3, 3, 2] +10 2 2 1 +After: [1, 2, 3, 2] + +Before: [1, 3, 1, 3] +3 3 0 3 +After: [1, 3, 1, 3] + +Before: [0, 0, 2, 3] +6 0 0 2 +After: [0, 0, 0, 3] + +Before: [1, 1, 1, 0] +7 3 1 2 +After: [1, 1, 1, 0] + +Before: [1, 1, 0, 1] +7 2 1 3 +After: [1, 1, 0, 1] + +Before: [3, 3, 0, 0] +4 3 2 0 +After: [2, 3, 0, 0] + +Before: [2, 1, 1, 1] +4 1 2 3 +After: [2, 1, 1, 3] + +Before: [3, 0, 2, 3] +4 2 1 3 +After: [3, 0, 2, 3] + +Before: [1, 0, 2, 0] +4 2 1 2 +After: [1, 0, 3, 0] + +Before: [1, 0, 1, 2] +12 0 1 1 +After: [1, 1, 1, 2] + +Before: [0, 1, 0, 0] +5 0 1 0 +After: [0, 1, 0, 0] + +Before: [1, 1, 2, 0] +7 3 1 1 +After: [1, 1, 2, 0] + +Before: [0, 2, 1, 0] +2 1 3 0 +After: [3, 2, 1, 0] + +Before: [2, 1, 2, 0] +2 0 3 1 +After: [2, 3, 2, 0] + +Before: [0, 3, 2, 2] +10 1 2 3 +After: [0, 3, 2, 2] + +Before: [1, 0, 0, 0] +12 0 1 0 +After: [1, 0, 0, 0] + +Before: [2, 1, 0, 2] +14 3 1 0 +After: [3, 1, 0, 2] + +Before: [3, 2, 2, 1] +9 3 1 2 +After: [3, 2, 1, 1] + +Before: [1, 0, 1, 2] +15 2 1 1 +After: [1, 1, 1, 2] + +Before: [2, 0, 1, 1] +15 2 1 1 +After: [2, 1, 1, 1] + +Before: [3, 0, 3, 3] +3 3 3 0 +After: [3, 0, 3, 3] + +Before: [1, 1, 1, 0] +1 1 3 1 +After: [1, 3, 1, 0] + +Before: [2, 2, 0, 1] +9 3 1 1 +After: [2, 1, 0, 1] + +Before: [1, 3, 1, 2] +9 2 1 3 +After: [1, 3, 1, 1] + +Before: [0, 3, 1, 1] +6 0 0 2 +After: [0, 3, 0, 1] + +Before: [3, 1, 3, 1] +8 1 2 2 +After: [3, 1, 3, 1] + +Before: [1, 2, 2, 1] +4 1 1 1 +After: [1, 3, 2, 1] + +Before: [2, 3, 3, 0] +0 2 0 0 +After: [2, 3, 3, 0] + +Before: [0, 2, 1, 1] +9 3 1 1 +After: [0, 1, 1, 1] + +Before: [0, 3, 3, 0] +5 0 1 2 +After: [0, 3, 0, 0] + +Before: [0, 3, 1, 0] +9 2 1 1 +After: [0, 1, 1, 0] + +Before: [3, 2, 3, 2] +2 1 3 3 +After: [3, 2, 3, 3] + +Before: [1, 1, 2, 2] +11 3 2 3 +After: [1, 1, 2, 4] + +Before: [0, 3, 3, 3] +5 0 2 0 +After: [0, 3, 3, 3] + +Before: [1, 0, 2, 2] +11 2 2 1 +After: [1, 4, 2, 2] + +Before: [3, 2, 3, 1] +14 3 2 0 +After: [3, 2, 3, 1] + +Before: [0, 3, 2, 0] +6 0 0 0 +After: [0, 3, 2, 0] + +Before: [1, 1, 1, 3] +3 3 1 2 +After: [1, 1, 3, 3] + +Before: [3, 1, 3, 2] +0 2 3 3 +After: [3, 1, 3, 2] + +Before: [2, 1, 2, 2] +2 2 3 3 +After: [2, 1, 2, 3] + +Before: [0, 3, 0, 3] +6 0 0 3 +After: [0, 3, 0, 0] + +Before: [0, 2, 2, 3] +6 0 0 2 +After: [0, 2, 0, 3] + +Before: [0, 1, 3, 3] +6 0 0 2 +After: [0, 1, 0, 3] + +Before: [1, 1, 2, 2] +8 2 1 2 +After: [1, 1, 3, 2] + +Before: [2, 2, 1, 1] +1 2 3 2 +After: [2, 2, 3, 1] + +Before: [2, 0, 1, 2] +15 2 1 2 +After: [2, 0, 1, 2] + +Before: [2, 1, 2, 3] +1 3 3 2 +After: [2, 1, 9, 3] + +Before: [0, 1, 0, 0] +7 2 1 2 +After: [0, 1, 1, 0] + +Before: [2, 1, 0, 3] +8 2 3 0 +After: [3, 1, 0, 3] + +Before: [0, 3, 2, 1] +14 3 2 0 +After: [3, 3, 2, 1] + +Before: [2, 0, 1, 2] +15 2 1 0 +After: [1, 0, 1, 2] + +Before: [1, 2, 2, 1] +13 3 1 3 +After: [1, 2, 2, 2] + +Before: [1, 0, 1, 0] +12 0 1 0 +After: [1, 0, 1, 0] + +Before: [2, 2, 3, 0] +0 2 1 3 +After: [2, 2, 3, 2] + +Before: [0, 0, 1, 1] +15 2 1 3 +After: [0, 0, 1, 1] + +Before: [0, 3, 0, 3] +3 3 0 0 +After: [3, 3, 0, 3] + +Before: [2, 2, 2, 1] +11 2 2 2 +After: [2, 2, 4, 1] + +Before: [2, 1, 2, 0] +2 0 3 0 +After: [3, 1, 2, 0] + +Before: [1, 2, 2, 0] +13 0 1 0 +After: [2, 2, 2, 0] + +Before: [1, 0, 3, 0] +12 0 1 1 +After: [1, 1, 3, 0] + +Before: [3, 1, 0, 3] +5 2 0 3 +After: [3, 1, 0, 0] + +Before: [1, 2, 1, 0] +1 2 3 0 +After: [3, 2, 1, 0] + +Before: [0, 1, 3, 2] +13 2 3 0 +After: [6, 1, 3, 2] + +Before: [1, 0, 1, 2] +12 0 1 0 +After: [1, 0, 1, 2] + +Before: [0, 0, 1, 1] +1 2 3 3 +After: [0, 0, 1, 3] + +Before: [1, 3, 0, 2] +9 0 1 2 +After: [1, 3, 1, 2] + +Before: [2, 3, 2, 2] +11 3 2 0 +After: [4, 3, 2, 2] + +Before: [2, 2, 3, 1] +10 2 2 0 +After: [2, 2, 3, 1] + +Before: [3, 0, 3, 2] +10 2 2 3 +After: [3, 0, 3, 2] + +Before: [2, 1, 2, 2] +11 3 2 2 +After: [2, 1, 4, 2] + +Before: [0, 3, 3, 1] +10 2 2 1 +After: [0, 2, 3, 1] + +Before: [0, 0, 2, 1] +15 3 1 3 +After: [0, 0, 2, 1] + +Before: [1, 2, 3, 2] +13 2 3 1 +After: [1, 6, 3, 2] + +Before: [2, 3, 2, 1] +14 3 2 2 +After: [2, 3, 3, 1] + +Before: [1, 0, 1, 3] +12 0 1 2 +After: [1, 0, 1, 3] + +Before: [0, 2, 2, 3] +8 0 3 0 +After: [3, 2, 2, 3] + +Before: [0, 1, 1, 2] +14 3 1 3 +After: [0, 1, 1, 3] + +Before: [1, 3, 3, 2] +9 0 1 2 +After: [1, 3, 1, 2] + +Before: [2, 2, 2, 1] +11 2 2 1 +After: [2, 4, 2, 1] + +Before: [1, 3, 3, 3] +9 0 1 0 +After: [1, 3, 3, 3] + +Before: [3, 3, 2, 1] +1 3 2 0 +After: [2, 3, 2, 1] + +Before: [0, 1, 3, 1] +14 3 2 3 +After: [0, 1, 3, 3] + +Before: [2, 0, 3, 3] +0 2 0 0 +After: [2, 0, 3, 3] + +Before: [3, 2, 3, 2] +13 2 3 0 +After: [6, 2, 3, 2] + +Before: [2, 3, 2, 1] +11 2 2 2 +After: [2, 3, 4, 1] + +Before: [3, 0, 0, 2] +5 2 0 2 +After: [3, 0, 0, 2] + +Before: [1, 1, 1, 3] +3 3 3 1 +After: [1, 3, 1, 3] + +Before: [2, 1, 2, 0] +3 2 0 0 +After: [2, 1, 2, 0] + +Before: [0, 3, 1, 3] +6 0 0 0 +After: [0, 3, 1, 3] + +Before: [2, 1, 0, 0] +2 0 3 3 +After: [2, 1, 0, 3] + +Before: [0, 1, 0, 3] +5 0 1 3 +After: [0, 1, 0, 0] + +Before: [3, 0, 2, 1] +15 3 1 0 +After: [1, 0, 2, 1] + +Before: [2, 2, 2, 2] +2 1 3 0 +After: [3, 2, 2, 2] + +Before: [2, 1, 0, 2] +14 3 1 3 +After: [2, 1, 0, 3] + +Before: [0, 0, 2, 1] +11 2 2 3 +After: [0, 0, 2, 4] + +Before: [2, 3, 1, 2] +9 2 1 3 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 +7 3 2 2 +1 2 2 2 +11 2 1 1 +14 1 0 2 +14 1 3 3 +14 2 1 0 +15 0 3 3 +1 3 2 3 +11 1 3 1 +14 1 2 3 +1 2 0 0 +4 0 1 0 +14 2 0 2 +3 0 2 3 +1 3 3 3 +11 3 1 1 +14 2 3 3 +14 2 3 0 +5 0 3 3 +1 3 1 3 +1 3 2 3 +11 1 3 1 +3 1 3 3 +14 1 2 0 +1 3 0 1 +4 1 1 1 +14 3 1 2 +1 0 2 0 +1 0 2 0 +11 0 3 3 +14 2 0 2 +1 1 0 0 +4 0 1 0 +14 3 0 1 +4 0 1 1 +1 1 1 1 +1 1 2 1 +11 1 3 3 +3 3 3 0 +14 0 3 3 +14 3 0 1 +7 3 2 1 +1 1 2 1 +1 1 2 1 +11 0 1 0 +3 0 2 1 +14 1 3 2 +14 2 1 0 +14 1 1 3 +13 3 0 2 +1 2 3 2 +11 2 1 1 +3 1 1 3 +14 2 2 2 +14 2 2 1 +14 1 3 0 +3 0 2 1 +1 1 2 1 +11 3 1 3 +3 3 2 0 \ No newline at end of file diff --git a/day-16/ops.py b/day-16/ops.py new file mode 100644 index 0000000..ff68d8e --- /dev/null +++ b/day-16/ops.py @@ -0,0 +1,73 @@ +def addr(reg, a, b, c): + reg[c] = reg[a] + reg[b] + return reg + +def addi(reg, a, b, c): + reg[c] = reg[a] + b + return reg + +def mulr(reg, a, b, c): + reg[c] = reg[a] * reg[b] + return reg + +def muli(reg, a, b, c): + reg[c] = reg[a] * b + return reg + +def banr(reg, a, b, c): + reg[c] = reg[a] & reg[b] + return reg + +def bani(reg, a, b, c): + reg[c] = reg[a] & b + return reg + +def borr(reg, a, b, c): + reg[c] = reg[a] | reg[b] + return reg + +def bori(reg, a, b, c): + reg[c] = reg[a] | b + return reg + +def setr(reg, a, b, c): + reg[c] = reg[a] + return reg + +def seti(reg, a, b, c): + reg[c] = a + return reg + +def gtir(reg, a, b, c): + reg[c] = 1 if a > reg[b] else 0 + return reg + +def gtri(reg, a, b, c): + reg[c] = 1 if reg[a] > b else 0 + return reg + +def gtrr(reg, a, b, c): + reg[c] = 1 if reg[a] > reg[b] else 0 + return reg + +def eqir(reg, a, b, c): + reg[c] = 1 if a == reg[b] else 0 + return reg + +def eqri(reg, a, b, c): + reg[c] = 1 if reg[a] == b else 0 + return reg + +def eqrr(reg, a, b, c): + reg[c] = 1 if reg[a] == reg[b] else 0 + return reg + +ops = [ + addr, addi, + mulr, muli, + banr, bani, + borr, bori, + setr, seti, + gtir, gtri, gtrr, + eqir, eqri, eqrr +]