├── 2019 ├── days │ ├── day04 │ │ ├── input │ │ │ └── dzikoysk.input │ │ ├── panda.hjson │ │ └── day04.panda │ ├── commons │ │ ├── vm │ │ │ ├── panda.hjson │ │ │ └── vm.panda │ │ └── aoc │ │ │ ├── panda.hjson │ │ │ └── utils.panda │ ├── day01 │ │ ├── panda.hjson │ │ ├── day01.panda │ │ └── input │ │ │ ├── rrye.input │ │ │ ├── oskarr1239.input │ │ │ └── dzikoysk.input │ ├── day02 │ │ ├── panda.hjson │ │ ├── input │ │ │ ├── oskarr1239.input │ │ │ └── dzikoysk.input │ │ └── day02.panda │ ├── day03 │ │ ├── panda.hjson │ │ ├── input │ │ │ ├── oskarr1239.input │ │ │ └── dzikoysk.input │ │ └── day03.panda │ ├── day05 │ │ ├── panda.hjson │ │ ├── day05.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day06 │ │ ├── panda.hjson │ │ ├── day06.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day07 │ │ ├── panda.hjson │ │ ├── input │ │ │ └── dzikoysk.input │ │ └── day07.panda │ ├── day08 │ │ ├── panda.hjson │ │ ├── day08.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day09 │ │ ├── panda.hjson │ │ ├── day09.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day10 │ │ ├── panda.hjson │ │ ├── input │ │ │ └── dzikoysk.input │ │ └── day10.panda │ └── day11 │ │ ├── panda.hjson │ │ ├── day11.panda │ │ └── input │ │ └── dzikoysk.input ├── sdk │ └── panda-indev-19.12.12-all.jar └── run.sh ├── 2020 ├── days │ ├── day01 │ │ ├── panda.cdn │ │ ├── day01.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day02 │ │ ├── panda.cdn │ │ └── day02.panda │ ├── day03 │ │ ├── panda.cdn │ │ ├── day03.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day04 │ │ ├── panda.cdn │ │ └── day04.panda │ ├── day05 │ │ ├── panda.cdn │ │ ├── day05.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day06 │ │ ├── panda.cdn │ │ └── day06.panda │ ├── day07 │ │ ├── panda.cdn │ │ └── day07.panda │ ├── day08 │ │ ├── panda.cdn │ │ ├── day08.panda │ │ └── input │ │ │ └── dzikoysk.input │ ├── day09 │ │ ├── panda.cdn │ │ ├── day09.panda │ │ └── input │ │ │ └── dzikoysk.input │ └── day10 │ │ ├── panda.cdn │ │ ├── input │ │ └── dzikoysk.input │ │ └── day10.panda ├── sdk │ └── panda-0.1.3-alpha-all.jar └── run.sh ├── 2021 ├── days │ ├── day01 │ │ ├── panda.cdn │ │ └── src │ │ │ └── app.panda │ ├── day02 │ │ ├── panda.cdn │ │ ├── src │ │ │ └── app.panda │ │ └── input │ │ │ └── dzikoysk.input │ └── day03 │ │ ├── panda.cdn │ │ ├── src │ │ └── app.panda │ │ └── input │ │ └── dzikoysk.input ├── sdk │ ├── panda-standalone-0.5.0-alpha-all.jar │ ├── panda-standalone-0.5.1-alpha-all.jar │ └── panda-standalone-0.5.2-alpha-all.jar └── run.sh ├── 2024 ├── days │ ├── day01 │ │ ├── run.sh │ │ ├── panda.cdn │ │ └── src │ │ │ └── app.panda │ └── day02 │ │ ├── run.sh │ │ ├── panda.cdn │ │ └── src │ │ └── app.panda ├── sdk │ └── panda-standalone-0.5.2-alpha-all.jar └── run.sh ├── .gitignore ├── .github └── FUNDING.yml ├── .gitattributes └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ### Panda ### 2 | panda_modules/ -------------------------------------------------------------------------------- /2019/days/day04/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 307237-769058 -------------------------------------------------------------------------------- /2024/days/day01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd ../../ && ./run.sh day01 dzikoysk 4 | -------------------------------------------------------------------------------- /2024/days/day02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd ../../ && ./run.sh day02 dzikoysk 4 | -------------------------------------------------------------------------------- /2021/days/day01/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day01 2 | version: 1.0.0 3 | author: dzikoysk 4 | sources: src -------------------------------------------------------------------------------- /2021/days/day02/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day02 2 | version: 1.0.0 3 | author: dzikoysk 4 | sources: src -------------------------------------------------------------------------------- /2021/days/day03/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day03 2 | version: 1.0.0 3 | author: dzikoysk 4 | sources: src -------------------------------------------------------------------------------- /2024/days/day01/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day01 2 | version: 1.0.0 3 | author: dzikoysk 4 | sources: src -------------------------------------------------------------------------------- /2024/days/day02/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day02 2 | version: 1.0.0 3 | author: dzikoysk 4 | sources: src -------------------------------------------------------------------------------- /2019/days/commons/vm/panda.hjson: -------------------------------------------------------------------------------- 1 | name: vm 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: vm.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day01/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day01 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day01.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day02/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day02 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day02.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day03/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day03 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day03.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day04/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day04 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day04.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day05/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day05 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day05.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day06/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day06 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day06.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day07/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day07 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day07.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day08/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day08 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day08.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day09/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day09 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day09.panda 7 | } -------------------------------------------------------------------------------- /2020/days/day10/panda.cdn: -------------------------------------------------------------------------------- 1 | name: day10 2 | version: 2020 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day10.panda 7 | } -------------------------------------------------------------------------------- /2020/sdk/panda-0.1.3-alpha-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzikoysk/advent-of-code/HEAD/2020/sdk/panda-0.1.3-alpha-all.jar -------------------------------------------------------------------------------- /2019/days/commons/aoc/panda.hjson: -------------------------------------------------------------------------------- 1 | name: aoc 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: utils.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day01/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day01 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day01.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day02/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day02 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day02.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day03/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day03 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day03.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day04/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day04 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day04.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day05/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day05 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day05.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day06/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day06 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day06.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day07/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day07 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day07.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day08/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day08 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day08.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day09/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day09 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day09.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day10/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day10 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day10.panda 7 | } -------------------------------------------------------------------------------- /2019/days/day11/panda.hjson: -------------------------------------------------------------------------------- 1 | name: day11 2 | version: 1.0.0 3 | owner: dzikoysk 4 | 5 | scripts: { 6 | main: day11.panda 7 | } -------------------------------------------------------------------------------- /2019/sdk/panda-indev-19.12.12-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzikoysk/advent-of-code/HEAD/2019/sdk/panda-indev-19.12.12-all.jar -------------------------------------------------------------------------------- /2020/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -jar -Dinput=./days/$1/input/$2.input "./sdk/panda-0.1.3-alpha-all.jar" "./days/$1/panda.cdn" -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: dzikoysk 4 | custom: https://panda-lang.org/support 5 | -------------------------------------------------------------------------------- /2019/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -jar -Dinput=./days/$1/input/$2.input "./sdk/panda-indev-19.12.12-all.jar" "./days/$1/panda.hjson" -------------------------------------------------------------------------------- /2021/sdk/panda-standalone-0.5.0-alpha-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzikoysk/advent-of-code/HEAD/2021/sdk/panda-standalone-0.5.0-alpha-all.jar -------------------------------------------------------------------------------- /2021/sdk/panda-standalone-0.5.1-alpha-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzikoysk/advent-of-code/HEAD/2021/sdk/panda-standalone-0.5.1-alpha-all.jar -------------------------------------------------------------------------------- /2021/sdk/panda-standalone-0.5.2-alpha-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzikoysk/advent-of-code/HEAD/2021/sdk/panda-standalone-0.5.2-alpha-all.jar -------------------------------------------------------------------------------- /2024/sdk/panda-standalone-0.5.2-alpha-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzikoysk/advent-of-code/HEAD/2024/sdk/panda-standalone-0.5.2-alpha-all.jar -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # These files are input and should be left untouched 5 | *.input binary 6 | -------------------------------------------------------------------------------- /2021/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -jar -Dinput=./days/$1/input/$2.input "./sdk/panda-standalone-0.5.2-alpha-all.jar" "./days/$1/panda.cdn" 4 | 5 | echo "" 6 | echo "---" 7 | read -p "Press any key to exit shell..." -------------------------------------------------------------------------------- /2024/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -jar -Dinput=./days/$1/input/$2.input "./sdk/panda-standalone-0.5.2-alpha-all.jar" "./days/$1/panda.cdn" 4 | 5 | echo "" 6 | echo "---" 7 | #read -p "Press any key to exit shell..." -------------------------------------------------------------------------------- /2019/days/day11/day11.panda: -------------------------------------------------------------------------------- 1 | module day11 2 | 3 | require java:collections 4 | 5 | require '../commons/aoc' 6 | require aoc 7 | 8 | require '../commons/vm' 9 | require vm 10 | 11 | main { 12 | VM vm = new VM() 13 | Long[] program = vm.toCodes(AdventOfCode.readContent()) 14 | log 'Result ' + vm.launch(program, new Long[0]) 15 | } -------------------------------------------------------------------------------- /2019/days/day02/input/oskarr1239.input: -------------------------------------------------------------------------------- 1 | 1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,10,19,1,6,19,23,1,13,23,27,1,6,27,31,1,31,10,35,1,35,6,39,1,39,13,43,2,10,43,47,1,47,6,51,2,6,51,55,1,5,55,59,2,13,59,63,2,63,9,67,1,5,67,71,2,13,71,75,1,75,5,79,1,10,79,83,2,6,83,87,2,13,87,91,1,9,91,95,1,9,95,99,2,99,9,103,1,5,103,107,2,9,107,111,1,5,111,115,1,115,2,119,1,9,119,0,99,2,0,14,0 -------------------------------------------------------------------------------- /2019/days/day02/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,6,19,1,9,19,23,1,6,23,27,1,10,27,31,1,5,31,35,2,6,35,39,1,5,39,43,1,5,43,47,2,47,6,51,1,51,5,55,1,13,55,59,2,9,59,63,1,5,63,67,2,67,9,71,1,5,71,75,2,10,75,79,1,6,79,83,1,13,83,87,1,10,87,91,1,91,5,95,2,95,10,99,2,9,99,103,1,103,6,107,1,107,10,111,2,111,10,115,1,115,6,119,2,119,9,123,1,123,6,127,2,127,10,131,1,131,6,135,2,6,135,139,1,139,5,143,1,9,143,147,1,13,147,151,1,2,151,155,1,10,155,0,99,2,14,0,0 -------------------------------------------------------------------------------- /2019/days/commons/aoc/utils.panda: -------------------------------------------------------------------------------- 1 | module aoc 2 | 3 | require java:collections 4 | 5 | export java.io.File 6 | export java.nio.file.Files 7 | export org.panda_lang.utilities.commons.FileUtils 8 | 9 | public class AdventOfCode { 10 | 11 | public static List readContentAsLines() { 12 | return Files.readAllLines(getInputFile().toPath()) 13 | } 14 | 15 | public static String readContent() { 16 | return FileUtils.getContentOfFile(getInputFile()) 17 | } 18 | 19 | local static File getInputFile() { 20 | return new File(System.getProperty("input")) 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /2019/days/day05/day05.panda: -------------------------------------------------------------------------------- 1 | module day05 2 | 3 | require '../commons/aoc' 4 | require aoc 5 | 6 | require '../commons/vm' 7 | require vm 8 | 9 | main { 10 | String[] content = AdventOfCode.readContent().split(",") 11 | Int[] intCodes = new Int[content.size()] 12 | 13 | for (mut Int point = 0; point < content.size(); point++) { 14 | intCodes[point] = Int.parseInt(content[point]) 15 | } 16 | 17 | VM vm = new VM() 18 | log 'The program produced ' + vm.launch(intCodes, true, 1, 0) + ' code' 19 | log 'Diagnostic code for system ID 5 is ' + vm.launch(intCodes, true, 5, 0) 20 | } -------------------------------------------------------------------------------- /2019/days/day09/day09.panda: -------------------------------------------------------------------------------- 1 | module day09 2 | 3 | require java:collections 4 | 5 | require '../commons/aoc' 6 | require aoc 7 | 8 | require '../commons/vm' 9 | require vm 10 | 11 | main { 12 | VM vm = new VM() 13 | Long[] program = vm.toCodes(AdventOfCode.readContent()) 14 | 15 | // Test 1 16 | // vm.launch(program, true, new Long[0]) 17 | 18 | // Test 2 19 | // vm.launch(program, false, new Long[0]) 20 | // out -> 1219070632396864 21 | 22 | // Test 3 23 | //vm.launch(program, false, new Long[0]) 24 | // out -> 1125899906842624 25 | 26 | Long[] data = new Long[1] 27 | data[0] = 1L 28 | log 'BOOST keycode is ' + vm.launch(program, data) 29 | 30 | data[0] = 2L 31 | log 'The coordinates of the distress signal are ' + vm.launch(program, data) 32 | } -------------------------------------------------------------------------------- /2019/days/day01/day01.panda: -------------------------------------------------------------------------------- 1 | module day01 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | 8 | main { 9 | List lines = Files.readAllLines(new File(System.getProperty("input")).toPath()) 10 | 11 | mut Int fuelSum = 0 12 | mut Int totalSum = 0 13 | 14 | foreach (String line : lines) { 15 | mut Int parsed = Int.parseInt(line) 16 | mut Int totalFuel = 0 17 | 18 | fuelSum = fuelSum + parsed / 3 - 2 19 | parsed = parsed / 3 - 2 20 | 21 | while parsed > 0 { 22 | totalFuel = totalFuel + parsed 23 | parsed = parsed / 3 - 2 24 | } 25 | 26 | totalSum = totalSum + totalFuel 27 | } 28 | 29 | log "Part one answer: " + fuelSum 30 | log "Part two answer: " + totalSum 31 | } 32 | -------------------------------------------------------------------------------- /2020/days/day10/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 54 2 | 91 3 | 137 4 | 156 5 | 31 6 | 70 7 | 143 8 | 51 9 | 50 10 | 18 11 | 1 12 | 149 13 | 129 14 | 151 15 | 95 16 | 148 17 | 41 18 | 144 19 | 7 20 | 125 21 | 155 22 | 14 23 | 114 24 | 108 25 | 57 26 | 118 27 | 147 28 | 24 29 | 25 30 | 73 31 | 26 32 | 8 33 | 115 34 | 44 35 | 12 36 | 47 37 | 106 38 | 120 39 | 132 40 | 121 41 | 35 42 | 105 43 | 60 44 | 9 45 | 6 46 | 65 47 | 111 48 | 133 49 | 38 50 | 138 51 | 101 52 | 126 53 | 39 54 | 78 55 | 92 56 | 53 57 | 119 58 | 136 59 | 154 60 | 140 61 | 52 62 | 15 63 | 90 64 | 30 65 | 40 66 | 64 67 | 67 68 | 139 69 | 76 70 | 32 71 | 98 72 | 113 73 | 80 74 | 13 75 | 104 76 | 86 77 | 27 78 | 61 79 | 157 80 | 79 81 | 122 82 | 59 83 | 150 84 | 89 85 | 158 86 | 107 87 | 77 88 | 112 89 | 5 90 | 83 91 | 58 92 | 21 93 | 2 94 | 66 -------------------------------------------------------------------------------- /2021/days/day01/src/app.panda: -------------------------------------------------------------------------------- 1 | require 'java' { collections } 2 | 3 | import java.io.File 4 | import java.nio.file.Files 5 | 6 | main { 7 | mut let decreased = 0 8 | mut let increased = 0 9 | let queue = new LinkedList() 10 | 11 | foreach (String line : Files.readAllLines(new File(System.getProperty("input")).toPath())) { 12 | let measurement = Int.parseInt(line) 13 | 14 | if (!queue.isEmpty() && measurement > queue.getLast() as Int) { 15 | decreased++ 16 | } 17 | 18 | queue.add(measurement) 19 | 20 | if (queue.size() == 4) { 21 | let previous = queue.get(0) as Int + queue.get(1) as Int + queue.get(2) as Int 22 | let current = queue.get(1) as Int + queue.get(2) as Int + queue.get(3) as Int 23 | queue.poll() 24 | 25 | if (current > previous) { 26 | increased++ 27 | } 28 | } 29 | } 30 | 31 | log 'Part 1: Decreased ' + decreased // 1754 32 | log 'Part 2: Increased ' + increased // 1789 33 | } -------------------------------------------------------------------------------- /2021/days/day02/src/app.panda: -------------------------------------------------------------------------------- 1 | require 'java' { collections } 2 | 3 | import java.io.File 4 | import java.nio.file.Files 5 | 6 | main { 7 | mut let horizontalPosition = 0 8 | mut let depth = 0 9 | mut let aim = 0 10 | mut let depthAim = 0 11 | 12 | foreach (String line : Files.readAllLines(new File(System.getProperty("input")).toPath())) { 13 | let entry = line.split(" ") 14 | let direction = entry.get(0) 15 | let measurement = Int.parseInt(entry.get(1)) 16 | 17 | if (direction == 'forward') { 18 | horizontalPosition = horizontalPosition + measurement 19 | depthAim = depthAim + aim * measurement 20 | } 21 | else if (direction == 'down') { 22 | depth = depth + measurement 23 | aim = aim + measurement 24 | } 25 | else if (direction == 'up') { 26 | depth = depth - measurement 27 | aim = aim - measurement 28 | } 29 | } 30 | 31 | log 'Part 1: Horizontal position x depth is ' + horizontalPosition * depth // 1936494 32 | log 'Part 1: Horizontal position x depth (aim) is ' + horizontalPosition * depthAim // 1997106066 33 | } 34 | -------------------------------------------------------------------------------- /2019/days/day07/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 3,8,1001,8,10,8,105,1,0,0,21,38,47,64,89,110,191,272,353,434,99999,3,9,101,4,9,9,102,3,9,9,101,5,9,9,4,9,99,3,9,1002,9,5,9,4,9,99,3,9,101,2,9,9,102,5,9,9,1001,9,5,9,4,9,99,3,9,1001,9,5,9,102,4,9,9,1001,9,5,9,1002,9,2,9,1001,9,3,9,4,9,99,3,9,102,2,9,9,101,4,9,9,1002,9,4,9,1001,9,4,9,4,9,99,3,9,101,1,9,9,4,9,3,9,101,1,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,101,2,9,9,4,9,3,9,101,1,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,101,2,9,9,4,9,99,3,9,101,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,101,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,102,2,9,9,4,9,99,3,9,1001,9,2,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,101,1,9,9,4,9,99,3,9,102,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,1001,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,99,3,9,101,1,9,9,4,9,3,9,102,2,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,1001,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,99 -------------------------------------------------------------------------------- /2019/days/day10/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | ..#..###....#####....###........# 2 | .##.##...#.#.......#......##....# 3 | #..#..##.#..###...##....#......## 4 | ..####...#..##...####.#.......#.# 5 | ...#.#.....##...#.####.#.###.#..# 6 | #..#..##.#.#.####.#.###.#.##..... 7 | #.##...##.....##.#......#.....##. 8 | .#..##.##.#..#....#...#...#...##. 9 | .#..#.....###.#..##.###.##....... 10 | .##...#..#####.#.#......####..... 11 | ..##.#.#.#.###..#...#.#..##.#.... 12 | .....#....#....##.####....#...... 13 | .#..##.#.........#..#......###..# 14 | #.##....#.#..#.#....#.###...#.... 15 | .##...##..#.#.#...###..#.#.#..### 16 | .#..##..##...##...#.#.#...#..#.#. 17 | .#..#..##.##...###.##.#......#... 18 | ...#.....###.....#....#..#....#.. 19 | .#...###..#......#.##.#...#.####. 20 | ....#.##...##.#...#........#.#... 21 | ..#.##....#..#.......##.##.....#. 22 | .#.#....###.#.#.#.#.#............ 23 | #....####.##....#..###.##.#.#..#. 24 | ......##....#.#.#...#...#..#..... 25 | ...#.#..####.##.#.........###..## 26 | .......#....#.##.......#.#.###... 27 | ...#..#.#.........#...###......#. 28 | .#.##.#.#.#.#........#.#.##..#... 29 | .......#.##.#...........#..#.#... 30 | .####....##..#..##.#.##.##..##... 31 | .#.#..###.#..#...#....#.###.#..#. 32 | ............#...#...#.......#.#.. 33 | .........###.#.....#..##..#.##... -------------------------------------------------------------------------------- /2019/days/day01/input/rrye.input: -------------------------------------------------------------------------------- 1 | 88093 2 | 102524 3 | 75875 4 | 62024 5 | 86072 6 | 106670 7 | 105440 8 | 51371 9 | 148951 10 | 123704 11 | 92364 12 | 50848 13 | 117125 14 | 95022 15 | 131085 16 | 129886 17 | 145084 18 | 123077 19 | 69219 20 | 84366 21 | 51344 22 | 65604 23 | 140383 24 | 53606 25 | 132685 26 | 83550 27 | 76648 28 | 120937 29 | 137498 30 | 84167 31 | 94438 32 | 54178 33 | 106306 34 | 80802 35 | 98524 36 | 70214 37 | 114108 38 | 118782 39 | 75444 40 | 76449 41 | 144233 42 | 56747 43 | 93663 44 | 137969 45 | 99981 46 | 110442 47 | 106873 48 | 93708 49 | 114085 50 | 53655 51 | 78096 52 | 137640 53 | 50775 54 | 72563 55 | 135043 56 | 146136 57 | 147244 58 | 105601 59 | 106293 60 | 63048 61 | 104864 62 | 93044 63 | 118222 64 | 107110 65 | 92725 66 | 57424 67 | 94602 68 | 87898 69 | 51668 70 | 137651 71 | 55070 72 | 67255 73 | 103823 74 | 83059 75 | 61150 76 | 82029 77 | 56060 78 | 56702 79 | 85486 80 | 114522 81 | 94121 82 | 104870 83 | 53014 84 | 111776 85 | 63615 86 | 78378 87 | 113830 88 | 80059 89 | 123427 90 | 73545 91 | 93688 92 | 122410 93 | 93174 94 | 131464 95 | 137014 96 | 114304 97 | 138703 98 | 54128 99 | 111698 100 | 84299 101 | -------------------------------------------------------------------------------- /2019/days/day01/input/oskarr1239.input: -------------------------------------------------------------------------------- 1 | 60566 2 | 53003 3 | 132271 4 | 130557 5 | 109138 6 | 64818 7 | 123247 8 | 148493 9 | 98275 10 | 67155 11 | 132365 12 | 133146 13 | 88023 14 | 92978 15 | 122790 16 | 84429 17 | 93421 18 | 76236 19 | 104387 20 | 135953 21 | 131379 22 | 125949 23 | 133614 24 | 94647 25 | 64289 26 | 87972 27 | 97331 28 | 132327 29 | 53913 30 | 79676 31 | 143110 32 | 79269 33 | 52366 34 | 62793 35 | 69437 36 | 97749 37 | 83596 38 | 147597 39 | 115883 40 | 82062 41 | 63800 42 | 61521 43 | 139314 44 | 127619 45 | 85790 46 | 132960 47 | 141289 48 | 86146 49 | 146104 50 | 128708 51 | 133054 52 | 116777 53 | 128402 54 | 85043 55 | 117344 56 | 107915 57 | 108669 58 | 108304 59 | 105300 60 | 75186 61 | 111352 62 | 112936 63 | 117177 64 | 93812 65 | 97737 66 | 61835 67 | 77529 68 | 145406 69 | 93489 70 | 75642 71 | 69806 72 | 109845 73 | 79133 74 | 60950 75 | 67797 76 | 111806 77 | 50597 78 | 50481 79 | 88338 80 | 102136 81 | 65377 82 | 55982 83 | 82754 84 | 68901 85 | 89232 86 | 63118 87 | 95534 88 | 98264 89 | 147706 90 | 80050 91 | 104953 92 | 146758 93 | 122884 94 | 122024 95 | 129236 96 | 113818 97 | 58099 98 | 134318 99 | 136312 100 | 75124 -------------------------------------------------------------------------------- /2019/days/day01/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 81893 2 | 122450 3 | 81968 4 | 135462 5 | 127082 6 | 94016 7 | 100999 8 | 88954 9 | 111500 10 | 89232 11 | 149706 12 | 70377 13 | 114053 14 | 116799 15 | 57368 16 | 117222 17 | 134050 18 | 58097 19 | 113145 20 | 67710 21 | 115082 22 | 109484 23 | 76183 24 | 87768 25 | 85164 26 | 141183 27 | 120410 28 | 85101 29 | 139190 30 | 120483 31 | 89111 32 | 122940 33 | 103010 34 | 127018 35 | 85178 36 | 73893 37 | 145037 38 | 115786 39 | 149613 40 | 122956 41 | 96325 42 | 123513 43 | 126850 44 | 124733 45 | 116615 46 | 131598 47 | 94544 48 | 94431 49 | 97681 50 | 86617 51 | 56739 52 | 104904 53 | 129964 54 | 80862 55 | 92125 56 | 127108 57 | 110565 58 | 131296 59 | 88192 60 | 81824 61 | 134198 62 | 87363 63 | 122455 64 | 123441 65 | 60907 66 | 95023 67 | 113940 68 | 98328 69 | 79989 70 | 146133 71 | 122356 72 | 70932 73 | 106379 74 | 125641 75 | 124905 76 | 89699 77 | 129133 78 | 112173 79 | 127629 80 | 135485 81 | 140068 82 | 95229 83 | 141276 84 | 109807 85 | 69951 86 | 100792 87 | 62683 88 | 145565 89 | 149063 90 | 99523 91 | 88881 92 | 64337 93 | 145012 94 | 142380 95 | 60028 96 | 131565 97 | 53041 98 | 88489 99 | 81712 100 | 132728 -------------------------------------------------------------------------------- /2020/days/day06/day06.panda: -------------------------------------------------------------------------------- 1 | module day06 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.FileUtils 8 | import java.lang.Math 9 | 10 | main { 11 | // Requires file in CRLF format 12 | String lineSeparator = System.lineSeparator() 13 | String[] groups = FileUtils.getContentOfFile(new File(System.getProperty("input"))).split(lineSeparator + lineSeparator) 14 | 15 | mut Int sum = 0 16 | mut Int unanimousSum = 0 17 | 18 | foreach (String group : groups) { 19 | HashMap answers = new HashMap() 20 | Int groupSize = group.split(lineSeparator).size() 21 | 22 | foreach (Char question : group.replace(lineSeparator, '').trim().toCharArray()) { 23 | mut nil Int cachedAnswer = answers.get(question) 24 | 25 | if cachedAnswer == null { 26 | cachedAnswer = 0 27 | } 28 | 29 | cachedAnswer++ 30 | answers.put(question, cachedAnswer) 31 | } 32 | 33 | sum = sum + answers.size() 34 | 35 | foreach (Int cachedAnswer : answers.values()) { 36 | if cachedAnswer == groupSize { 37 | unanimousSum++ 38 | } 39 | } 40 | } 41 | 42 | log 'Part one: ' + sum // 6504 43 | log 'Part two: ' + unanimousSum // 3351 44 | } -------------------------------------------------------------------------------- /2020/days/day10/day10.panda: -------------------------------------------------------------------------------- 1 | module day10 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.FileUtils 8 | import org.panda_lang.utilities.commons.StringUtils 9 | import org.panda_lang.utilities.commons.collection.Pair 10 | import org.panda_lang.utilities.commons.function.Result 11 | import java.lang.Math 12 | 13 | main { 14 | List source = Files.readAllLines(new File(System.getProperty("input")).toPath()) 15 | 16 | for (mut Int index = 0; index < source.size(); index++) { 17 | source.set(index, Int.parseInt(source.get(index).toString()) as Int) 18 | } 19 | 20 | mut Int rating = 0 21 | mut Int oneDiff = 0 22 | mut Int twoDiff = 0 23 | mut Int threeDiff = 0 24 | 25 | while true { 26 | if source.indexOf(++rating) != -1 { 27 | oneDiff++ 28 | // log 'A', rating, oneDiff 29 | continue 30 | } 31 | 32 | if source.indexOf(++rating) != -1 { 33 | twoDiff++ 34 | // log 'B', rating, twoDiff 35 | continue 36 | } 37 | 38 | if source.indexOf(++rating) != -1 { 39 | threeDiff++ 40 | // log 'C', rating, threeDiff 41 | continue 42 | } 43 | 44 | threeDiff++ 45 | break 46 | } 47 | 48 | // log rating, oneDiff, twoDiff, threeDiff 49 | log 'Part one: ' + (oneDiff * threeDiff) 50 | } 51 | -------------------------------------------------------------------------------- /2020/days/day03/day03.panda: -------------------------------------------------------------------------------- 1 | module day03 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.StringUtils 8 | 9 | main { 10 | List report = Files.readAllLines(new File(System.getProperty("input")).toPath()) 11 | 12 | Bagno bagno = new Bagno(report) 13 | log 'Part one: ' + bagno.countTrees(3, 1) 14 | log 'Part two: ' + (1L * bagno.countTrees(1, 1) * bagno.countTrees(3, 1) * bagno.countTrees(5, 1) * bagno.countTrees(7, 1) * bagno.countTrees(1, 2)) 15 | } 16 | 17 | type ExtraMath { 18 | 19 | open static modulo (Int num, Int divisor) -> Int { 20 | return (num - divisor * (num / divisor)) 21 | } 22 | 23 | } 24 | 25 | type Bagno { 26 | 27 | internal List report 28 | 29 | constructor (List report) { 30 | this.report = report 31 | } 32 | 33 | open countTrees (Int right, Int down) -> Int { 34 | Int patternWidth = (report.get(0) as String).length() 35 | Int patternHeight = report.size() 36 | 37 | mut Int trees = 0 38 | mut Int x = right 39 | 40 | for (mut Int y = down; y < patternHeight; y = y + down) { 41 | Char currentPosition = (report.get(y) as String).charAt(ExtraMath.modulo(x, patternWidth)) 42 | 43 | if ((currentPosition + '') == '#') { 44 | trees++ 45 | } 46 | 47 | x = x + right 48 | } 49 | 50 | return trees 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /2024/days/day01/src/app.panda: -------------------------------------------------------------------------------- 1 | require 'java' { collections } 2 | 3 | import java.io.File 4 | import java.nio.file.Files 5 | import java.lang.Math 6 | 7 | main { 8 | List input = Files.readAllLines(new File(System.getProperty("input")).toPath()) 9 | 10 | let left = new ArrayList() 11 | let right = new ArrayList() 12 | 13 | foreach (String line : input) { 14 | let values = line.split(' ') 15 | 16 | let leftValue = Int.parseInt(values.get(0)) 17 | left.add(leftValue) 18 | 19 | let rightValue = Int.parseInt(values.get(1)) 20 | right.add(rightValue) 21 | } 22 | 23 | // -- Part 1 24 | 25 | Collections.sort(left) 26 | Collections.sort(right) 27 | 28 | mut Int totalDifference = 0 29 | 30 | for (mut Int index = 0; index < input.size(); index++) { 31 | Int leftValue = left.get(index) as Int 32 | Int rightValue = right.get(index) as Int 33 | totalDifference = totalDifference + Math.abs(leftValue - rightValue) as Int 34 | } 35 | 36 | log 'Part 1: Distance ' + totalDifference // 2742123 37 | 38 | // -- Part 2 39 | 40 | mut Int similarityScore = 0 41 | 42 | foreach (Int value : left as List) { 43 | mut let count = 0 44 | 45 | foreach (Int occurrence : right as List) { 46 | if (value == occurrence) { 47 | count++ 48 | } 49 | } 50 | 51 | similarityScore = similarityScore + (value * count) 52 | } 53 | 54 | log 'Part 2: Similarity ' + similarityScore // 2742123 55 | } -------------------------------------------------------------------------------- /2019/days/day04/day04.panda: -------------------------------------------------------------------------------- 1 | module day04 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.util.Arrays 7 | import org.panda_lang.utilities.commons.FileUtils 8 | 9 | main { 10 | String[] range = FileUtils.getContentOfFile(new File(System.getProperty("input"))).split("-") 11 | Int minimum = Int.parseInt(range[0]) 12 | Int maximum = Int.parseInt(range[1]) 13 | 14 | mut Int count = 0 15 | mut Int elfCount = 0 16 | 17 | for (mut Int int = minimum; int < maximum; int++) { 18 | String value = int.toString() 19 | PrimitiveChar[] numbers = value.toCharArray() 20 | Arrays.sort(numbers) 21 | String sorted = new String(numbers) 22 | 23 | if sorted != value { 24 | continue 25 | } 26 | 27 | Map chars = new HashMap() 28 | 29 | foreach (PrimitiveChar char : numbers) { 30 | mut nil Int amount = chars.get(char) as Int 31 | 32 | if amount == null { 33 | amount = 1 34 | } 35 | else { 36 | amount = amount + 1 37 | } 38 | 39 | chars.put(char, amount) 40 | } 41 | 42 | mut Bool default = false 43 | mut Bool elf = false 44 | 45 | foreach (Entry entry : chars.entrySet()) { 46 | Int amount = entry.getValue() as Int 47 | 48 | if amount > 1 { 49 | default = true 50 | } 51 | 52 | if amount == 2 { 53 | elf = true 54 | } 55 | } 56 | 57 | if default { 58 | count++ 59 | } 60 | 61 | if elf { 62 | elfCount++ 63 | } 64 | } 65 | 66 | log 'Count: ' + count 67 | log 'Elf count: ' + elfCount 68 | } -------------------------------------------------------------------------------- /2019/days/day02/day02.panda: -------------------------------------------------------------------------------- 1 | module day02 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | 8 | main { 9 | String content = Files.readAllLines(new File(System.getProperty("input")).toPath()).get(0) as String 10 | String[] split = content.split(",") 11 | Int[] intCodes = new Int[split.size()] 12 | 13 | for (mut Int point = 0; point < split.size(); point++) { 14 | intCodes[point] = Int.parseInt(split[point]) 15 | } 16 | 17 | log "Part one answer: " + Executor.execute(12, 2, intCodes) 18 | 19 | for (mut Int x = 0; x < 99; x++) { 20 | for (mut Int y = 0; y < 99; y++) { 21 | Int output = Executor.execute(x, y, intCodes) 22 | 23 | if output == 19690720 { 24 | log "Part two answer: " + (100 * x + y) 25 | return 26 | } 27 | } 28 | } 29 | } 30 | 31 | local class Executor { 32 | local static Int execute(Int firstPoint, Int secondPoint, Int[] codes) { 33 | Int[] intCodes = Arrays.copyOf(codes, codes.size()) as Int[] 34 | intCodes[1] = firstPoint 35 | intCodes[2] = secondPoint 36 | 37 | mut Int pointer = 0 38 | 39 | while pointer < intCodes.size() { 40 | if intCodes[pointer] == 1 { 41 | intCodes[intCodes[pointer + 3]] = intCodes[intCodes[pointer + 1]] + intCodes[intCodes[pointer + 2]] 42 | pointer = pointer + 4 43 | } 44 | else if intCodes[pointer] == 2 { 45 | intCodes[intCodes[pointer + 3]] = intCodes[intCodes[pointer + 1]] * intCodes[intCodes[pointer + 2]] 46 | pointer = pointer + 4 47 | } 48 | else if intCodes[pointer] == 99 { 49 | return intCodes[0] 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /2020/days/day07/day07.panda: -------------------------------------------------------------------------------- 1 | module day07 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.FileUtils 8 | import org.panda_lang.utilities.commons.StringUtils 9 | 10 | main { 11 | List rules = Files.readAllLines(new File(System.getProperty("input")).toPath()) 12 | Map relations = new HashMap() 13 | 14 | foreach (String rule : rules) { 15 | String[] entry = rule.replace('bags', 'bag').replace(' bag', '').replace('.', '').split(' contain ') 16 | relations.put(entry[0].trim(), entry[1].trim()) 17 | } 18 | 19 | log 'Part one: ' + BagsFinder.findIn(relations, new HashSet(), 'shiny gold').size() // 226 20 | log 'Part two: ' + BagsFinder.countContent(relations, 'shiny gold') // 9569 21 | } 22 | 23 | type BagsFinder { 24 | 25 | open static findIn (Map relations, HashSet result, String bag) -> HashSet { 26 | foreach (Entry entry : relations.entrySet()) { 27 | if (entry.getValue().toString().contains(bag)) { 28 | result.add(entry.getKey()) 29 | findIn(relations, result, entry.getKey() as String) 30 | } 31 | } 32 | 33 | return result 34 | } 35 | 36 | open static countContent (Map relations, String bag) -> Int { 37 | String contentValue = relations.get(bag) as String 38 | 39 | if contentValue.contains('no other') { 40 | return 0 41 | } 42 | 43 | String[] content = contentValue.split(', ') 44 | mut Int count = 0 45 | 46 | foreach (String element : content) { 47 | String[] record = StringUtils.splitFirst(element, ' ') 48 | Int amount = Int.parseInt(record[0].trim()) 49 | count = count + amount + (amount * countContent(relations, record[1].trim())) 50 | } 51 | 52 | return count 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /2020/days/day01/day01.panda: -------------------------------------------------------------------------------- 1 | module day01 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.FileUtils 8 | 9 | main { 10 | List report = Files.readAllLines(new File(System.getProperty("input")).toPath()) 11 | 12 | // imagine having streams D: 13 | 14 | for (mut Int index = 0; index < report.size(); index++) { 15 | report.set(index, Long.parseLong(report.get(index).toString()) as Object) 16 | } 17 | 18 | log "Part one: " + ReportAnalyzer.process(report, 2) // 538464 19 | log "Part two: " + ReportAnalyzer.process(report, 3) // 278783190 20 | } 21 | 22 | type ReportAnalyzer { 23 | 24 | open static process (List report, Int criteria) -> Long { 25 | HashSet entries = process(report, criteria, new HashSet(), new Stack(), -1) 26 | mut Long result = 1 27 | 28 | foreach (Long entry : entries) { 29 | result = result * entry 30 | } 31 | 32 | return result 33 | } 34 | 35 | open static process (List report, Int criteria, HashSet entries, Stack numbers, Int index) -> HashSet { 36 | for (mut Int subIndex = index + 1; (subIndex < report.size()) && entries.isEmpty(); subIndex++) { 37 | numbers.push(report.get(subIndex)) 38 | 39 | if numbers.size() < criteria { 40 | process(report, criteria, entries, numbers, index + 1) 41 | numbers.pop() 42 | continue 43 | } 44 | 45 | mut Long sum = 0 46 | 47 | foreach (Long value : numbers) { 48 | sum = sum + value 49 | } 50 | 51 | if sum == 2020L /* Workaround bug causing comparison issues between longs and ints */ { 52 | entries.addAll(numbers) 53 | } 54 | 55 | numbers.pop() 56 | } 57 | 58 | return entries 59 | } 60 | 61 | } -------------------------------------------------------------------------------- /2019/days/day11/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 3,8,1005,8,314,1106,0,11,0,0,0,104,1,104,0,3,8,1002,8,-1,10,1001,10,1,10,4,10,108,1,8,10,4,10,1002,8,1,28,2,2,16,10,1,1108,7,10,1006,0,10,1,5,14,10,3,8,102,-1,8,10,101,1,10,10,4,10,108,1,8,10,4,10,102,1,8,65,1006,0,59,2,109,1,10,1006,0,51,2,1003,12,10,3,8,102,-1,8,10,1001,10,1,10,4,10,108,1,8,10,4,10,1001,8,0,101,1006,0,34,1,1106,0,10,1,1101,17,10,3,8,102,-1,8,10,101,1,10,10,4,10,1008,8,0,10,4,10,1001,8,0,135,3,8,1002,8,-1,10,101,1,10,10,4,10,108,0,8,10,4,10,1001,8,0,156,3,8,1002,8,-1,10,101,1,10,10,4,10,108,0,8,10,4,10,1001,8,0,178,1,108,19,10,3,8,102,-1,8,10,101,1,10,10,4,10,108,0,8,10,4,10,1002,8,1,204,1,1006,17,10,3,8,102,-1,8,10,101,1,10,10,4,10,108,1,8,10,4,10,102,1,8,230,1006,0,67,1,103,11,10,1,1009,19,10,1,109,10,10,3,8,102,-1,8,10,101,1,10,10,4,10,1008,8,0,10,4,10,101,0,8,268,3,8,102,-1,8,10,101,1,10,10,4,10,1008,8,1,10,4,10,1002,8,1,290,2,108,13,10,101,1,9,9,1007,9,989,10,1005,10,15,99,109,636,104,0,104,1,21101,48210224024,0,1,21101,0,331,0,1105,1,435,21101,0,937264165644,1,21101,0,342,0,1105,1,435,3,10,104,0,104,1,3,10,104,0,104,0,3,10,104,0,104,1,3,10,104,0,104,1,3,10,104,0,104,0,3,10,104,0,104,1,21101,235354025051,0,1,21101,389,0,0,1105,1,435,21102,29166169280,1,1,21102,400,1,0,1105,1,435,3,10,104,0,104,0,3,10,104,0,104,0,21102,709475849060,1,1,21102,1,423,0,1106,0,435,21102,868498428684,1,1,21101,434,0,0,1105,1,435,99,109,2,21201,-1,0,1,21101,0,40,2,21102,1,466,3,21101,456,0,0,1105,1,499,109,-2,2105,1,0,0,1,0,0,1,109,2,3,10,204,-1,1001,461,462,477,4,0,1001,461,1,461,108,4,461,10,1006,10,493,1101,0,0,461,109,-2,2106,0,0,0,109,4,2102,1,-1,498,1207,-3,0,10,1006,10,516,21102,1,0,-3,21201,-3,0,1,21201,-2,0,2,21102,1,1,3,21102,535,1,0,1106,0,540,109,-4,2106,0,0,109,5,1207,-3,1,10,1006,10,563,2207,-4,-2,10,1006,10,563,21202,-4,1,-4,1106,0,631,21201,-4,0,1,21201,-3,-1,2,21202,-2,2,3,21101,582,0,0,1105,1,540,22102,1,1,-4,21102,1,1,-1,2207,-4,-2,10,1006,10,601,21101,0,0,-1,22202,-2,-1,-2,2107,0,-3,10,1006,10,623,22102,1,-1,1,21101,623,0,0,105,1,498,21202,-2,-1,-2,22201,-4,-2,-4,109,-5,2105,1,0 -------------------------------------------------------------------------------- /2019/days/day06/day06.panda: -------------------------------------------------------------------------------- 1 | module day06 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.collection.Node 8 | 9 | main { 10 | List mapOfLocalOrbits = Files.readAllLines(new File(System.getProperty("input")).toPath()) 11 | 12 | Map orbits = new HashMap() 13 | Node com = new Node('COM') 14 | orbits.put(com.getElement(), com) 15 | 16 | foreach (String entry : mapOfLocalOrbits) { 17 | String[] values = entry.split("\)") 18 | 19 | Node object = UniversalOrbitMap.computeIfAbsent(orbits, values[0]) 20 | Node around = UniversalOrbitMap.computeIfAbsent(orbits, values[1]) 21 | 22 | object.add(around) 23 | } 24 | 25 | log 'Total number of direct and indirect orbits is ' + UniversalOrbitMap.count(com, 0) 26 | log 'The minimum number of orbital transfers required to move is ' + UniversalOrbitMap.transfer(com) 27 | } 28 | 29 | local class UniversalOrbitMap { 30 | local static Int count(Node node, Int level) { 31 | mut Int count = level 32 | 33 | foreach (Node child : node.getChildren()) { 34 | count = count + UniversalOrbitMap.count(child, level + 1) 35 | } 36 | 37 | return count 38 | } 39 | 40 | local static Int transfer(Node com) { 41 | nil List you = com.trace('YOU') 42 | nil List san = com.trace('SAN') 43 | 44 | if you == null || san == null { 45 | return 0-1 46 | } 47 | 48 | mut Int commonIndex = 0 49 | 50 | for (;; commonIndex++) { 51 | if you.get(commonIndex) == san.get(commonIndex) { 52 | continue 53 | } 54 | 55 | break 56 | } 57 | 58 | return (you.size() - commonIndex) + (san.size() - commonIndex) 59 | } 60 | 61 | local static Node computeIfAbsent(Map orbits, String name) { 62 | nil mut Node node = orbits.get(name) as Node 63 | 64 | if node == null { 65 | node = new Node(name) 66 | orbits.put(name, node) 67 | } 68 | 69 | return node 70 | } 71 | } -------------------------------------------------------------------------------- /2020/days/day05/day05.panda: -------------------------------------------------------------------------------- 1 | module day05 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.FileUtils 8 | import java.lang.Math 9 | 10 | main { 11 | List report = Files.readAllLines(new File(System.getProperty("input")).toPath()) 12 | Int seatsLength = 128 13 | Int seatsWidth = 8 14 | 15 | mut Int max = -1 16 | mut Int seats = seatsLength * seatsWidth 17 | List ids = new ArrayList(seats) 18 | 19 | foreach (String seatLocation : report) { 20 | mut Int minX = 0 21 | mut Int maxX = seatsLength - 1 22 | mut Int minY = 0 23 | mut Int maxY = seatsWidth - 1 24 | 25 | for (mut Int index = 0; index < 10; index++) { 26 | String direction = seatLocation.charAt(index) + '' 27 | 28 | if direction == 'F' { 29 | maxX = maxX - ExtraMath.ceil((maxX - minX) / 2.0) 30 | } 31 | else if direction == 'B' { 32 | minX = minX + ExtraMath.ceil((maxX - minX) / 2.0) 33 | } 34 | else if direction == 'L' { 35 | maxY = maxY - ExtraMath.ceil((maxY - minY) / 2.0) 36 | } 37 | else if direction == 'R' { 38 | minY = minY + ExtraMath.ceil((maxY - minY) / 2.0) 39 | } 40 | 41 | // log minX + '-' + maxX, minY + '-' + maxY 42 | } 43 | 44 | Int id = maxX * 8 + maxY 45 | ids.add(id) 46 | max = Math.max(max, id) 47 | } 48 | 49 | log 'Part one: ' + max 50 | 51 | for (mut Int seat = 1; seat < (seats - 2); seat++) { 52 | // Bug detected - Negation wraps all further expressions and inverts them 53 | // ~ https://github.com/panda-lang/panda/issues/593 54 | if ids.contains(seat) && (!ids.contains(seat + 1)) && ids.contains(seat + 2) { 55 | log 'Part two: ' + (seat + 1) 56 | break 57 | } 58 | } 59 | } 60 | 61 | type ExtraMath { 62 | 63 | open static ceil (Double value) -> Int { 64 | return (Math.ceil(value) as Double).intValue() 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /2020/days/day01/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 1583 2 | 1295 3 | 1747 4 | 1628 5 | 1756 6 | 1992 7 | 1984 8 | 1990 9 | 2006 10 | 1626 11 | 1292 12 | 1561 13 | 1697 14 | 1249 15 | 2001 16 | 1822 17 | 1715 18 | 1951 19 | 1600 20 | 1615 21 | 1769 22 | 1825 23 | 1335 24 | 1987 25 | 1745 26 | 1660 27 | 1952 28 | 1437 29 | 1348 30 | 1968 31 | 615 32 | 1847 33 | 476 34 | 1346 35 | 1357 36 | 1838 37 | 1955 38 | 1750 39 | 1831 40 | 2003 41 | 1730 42 | 1696 43 | 1257 44 | 1581 45 | 866 46 | 1765 47 | 1691 48 | 1995 49 | 1977 50 | 1988 51 | 1713 52 | 1599 53 | 1300 54 | 1892 55 | 1550 56 | 2002 57 | 1694 58 | 1930 59 | 1998 60 | 1564 61 | 1704 62 | 1398 63 | 864 64 | 1480 65 | 1578 66 | 1946 67 | 1850 68 | 1964 69 | 1914 70 | 1860 71 | 1979 72 | 1857 73 | 1969 74 | 1675 75 | 1967 76 | 2009 77 | 1950 78 | 1834 79 | 783 80 | 1935 81 | 1963 82 | 1659 83 | 1314 84 | 1647 85 | 1671 86 | 1706 87 | 1734 88 | 1965 89 | 1666 90 | 316 91 | 1657 92 | 1663 93 | 1373 94 | 1719 95 | 1778 96 | 1559 97 | 1869 98 | 1958 99 | 1986 100 | 1845 101 | 1643 102 | 1783 103 | 1670 104 | 1445 105 | 1758 106 | 2008 107 | 1680 108 | 1251 109 | 1982 110 | 1420 111 | 1621 112 | 1997 113 | 1785 114 | 1994 115 | 1376 116 | 1944 117 | 1771 118 | 1844 119 | 96 120 | 467 121 | 1954 122 | 903 123 | 1368 124 | 1305 125 | 1589 126 | 1970 127 | 1980 128 | 1521 129 | 1775 130 | 1629 131 | 1796 132 | 1985 133 | 1957 134 | 1669 135 | 1637 136 | 1606 137 | 1766 138 | 1972 139 | 1956 140 | 1685 141 | 1235 142 | 58 143 | 1996 144 | 1959 145 | 1788 146 | 1273 147 | 1378 148 | 1233 149 | 1470 150 | 1584 151 | 1741 152 | 1327 153 | 1763 154 | 1989 155 | 1665 156 | 1667 157 | 1975 158 | 1862 159 | 1791 160 | 1229 161 | 1873 162 | 1761 163 | 1754 164 | 1882 165 | 1642 166 | 1971 167 | 1777 168 | 1580 169 | 1648 170 | 1678 171 | 1266 172 | 1645 173 | 502 174 | 1717 175 | 1723 176 | 1244 177 | 1370 178 | 1898 179 | 1755 180 | 1708 181 | 1983 182 | 1901 183 | 844 184 | 1239 185 | 1290 186 | 1879 187 | 1656 188 | 1966 189 | 1929 190 | 1993 191 | 1743 192 | 1909 193 | 1451 194 | 2000 195 | 1978 196 | 1938 197 | 1707 198 | 1337 199 | 1362 200 | 1263 -------------------------------------------------------------------------------- /2024/days/day02/src/app.panda: -------------------------------------------------------------------------------- 1 | require 'java' { collections } 2 | 3 | import java.io.File 4 | import java.nio.file.Files 5 | import java.lang.Math 6 | 7 | main { 8 | List input = Files.readAllLines(new File(System.getProperty("input")).toPath()) 9 | 10 | // -- Part 1 11 | mut Int safeCount = 0 12 | 13 | foreach (String line : input) { 14 | if (ReportAnalyzer.isSafe(line.split(' ').toList())) { 15 | safeCount++ 16 | } 17 | } 18 | 19 | log 'Part 1: Safe ' + safeCount // 442 20 | 21 | // -- Part 2 22 | mut Int safeWithFixedCount = 0 23 | 24 | foreach (String line : input) { 25 | if (ReportAnalyzer.isSafe(line.split(' ').toList())) { 26 | safeWithFixedCount++ 27 | } else if (ReportAnalyzer.isSafeWithFixes(line.split(' ').toList())) { 28 | safeWithFixedCount++ 29 | } 30 | } 31 | 32 | log 'Part 2: Safe (with fixes) ' + safeWithFixedCount // 493 33 | } 34 | 35 | shared type ReportAnalyzer { 36 | shared static isSafe(List values) -> Bool { 37 | mut nil Int previous = Java.null() 38 | mut nil Int progression = Java.null() 39 | 40 | foreach (String value : values) { 41 | if (value == Java.null()) { 42 | continue 43 | } 44 | 45 | let number = Int.parseInt(value) 46 | 47 | if (previous != Java.null()) { 48 | if (progression == Java.null()) { 49 | progression = previous - number 50 | } else { 51 | let currentProgression = previous - number 52 | 53 | if ((progression * currentProgression) < 0) { 54 | return false 55 | } 56 | 57 | progression = currentProgression 58 | } 59 | 60 | if (!(Math.abs(progression) > 0 && Math.abs(progression) < 4)) { 61 | return false 62 | } 63 | } 64 | 65 | previous = number 66 | } 67 | 68 | return true 69 | } 70 | 71 | shared static isSafeWithFixes(List values) -> Bool { 72 | for (mut Int index = 0; index < values.size(); index++) { 73 | let copy = new ArrayList(values) 74 | copy.set(index, Java.null()) 75 | 76 | if (ReportAnalyzer.isSafe(copy)) { 77 | return true 78 | } 79 | } 80 | return false 81 | } 82 | } -------------------------------------------------------------------------------- /2019/days/day05/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 3,225,1,225,6,6,1100,1,238,225,104,0,1,191,196,224,1001,224,-85,224,4,224,1002,223,8,223,1001,224,4,224,1,223,224,223,1101,45,50,225,1102,61,82,225,101,44,39,224,101,-105,224,224,4,224,102,8,223,223,101,5,224,224,1,224,223,223,102,14,187,224,101,-784,224,224,4,224,102,8,223,223,101,7,224,224,1,224,223,223,1001,184,31,224,1001,224,-118,224,4,224,102,8,223,223,1001,224,2,224,1,223,224,223,1102,91,18,225,2,35,110,224,101,-810,224,224,4,224,102,8,223,223,101,3,224,224,1,223,224,223,1101,76,71,224,1001,224,-147,224,4,224,102,8,223,223,101,2,224,224,1,224,223,223,1101,7,16,225,1102,71,76,224,101,-5396,224,224,4,224,1002,223,8,223,101,5,224,224,1,224,223,223,1101,72,87,225,1101,56,77,225,1102,70,31,225,1102,29,15,225,1002,158,14,224,1001,224,-224,224,4,224,102,8,223,223,101,1,224,224,1,223,224,223,4,223,99,0,0,0,677,0,0,0,0,0,0,0,0,0,0,0,1105,0,99999,1105,227,247,1105,1,99999,1005,227,99999,1005,0,256,1105,1,99999,1106,227,99999,1106,0,265,1105,1,99999,1006,0,99999,1006,227,274,1105,1,99999,1105,1,280,1105,1,99999,1,225,225,225,1101,294,0,0,105,1,0,1105,1,99999,1106,0,300,1105,1,99999,1,225,225,225,1101,314,0,0,106,0,0,1105,1,99999,1007,226,226,224,1002,223,2,223,1006,224,329,1001,223,1,223,8,226,677,224,1002,223,2,223,1005,224,344,1001,223,1,223,107,226,677,224,1002,223,2,223,1006,224,359,1001,223,1,223,8,677,677,224,1002,223,2,223,1005,224,374,1001,223,1,223,1108,226,226,224,1002,223,2,223,1005,224,389,1001,223,1,223,7,677,226,224,1002,223,2,223,1005,224,404,101,1,223,223,7,226,226,224,102,2,223,223,1006,224,419,1001,223,1,223,1108,226,677,224,102,2,223,223,1005,224,434,1001,223,1,223,1107,226,226,224,1002,223,2,223,1006,224,449,1001,223,1,223,1007,677,677,224,102,2,223,223,1006,224,464,1001,223,1,223,107,226,226,224,1002,223,2,223,1005,224,479,101,1,223,223,1107,677,226,224,1002,223,2,223,1005,224,494,1001,223,1,223,1008,677,677,224,102,2,223,223,1005,224,509,101,1,223,223,107,677,677,224,102,2,223,223,1005,224,524,1001,223,1,223,1108,677,226,224,1002,223,2,223,1005,224,539,1001,223,1,223,7,226,677,224,102,2,223,223,1006,224,554,1001,223,1,223,8,677,226,224,1002,223,2,223,1006,224,569,101,1,223,223,108,226,226,224,1002,223,2,223,1006,224,584,1001,223,1,223,1107,226,677,224,1002,223,2,223,1006,224,599,101,1,223,223,1008,226,226,224,102,2,223,223,1005,224,614,1001,223,1,223,1007,226,677,224,1002,223,2,223,1006,224,629,1001,223,1,223,108,677,226,224,102,2,223,223,1005,224,644,101,1,223,223,1008,226,677,224,1002,223,2,223,1005,224,659,101,1,223,223,108,677,677,224,1002,223,2,223,1006,224,674,1001,223,1,223,4,223,99,226 -------------------------------------------------------------------------------- /2020/days/day02/day02.panda: -------------------------------------------------------------------------------- 1 | module day02 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.StringUtils 8 | 9 | main { 10 | List report = Files.readAllLines(new File(System.getProperty("input")).toPath()) 11 | 12 | log "Part one: " + PasswordValidator.validate(report, PasswordValidator.SLED_RENTAL) 13 | log "Part two: " + PasswordValidator.validate(report, PasswordValidator.TOBOGGAN) 14 | } 15 | 16 | type PasswordValidator { 17 | 18 | open static String SLED_RENTAL = 'sled-rental-policy' 19 | open static String TOBOGGAN = 'toboggan-policy' 20 | 21 | open static validate (List report, String policy) -> Int { 22 | mut Int valid = 0 23 | 24 | foreach (String passwordPolicy : report) { 25 | if (policy == SLED_RENTAL && PasswordValidator.'validate sled-rental'(passwordPolicy)) { 26 | valid++ 27 | } 28 | 29 | if (policy == TOBOGGAN && PasswordValidator.'validate toboggan'(passwordPolicy)) { 30 | valid++ 31 | } 32 | } 33 | 34 | return valid 35 | } 36 | 37 | open static 'validate sled-rental' (String passwordPolicy) -> Bool { 38 | String[] elements = passwordPolicy.split(' ') 39 | 40 | String occurrencePolicy = elements[0] 41 | String[] occurrencePolicyElements = occurrencePolicy.split('-') 42 | Int minimum = Int.parseInt(occurrencePolicyElements[0]) 43 | Int maximum = Int.parseInt(occurrencePolicyElements[1]) 44 | 45 | String selectedLetter = elements[1].substring(0, 1) 46 | String password = elements[2] 47 | Int occurrences = StringUtils.countOccurrences(password, selectedLetter) 48 | 49 | return occurrences >= minimum && occurrences <= maximum 50 | } 51 | 52 | open static 'validate toboggan' (String passwordPolicy) -> Bool { 53 | String[] elements = passwordPolicy.split(' ') 54 | 55 | String positionPolicy = elements[0] 56 | String[] positionPolicyElements = positionPolicy.split('-') 57 | Int first = Int.parseInt(positionPolicyElements[0]) - 1 58 | Int second = Int.parseInt(positionPolicyElements[1]) - 1 59 | 60 | String selectedLetter = elements[1].substring(0, 1) 61 | String password = elements[2] 62 | 63 | Bool firstOccurrence = selectedLetter == (password.charAt(first) + '') 64 | Bool secondOccurrence = selectedLetter == (password.charAt(second) + '') 65 | 66 | return (firstOccurrence || secondOccurrence) && (firstOccurrence != secondOccurrence) 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /2020/days/day04/day04.panda: -------------------------------------------------------------------------------- 1 | module day04 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.StringUtils 8 | import org.panda_lang.utilities.commons.FileUtils 9 | 10 | main { 11 | // Requires file in CRLF format 12 | String lineSeparator = System.lineSeparator() 13 | String[] passports = FileUtils.getContentOfFile(new File(System.getProperty("input"))).split(lineSeparator + lineSeparator) 14 | 15 | log 'Part one: ' + PassportAnalyzer.validate(passports, lineSeparator, false) 16 | log 'Part two: ' + PassportAnalyzer.validate(passports, lineSeparator, true) 17 | } 18 | 19 | type PassportAnalyzer { 20 | 21 | open static validate (String[] passports, String separator, Bool validateFields) -> Int { 22 | mut Int valid = 0 23 | 24 | foreach (String passportData : passports) { 25 | Map passport = new HashMap() 26 | 27 | String[] fields = passportData.replace(' ', separator).split(separator) 28 | Int count = fields.size() 29 | 30 | if (count == 8 || (count == 7 && !passportData.contains('cid'))) { 31 | if (!validateFields) { 32 | valid++ 33 | continue 34 | } 35 | 36 | // Map passport data 37 | 38 | foreach (String field : fields) { 39 | String[] entry = field.split(':') 40 | passport.put(entry[0], entry[1]) 41 | } 42 | 43 | // Validate passport fields 44 | 45 | Bool byr = (passport.get('byr') as String).matches('(^19[2-9][0-9]|^200[0-2])') // between 1920 - 2002 46 | Bool iyr = (passport.get('iyr') as String).matches('^20(1[0-9]|20)') // between 2010 - 2020 47 | Bool eyr = (passport.get('eyr') as String).matches('^20(2[0-9]|30)') // between 2020 - 2030 48 | Bool hgt = (passport.get('hgt') as String).matches('(^1([5-8][0-9]|[9][0-3])cm|(59|6[0-9]|7[0-6])in)') // between 150 - 193cm or 59 - 76in 49 | Bool hcl = (passport.get('hcl') as String).matches('^#[a-fA-F0-9]{6}') // hex color code 50 | Bool ecl = (passport.get('ecl') as String).matches('(amb|blu|brn|gry|grn|hzl|oth)') // matches eye color 51 | Bool pid = (passport.get('pid') as String).matches('[0-9]{9}') // nine-digit id 52 | 53 | if byr && iyr && eyr && hgt && hcl && ecl && pid { 54 | valid++ 55 | } 56 | } 57 | } 58 | 59 | return valid 60 | } 61 | 62 | } -------------------------------------------------------------------------------- /2019/days/day07/day07.panda: -------------------------------------------------------------------------------- 1 | module day07 2 | 3 | require java:collections 4 | 5 | require '../commons/aoc' 6 | require aoc 7 | 8 | require '../commons/vm' 9 | require vm 10 | 11 | main { 12 | Int[] intCodes = VMUtils.toIntCodes(AdventOfCode.readContent()) 13 | 14 | VM vm = new VM() 15 | Amplifiers amplifiers = new Amplifiers(vm) 16 | 17 | // log amplifiers.run(intCodes, 4, 3, 2, 1, 0) 18 | //log amplifiers.run(intCodes, 0, 1, 2, 3, 4) 19 | // log amplifiers.run(intCodes, 1, 0, 4, 3, 2) 20 | 21 | log 'The highest signal (0-4) that can be sent to the thrusters is ' + amplifiers.findMax(intCodes, 0, 5) 22 | log 'The highest signal (5-9) that can be sent to the thrusters is ' + amplifiers.findMax(intCodes, 5, 10) 23 | } 24 | 25 | local class Amplifiers { 26 | 27 | local VM vm 28 | 29 | constructor(VM vm) { 30 | this.vm = vm 31 | } 32 | 33 | local Int run(Int[] intCodes, Int ampA, Int ampB, Int ampC, Int ampD, Int ampE) { 34 | Int resultA = vm.launch(intCodes, false, ampA, 0) 35 | Int resultB = vm.launch(intCodes, false, ampB, resultA) 36 | Int resultC = vm.launch(intCodes, false, ampC, resultB) 37 | Int resultD = vm.launch(intCodes, false, ampD, resultC) 38 | Int resultE = vm.launch(intCodes, false, ampE, resultD) 39 | 40 | return resultE 41 | } 42 | 43 | local String findMax(Int[] intCodes, Int init, Int to) { 44 | mut Int max = 0 45 | mut String signal = '' 46 | 47 | for (mut Int ampA = init; ampA < to; ampA++) { 48 | for (mut Int ampB = init; ampB < to; ampB++) { 49 | if ampB == ampA { 50 | continue 51 | } 52 | 53 | for (mut Int ampC = init; ampC < to; ampC++) { 54 | if ampC == ampA || ampC == ampB { 55 | continue 56 | } 57 | 58 | for (mut Int ampD = init; ampD < to; ampD++) { 59 | if ampD == ampA || ampD == ampB || ampD == ampC { 60 | continue 61 | } 62 | 63 | for (mut Int ampE = init; ampE < to; ampE++) { 64 | if ampE == ampA || ampE == ampB || ampE == ampC || ampE == ampD { 65 | continue 66 | } 67 | 68 | Int result = run(intCodes, ampA, ampB, ampC, ampD, ampE) 69 | 70 | if result > max { 71 | signal = '' + ampE + ampD + ampC + ampB + ampA + '| ' + result 72 | max = result 73 | } 74 | } 75 | } 76 | } 77 | } 78 | } 79 | 80 | return signal 81 | } 82 | 83 | } -------------------------------------------------------------------------------- /2019/days/day03/input/oskarr1239.input: -------------------------------------------------------------------------------- 1 | R991,U77,L916,D26,R424,D739,L558,D439,R636,U616,L364,D653,R546,U909,L66,D472,R341,U906,L37,D360,L369,D451,L649,D521,R2,U491,R409,U801,R23,U323,L209,U171,L849,D891,L854,U224,R476,D519,L937,U345,R722,D785,L312,D949,R124,U20,R677,D236,R820,D320,L549,D631,R42,U621,R760,U958,L925,U84,R914,U656,R598,D610,R397,D753,L109,U988,R435,U828,R219,U583,L317,D520,L940,D850,R594,D801,L422,U292,R883,U204,L76,U860,L753,U483,L183,U179,R441,U163,L859,U437,L485,D239,R454,D940,R689,D704,R110,D12,R370,D413,L192,D979,R990,D651,L308,U177,R787,D717,R245,U689,R11,D509,L680,U228,L347,D179,R508,D40,L502,U689,L643,U45,R884,D653,L23,D918,L825,D312,L691,U292,L285,D183,R997,U427,L89,U252,R475,U217,R16,U749,L578,D931,L273,U509,L741,U97,R407,U275,L605,U136,L558,U318,R478,U505,R446,U295,R562,D646,R988,D254,L68,U645,L953,U916,L442,D713,R978,U540,R447,U594,L804,U215,R95,D995,R818,D237,R212,U664,R455,D684,L338,U308,R463,D985,L988,D281,R758,U510,L232,U509,R289,D90,R65,D46,R886,D741,L327,U755,R236,U870,L764,U60,R391,U91,R367,U587,L651,D434,L47,U954,R707,D336,L242,D387,L410,D19,R203,D703,L228,U292,L19,U916,R411,U421,L726,U543,L240,U755,R157,U836,L397,U71,L125,D934,L723,D145,L317,D229,R863,U941,L926,D55,L2,D452,R895,D670,L216,U504,R66,U696,L581,U75,L235,U88,L609,U415,L850,U21,L109,U416,R408,D367,R823,D199,L718,U136,L860,U780,L308,D312,R230,D671,R477,D672,L94,U307,R301,D143,L300,D792,L593,D399,R840,D225,R680,D484,L646,D917,R132,D213,L779,D143,L176,U673,L772,D93,L10,D624,L244,D993,R346 2 | L997,U989,L596,U821,L419,U118,R258,D239,R902,D810,R553,D271,R213,D787,R723,D57,L874,D556,R53,U317,L196,D813,R500,U151,R180,D293,L415,U493,L99,U482,R517,U649,R102,U860,R905,D499,R133,D741,R394,U737,L903,U800,R755,D376,L11,U751,R539,U33,R539,U30,L534,D631,L714,U190,L446,U409,R977,D731,R282,U244,R29,D212,L523,D570,L89,D327,R178,U970,R435,U250,R213,D604,R64,D348,R315,D994,L508,D261,R62,D50,L347,U183,R410,D627,L128,U855,L803,D695,L879,U857,L629,D145,L341,D733,L566,D626,L302,U236,L55,U428,R183,U254,R226,D228,R616,U137,L593,U204,R620,U624,R605,D705,L263,D568,R931,D464,R989,U621,L277,U274,L137,U768,L261,D360,L45,D110,R35,U212,L271,D318,L444,D427,R225,D380,L907,D193,L118,U741,L101,D298,R604,D598,L98,U458,L733,U511,L82,D173,L644,U803,R926,D610,R24,D170,L198,U766,R656,D474,L393,D934,L789,U92,L889,U460,L232,U193,L877,D380,L455,D526,R899,D696,R452,U95,L828,D720,R370,U664,L792,D204,R84,D749,R808,U132,L152,D375,R19,U164,L615,D121,R644,D289,R381,U126,L304,U508,L112,D268,L572,D838,L998,U127,R500,D344,R694,U451,L846,D565,R158,U47,L430,U214,R571,D983,R690,D227,L107,U109,L286,D66,L544,U205,L453,U716,L36,U672,L517,U878,L487,U936,L628,U253,R424,D409,R422,U636,R412,U553,R59,D332,R7,U495,L305,D939,L428,D821,R749,D195,R531,D898,R337,D303,L398,D625,R57,D503,L699,D553,L478,U716,R897,D3,R420,U903,R994,U864,L745,U205,R229,U126,L227,D454,R670,U605,L356,U499,R510,U238,L542,D440,R156,D512,L237,D341,L439,U642,R873,D650,R871,D616,R322,U696,R248,D746,R990,U829,R812,U294,L462,U740,R780 -------------------------------------------------------------------------------- /2019/days/day03/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | R1002,D715,R356,D749,L255,U433,L558,D840,R933,U14,L285,U220,L88,D477,R36,U798,R373,U378,R305,D341,R959,D604,R717,D911,L224,D32,R481,D508,L203,U445,L856,U44,L518,U909,R580,U565,R484,D170,R356,U614,R278,U120,R540,D330,R124,D555,R890,U445,L876,D948,R956,D503,R391,U564,R624,D642,L821,U924,L921,U869,R104,U376,L693,U812,R758,U200,L515,U435,R505,U22,R707,U926,R261,D332,R535,D704,L561,U476,R225,U168,L784,D794,R311,D426,R813,U584,L831,D258,R241,D665,R550,D709,R261,U557,L670,D823,L297,U951,R634,D647,R699,U907,L219,U481,L583,D854,L898,U535,R648,U307,L870,D748,R768,D502,L15,U684,R476,D591,L531,D881,L466,U135,R445,U813,R950,D303,L590,U938,R630,D233,R567,U739,L446,U689,R585,D892,R741,U849,R629,D972,L625,D524,L715,D936,L328,U102,R864,U859,L827,U162,L886,D785,R359,D38,R51,U999,R560,U415,L840,U736,R552,D277,R722,D444,R164,U335,L129,D873,L499,U847,R84,U780,R104,U879,R938,D468,L575,D668,L143,U917,R86,D562,R595,U924,R807,U76,L44,D685,R936,U876,R570,U782,L139,D815,R89,D976,R84,U446,R238,U853,L603,U869,R312,U970,R387,U131,L647,D383,R161,D818,L765,U291,L423,D753,R277,U840,R23,U265,R298,U665,R522,D955,R26,D320,R347,U952,R743,U782,L780,D20,L393,U855,L279,D969,L923,D902,L818,U855,L927,D342,R769,U517,L485,U176,R14,U683,L632,U198,R656,U444,R41,D911,R99,U880,L363,D15,L894,D782,R612,D677,R469,D166,R61,U284,R474,U222,L687,D502,R690,U619,R536,D663,L54,D660,L804,D697,R67,U116,R842,D785,R277,U978,L920,D926,R681,D957,L582,U441,L593,U686,R829,U937,L924,U965,R727,D964,R468,U240,R934,D266,R416 2 | L998,U258,R975,U197,R680,D56,R898,D710,R475,U909,L201,D579,L21,U743,R832,D448,R216,D136,R83,U413,R167,U138,R102,U122,L290,D49,L93,D941,L625,U709,R129,D340,L322,D27,R440,U692,R368,D687,L246,D425,R823,U287,L436,U999,R90,U663,R470,U177,R956,D981,L767,D780,R610,D644,R238,D416,R402,D327,L680,D367,L94,D776,L331,D745,R846,D559,R113,U158,R125,D627,L898,D212,L80,D184,L386,U943,R122,D614,L868,D600,R912,U501,R25,D887,R310,U872,L157,U865,L382,U959,R712,D248,L343,U819,L763,U886,R582,D631,L835,U443,L917,D934,L333,U470,R778,U142,R384,U589,R306,U933,L206,D199,L497,D406,L212,U439,L15,U985,R505,D502,R934,D966,R429,U810,R588,U367,L424,U804,R767,U703,R885,U568,R748,U209,L319,U305,L941,D184,R398,U681,L411,U414,L90,U711,L575,D368,L986,U29,R982,U361,L501,D970,R558,D887,L241,U506,R578,D932,R911,U621,L153,U200,L873,U711,L843,U549,R72,U377,R915,D79,L378,U66,L989,D589,L341,D350,L200,D78,R944,U876,L794,U643,R871,D909,L353,D54,R651,U338,R857,D938,R636,D301,R728,U318,R530,D589,L682,U784,L428,D879,L207,D247,L53,U312,L488,D534,L998,U512,L628,D957,L994,D747,L804,U399,L801,D500,R791,D980,R839,U564,L81,U461,R615,U863,R308,D564,R843,U579,R792,D472,R229,D153,L21,D647,R425,D54,L470,U330,R285,D81,L221,U168,R970,D624,R815,U189,L812,U195,L654,U108,R820,U786,L932,U657,L605,D164,L788,D393,L717,D49,R615,D81,L91,U322,L150,D368,R434,D861,L859,D911,R161,U576,L671,U992,L745,U585,R440,D731,R740,U584,L867,D906,R176,U72,L323,U329,L445,D667,R626,D111,L895,D170,R957,D488,R214,D354,L215,U486,L665,D266,L987 -------------------------------------------------------------------------------- /2020/days/day09/day09.panda: -------------------------------------------------------------------------------- 1 | module day09 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.FileUtils 8 | import org.panda_lang.utilities.commons.StringUtils 9 | import org.panda_lang.utilities.commons.collection.Pair 10 | import org.panda_lang.utilities.commons.function.Result 11 | import java.lang.Math 12 | 13 | main { 14 | List source = Files.readAllLines(new File(System.getProperty("input")).toPath()) 15 | 16 | for (mut Int index = 0; index < source.size(); index++) { 17 | source.set(index, Long.parseLong(source.get(index) as String) as Long) 18 | } 19 | 20 | XmasDecoder decoder = new XmasDecoder(source) 21 | 22 | while decoder.hasNext() { 23 | Result result = decoder.decodeNext() 24 | 25 | if result.isErr() { 26 | Int weaknessPosition = result.getError() as Int 27 | log 'Part one: ' + source.get(weaknessPosition) // 21806024 28 | log 'Part two: ' + decoder.detectWeakness(weaknessPosition) // 2986195 29 | break 30 | } 31 | } 32 | } 33 | 34 | type XmasDecoder { 35 | 36 | open static Int XMAS_PREAMBLE_OFFSET = 25 37 | 38 | internal List data 39 | internal mut Int index = XMAS_PREAMBLE_OFFSET 40 | 41 | constructor (List data) { 42 | this.data = data 43 | } 44 | 45 | open hasNext () -> Bool { 46 | return index < data.size() 47 | } 48 | 49 | open decodeNext () -> Result { 50 | List preamble = data.subList(index - XMAS_PREAMBLE_OFFSET, index) 51 | Long current = data.get(index++ as Int) as Long 52 | 53 | foreach (Long factor : preamble) { 54 | if preamble.contains(current - factor) { 55 | return Result.ok(current) 56 | } 57 | } 58 | 59 | return Result.error(index - 1) 60 | } 61 | 62 | open detectWeakness (Int weaknessPosition) -> Int { 63 | List weakness = data.subList(0, weaknessPosition - 1) 64 | Long target = data.get(weaknessPosition) as Long 65 | 66 | for (mut Int subsetSize = weakness.size() - 1; subsetSize > 2; subsetSize--) { 67 | Int range = weakness.size() - subsetSize 68 | 69 | for (mut Int index = 0; index < range; index++) { 70 | List subset = weakness.subList(index, index + subsetSize) 71 | mut Long sum = 0 72 | 73 | foreach (Long factor : subset) { 74 | sum = sum + factor 75 | } 76 | 77 | if sum != target { 78 | continue 79 | } 80 | 81 | mut Long max = -1 82 | mut Long min = Long.MAX_VALUE 83 | 84 | foreach (Long factor : subset) { 85 | max = Math.max(max, factor) 86 | min = Math.min(min, factor) 87 | } 88 | 89 | return max + min 90 | } 91 | } 92 | 93 | return -1 94 | } 95 | 96 | } -------------------------------------------------------------------------------- /2021/days/day03/src/app.panda: -------------------------------------------------------------------------------- 1 | require 'java' { collections } 2 | 3 | import java.io.File 4 | import java.nio.file.Files 5 | 6 | main { 7 | List lines = Files.readAllLines(new File(System.getProperty("input")).toPath()) 8 | let length = (lines.get(0) as String).length() 9 | 10 | log 'Part 1: The power consumption of the submarine is ' + PowerConsumption.findPowerConsumption(lines, length) // 2595824 11 | log 'Part 2: The life support rating of the submarine is ' + LifeSupportRating.findLifeSupportRating(lines, length) // 2135254 12 | } 13 | 14 | /* Imagine having streams and fully working type system >.< */ 15 | 16 | shared type PowerConsumption { 17 | 18 | shared static findPowerConsumption(List lines, Int length) -> Int { 19 | let zeroBitsCount = new ArrayList() 20 | mut let gammaRate = 0L 21 | mut let epsilonRate = 0L 22 | 23 | foreach (String line : lines) { 24 | for (mut let index = 0; index < line.length(); index++) { 25 | if (index >= zeroBitsCount.size()) { 26 | zeroBitsCount.add(0) 27 | } 28 | if (line.charAt(index).toString() == "0") { 29 | zeroBitsCount.set(index, zeroBitsCount.get(index) as Int + 1) 30 | } 31 | } 32 | } 33 | 34 | for (mut let index = 0; index < length; index++) { 35 | if ((lines.size() - zeroBitsCount.get(index) as Int) > (lines.size() / 2)) { 36 | gammaRate = gammaRate ^ (1 << (length - index - 1)) 37 | } else { 38 | epsilonRate = epsilonRate ^ (1 << (length - index - 1)) 39 | } 40 | } 41 | 42 | return gammaRate * epsilonRate 43 | } 44 | 45 | } 46 | 47 | shared type LifeSupportRating { 48 | 49 | shared static findLifeSupportRating(List lines, Int length) -> Int { 50 | return LifeSupportRating.findRating(new ArrayList(lines), length, true) * LifeSupportRating.findRating(new ArrayList(lines), length, false) 51 | } 52 | 53 | internal static findRating(List lines, Int length, Bool most) -> Int { 54 | for (mut let index = 0; index < length; index++) { 55 | if (lines.size() as Int == 1) { 56 | break; 57 | } 58 | 59 | mut let zero = 0 60 | 61 | if ((index + 1) < length) { 62 | foreach (String record : lines) { 63 | if (record.charAt(index).toString() == '0') { 64 | zero++ 65 | } 66 | } 67 | } 68 | 69 | let mostZeros = zero > (lines.size() / 2.0) 70 | Iterator iterator = lines.iterator() 71 | 72 | while (iterator.hasNext()) { 73 | String element = (iterator.next() as String).charAt(index).toString() 74 | if (element == '0' && ((most && !mostZeros) || (!most && mostZeros))) { 75 | iterator.remove() 76 | } 77 | else if (element == '1' && ((most && mostZeros) || (!most && !mostZeros))) { 78 | iterator.remove() 79 | } 80 | } 81 | } 82 | 83 | return Int.parseInt(lines.get(0) as String, 2) 84 | } 85 | 86 | } -------------------------------------------------------------------------------- /2019/days/day09/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 1102,34463338,34463338,63,1007,63,34463338,63,1005,63,53,1101,0,3,1000,109,988,209,12,9,1000,209,6,209,3,203,0,1008,1000,1,63,1005,63,65,1008,1000,2,63,1005,63,904,1008,1000,0,63,1005,63,58,4,25,104,0,99,4,0,104,0,99,4,17,104,0,99,0,0,1101,0,608,1029,1102,1,29,1006,1101,39,0,1016,1101,1,0,1021,1101,37,0,1008,1101,0,25,1003,1102,32,1,1002,1101,0,35,1007,1102,1,28,1009,1101,0,31,1012,1101,22,0,1010,1101,319,0,1026,1102,1,23,1019,1102,423,1,1024,1101,27,0,1017,1101,0,36,1005,1101,0,0,1020,1101,681,0,1022,1102,1,30,1015,1101,0,24,1004,1102,312,1,1027,1102,1,21,1000,1102,1,34,1018,1101,0,678,1023,1101,0,38,1011,1102,1,418,1025,1102,1,20,1014,1101,33,0,1001,1101,0,26,1013,1102,1,613,1028,109,3,1202,5,1,63,1008,63,36,63,1005,63,205,1001,64,1,64,1105,1,207,4,187,1002,64,2,64,109,11,21108,40,40,0,1005,1014,229,4,213,1001,64,1,64,1105,1,229,1002,64,2,64,109,-19,1202,6,1,63,1008,63,33,63,1005,63,255,4,235,1001,64,1,64,1105,1,255,1002,64,2,64,109,3,1201,8,0,63,1008,63,29,63,1005,63,277,4,261,1106,0,281,1001,64,1,64,1002,64,2,64,109,10,21107,41,42,3,1005,1011,299,4,287,1106,0,303,1001,64,1,64,1002,64,2,64,109,19,2106,0,0,1001,64,1,64,1105,1,321,4,309,1002,64,2,64,109,-15,21107,42,41,-2,1005,1010,341,1001,64,1,64,1106,0,343,4,327,1002,64,2,64,109,6,2101,0,-9,63,1008,63,30,63,1005,63,363,1106,0,369,4,349,1001,64,1,64,1002,64,2,64,109,-11,1208,-5,29,63,1005,63,389,1001,64,1,64,1106,0,391,4,375,1002,64,2,64,109,15,1206,-2,409,4,397,1001,64,1,64,1105,1,409,1002,64,2,64,109,-3,2105,1,5,4,415,1105,1,427,1001,64,1,64,1002,64,2,64,109,-18,21101,43,0,10,1008,1011,42,63,1005,63,447,1106,0,453,4,433,1001,64,1,64,1002,64,2,64,109,19,1205,1,467,4,459,1105,1,471,1001,64,1,64,1002,64,2,64,109,-5,2107,34,-8,63,1005,63,489,4,477,1106,0,493,1001,64,1,64,1002,64,2,64,109,-11,2102,1,-1,63,1008,63,28,63,1005,63,517,1001,64,1,64,1105,1,519,4,499,1002,64,2,64,109,8,2108,37,-5,63,1005,63,539,1001,64,1,64,1106,0,541,4,525,1002,64,2,64,109,17,1206,-8,557,1001,64,1,64,1105,1,559,4,547,1002,64,2,64,109,-11,1205,2,571,1105,1,577,4,565,1001,64,1,64,1002,64,2,64,109,-14,1207,0,25,63,1005,63,599,4,583,1001,64,1,64,1105,1,599,1002,64,2,64,109,32,2106,0,-8,4,605,1105,1,617,1001,64,1,64,1002,64,2,64,109,-27,2102,1,-5,63,1008,63,24,63,1005,63,639,4,623,1105,1,643,1001,64,1,64,1002,64,2,64,109,-16,2101,0,10,63,1008,63,25,63,1005,63,669,4,649,1001,64,1,64,1105,1,669,1002,64,2,64,109,22,2105,1,8,1106,0,687,4,675,1001,64,1,64,1002,64,2,64,109,-21,1208,8,32,63,1005,63,705,4,693,1105,1,709,1001,64,1,64,1002,64,2,64,109,19,1207,-5,36,63,1005,63,729,1001,64,1,64,1105,1,731,4,715,1002,64,2,64,109,9,21101,44,0,-5,1008,1017,44,63,1005,63,753,4,737,1105,1,757,1001,64,1,64,1002,64,2,64,109,-12,21108,45,46,5,1005,1015,773,1105,1,779,4,763,1001,64,1,64,1002,64,2,64,109,-8,2108,25,1,63,1005,63,801,4,785,1001,64,1,64,1105,1,801,1002,64,2,64,109,-12,2107,22,10,63,1005,63,817,1106,0,823,4,807,1001,64,1,64,1002,64,2,64,109,23,1201,-8,0,63,1008,63,38,63,1005,63,847,1001,64,1,64,1106,0,849,4,829,1002,64,2,64,109,-3,21102,46,1,4,1008,1014,46,63,1005,63,871,4,855,1106,0,875,1001,64,1,64,1002,64,2,64,109,5,21102,47,1,2,1008,1017,46,63,1005,63,899,1001,64,1,64,1105,1,901,4,881,4,64,99,21101,0,27,1,21101,0,915,0,1105,1,922,21201,1,42136,1,204,1,99,109,3,1207,-2,3,63,1005,63,964,21201,-2,-1,1,21101,0,942,0,1106,0,922,21202,1,1,-1,21201,-2,-3,1,21101,0,957,0,1105,1,922,22201,1,-1,-2,1106,0,968,22101,0,-2,-2,109,-3,2105,1,0 -------------------------------------------------------------------------------- /2019/days/day10/day10.panda: -------------------------------------------------------------------------------- 1 | module day10 2 | 3 | require java:collections 4 | 5 | require '../commons/aoc' 6 | require aoc 7 | 8 | import java.lang.Math 9 | import java.awt.Point 10 | import java.text.DecimalFormat 11 | 12 | main { 13 | List content = AdventOfCode.readContentAsLines() 14 | List asteroids = MonitoringStation.load(content) 15 | 16 | mut Int count = 0 17 | nil mut Point selectedAsteroid = null 18 | nil mut Map selectedMap = null 19 | 20 | foreach (Point asteroid : asteroids) { 21 | Map map = MonitoringStation.analyze(asteroids, asteroid) 22 | 23 | if map.size() > count { 24 | count = map.size() 25 | selectedAsteroid = asteroid 26 | selectedMap = map 27 | } 28 | } 29 | 30 | log 'Selected asteroid ' + selectedAsteroid, count 31 | 32 | Map sortedMap = new TreeMap(selectedMap) 33 | mut Int shotsCount = 0 34 | List removed = new ArrayList() 35 | 36 | foreach (Entry entry : sortedMap.entrySet()) { 37 | Double angle = entry.getKey() as Double 38 | 39 | if angle == 0 { 40 | continue 41 | } 42 | 43 | Point asteroid = entry.getValue() as Point 44 | 45 | if removed.contains(asteroid) { 46 | continue 47 | } 48 | 49 | removed.add(asteroid) 50 | shotsCount = shotsCount + 1 51 | 52 | if shotsCount == 200 { 53 | log asteroid.getX() * 100.0 + asteroid.getY() 54 | } 55 | } 56 | } 57 | 58 | local class MonitoringStation { 59 | 60 | public static Map analyze(List asteroids, Point currentPoint) { 61 | Map points = new HashMap() 62 | 63 | foreach (Point asteroid : asteroids) { 64 | if currentPoint == asteroid { 65 | continue 66 | } 67 | 68 | Point between = new Point(toInt(currentPoint.getX() - asteroid.getX()), toInt(currentPoint.getY() - asteroid.getY())) 69 | Double distance = asteroid.distance(currentPoint) 70 | Double cos = between.getY() / distance 71 | mut Double theta = Math.toDegrees(Math.atan2(between.getX(), between.getY())) 72 | 73 | if theta < 0 { 74 | theta = theta + 360 75 | } 76 | 77 | nil Point previousPoint = points.get(theta) as Point 78 | 79 | if previousPoint == null || currentPoint.distance(previousPoint) > distance { 80 | points.put(theta, asteroid) 81 | continue 82 | } 83 | } 84 | 85 | return points 86 | } 87 | 88 | public static List load(List lines) { 89 | Int height = lines.size() 90 | Int width = (lines.get(0) as String).length() 91 | List asteroids = new ArrayList() 92 | 93 | for (mut Int y = 0; y < lines.size(); y++) { 94 | String line = lines.get(y) as String 95 | 96 | for (mut Int x = 0; x < line.length(); x++) { 97 | if line.charAt(x).toString() == '#' { 98 | asteroids.add(new Point(x, y)) 99 | } 100 | } 101 | } 102 | 103 | return asteroids 104 | } 105 | 106 | public static Int toInt(Double double) { 107 | return (double as Number).intValue() 108 | } 109 | 110 | } 111 | 112 | -------------------------------------------------------------------------------- /2019/days/day08/day08.panda: -------------------------------------------------------------------------------- 1 | module day08 2 | 3 | require java:collections 4 | 5 | require '../commons/aoc' 6 | require aoc 7 | 8 | import org.panda_lang.utilities.commons.console.Effect 9 | 10 | main { 11 | String content = AdventOfCode.readContent() 12 | List layers = SpaceImageFormat.loadLayers(content, 25, 6) 13 | 14 | log 'The number of 1 digits multiplied by the number of 2 digits is ' + SpaceImageFormat.corruptedLayersStatus(layers) 15 | log 'The message is produced after decoding your image is:' 16 | SpaceImageFormat.printLayer(SpaceImageFormat.decodeImage(layers, 25, 6)) 17 | } 18 | 19 | local class SpaceImageFormat { 20 | 21 | local static String[][] decodeImage(List layers, Int width, Int height) { 22 | String[][] finalImage = new String[width][height] 23 | 24 | for (mut Int x = 0; x < finalImage.size(); x++) { 25 | for (mut Int y = 0; y < finalImage[x].size(); y++) { 26 | for (mut Int index = 0; index < layers.size(); index++) { 27 | Int[][] layer = layers.get(index) as Int[][] 28 | 29 | Int pixel = layer[x][y] 30 | nil String finalPixel = finalImage[x][y] 31 | 32 | if finalPixel != null && finalPixel != ' ' { 33 | continue 34 | } 35 | 36 | finalImage[x][y] = colored(pixel) 37 | } 38 | } 39 | } 40 | 41 | return finalImage 42 | } 43 | 44 | local static String colored(Int pixel) { 45 | String colored = '•' 46 | 47 | if pixel == 0 { 48 | return Effect.BLACK + colored + Effect.RESET 49 | } 50 | else if pixel == 1 { 51 | return Effect.WHITE + colored + Effect.RESET 52 | } 53 | else if pixel == 2 { 54 | return ' ' 55 | } 56 | 57 | throw new RuntimeException("Unknown color " + pixel) 58 | } 59 | 60 | local static Int corruptedLayersStatus(List layers) { 61 | mut Int minZero = Int.MAX_VALUE 62 | nil mut Int[][] selectedLayer = null 63 | 64 | for (mut Int index = 0; index < layers.size(); index++) { 65 | Int[][] layer = layers.get(index) as Int[][] 66 | Int zeroCount = countPixels(layer, 0) 67 | 68 | if zeroCount < minZero { 69 | selectedLayer = layer 70 | minZero = zeroCount 71 | } 72 | } 73 | 74 | if selectedLayer == null { 75 | throw new RuntimeException('Corrupted image') 76 | } 77 | 78 | Int oneDigits = countPixels(selectedLayer, 1) 79 | Int twoDigits = countPixels(selectedLayer, 2) 80 | 81 | return oneDigits * twoDigits 82 | } 83 | 84 | local static Int printLayer(Object[][] layer) { 85 | for (mut Int x = 0; x < layer.size(); x++) { 86 | StringBuilder content = new StringBuilder() 87 | 88 | for (mut Int y = 0; y < layer[x].size(); y++) { 89 | content.append(layer[x][y]) 90 | } 91 | 92 | log content 93 | } 94 | } 95 | 96 | local static Int countPixels(Int[][] layer, Int pixel) { 97 | mut Int pixelCount = 0 98 | 99 | for (mut Int x = 0; x < layer.size(); x++) { 100 | for (mut Int y = 0; y < layer[x].size(); y++) { 101 | if layer[x][y] == pixel { 102 | pixelCount++ 103 | } 104 | } 105 | } 106 | 107 | return pixelCount 108 | } 109 | 110 | local static List loadLayers(String content, Int width, Int height) { 111 | Int[] data = new Int[content.length()] 112 | 113 | for (mut Int index = 0; index < content.length(); index++) { 114 | data[index] = Int.parseInt(content.charAt(index).toString()) 115 | } 116 | 117 | List layers = new ArrayList() 118 | 119 | for (mut Int index = 0; index < data.size();) { 120 | Int[][] layer = new Int[width][height] 121 | 122 | for (mut Int x = 0; x < layer.size(); x++) { 123 | for (mut Int y = 0; y < layer[x].size(); y++) { 124 | layer[x][y] = data[index++] 125 | } 126 | } 127 | 128 | layers.add(layer) 129 | } 130 | 131 | return layers 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /2019/days/day03/day03.panda: -------------------------------------------------------------------------------- 1 | module day03 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import java.lang.Math 8 | 9 | main { 10 | List wires = Files.readAllLines(new File(System.getProperty("input")).toPath()) 11 | String[] first = (wires.get(0) as String).split(",") 12 | String[] second = (wires.get(1) as String).split(",") 13 | 14 | /* 15 | * Map first wire into > the first map using the moving point 16 | */ 17 | 18 | Map firstMap = new HashMap() 19 | mut MovingPoint lastPoint = new MovingPoint(0, 0, 0) 20 | 21 | foreach (String move : first) { 22 | lastPoint = lastPoint.movePoint(firstMap, move) 23 | } 24 | 25 | /* 26 | * Map second wire into > the second map using the moving point 27 | */ 28 | 29 | Map secondMap = new HashMap() 30 | lastPoint = new MovingPoint(0, 0, 0) 31 | 32 | foreach (String move : second) { 33 | lastPoint = lastPoint.movePoint(secondMap, move) 34 | } 35 | 36 | /* 37 | * Search for the crossing points 38 | */ 39 | 40 | List crossPoints = new ArrayList() 41 | 42 | foreach (Entry firstEntry : firstMap.entrySet()) { 43 | nil List secondValues = secondMap.get(firstEntry.getKey()) as List 44 | 45 | if secondValues == null { 46 | continue 47 | } 48 | 49 | foreach (MovingPoint firstPoint : firstEntry.getValue() as List) { 50 | foreach (MovingPoint secondPoint : secondValues) { 51 | if firstPoint.x == secondPoint.x && firstPoint.y == secondPoint.y { 52 | crossPoints.add(new MovingPoint(firstPoint.x, firstPoint.y, firstPoint.fullSteps + secondPoint.fullSteps)) 53 | } 54 | } 55 | } 56 | } 57 | 58 | /* 59 | * Select the nearest point 60 | */ 61 | 62 | mut Int manhattanDistance = Int.MAX_VALUE 63 | 64 | foreach (MovingPoint point : crossPoints) { 65 | Int currentDistance = Math.abs(point.x) + Math.abs(point.y) 66 | 67 | if currentDistance < manhattanDistance { 68 | manhattanDistance = currentDistance 69 | } 70 | } 71 | 72 | log 'Manhattan distance: ' + manhattanDistance 73 | 74 | /* 75 | * Select the fewest combination 76 | */ 77 | 78 | mut Int fewestCombination = Int.MAX_VALUE 79 | 80 | foreach (MovingPoint points : crossPoints) { 81 | if (points.fullSteps < fewestCombination) { 82 | fewestCombination = points.fullSteps 83 | } 84 | } 85 | 86 | log 'Fewest combination: ' + fewestCombination 87 | } 88 | 89 | /* 90 | * Cancerous class 91 | */ 92 | local class MovingPoint { 93 | 94 | local Int x 95 | local Int y 96 | local Int fullSteps 97 | 98 | constructor(Int xValue, Int yValue, Int stepsValue) { 99 | this.x = xValue 100 | this.y = yValue 101 | this.fullSteps = stepsValue 102 | } 103 | 104 | local MovingPoint movePoint(Map map, String move) { 105 | String direction = move.substring(0, 1) 106 | Int steps = Int.parseInt(move.substring(1)) 107 | 108 | if direction == 'U' { 109 | for (mut Int i = 1; i <= steps; i++ ) { 110 | put(map, x, y + i, fullSteps + i) 111 | } 112 | return new MovingPoint(x, y + steps, fullSteps + steps) 113 | } 114 | else if direction == 'D' { 115 | for (mut Int i = 1; i <= steps; i++ ) { 116 | put(map, x, y - i, fullSteps + i) 117 | } 118 | return new MovingPoint(x, y - steps, fullSteps + steps) 119 | } 120 | else if direction == 'L' { 121 | for (mut Int i = 1; i <= steps; i++ ) { 122 | put(map, x - i, y, fullSteps + i) 123 | } 124 | return new MovingPoint(x - steps, y, fullSteps + steps) 125 | } 126 | else if direction == 'R' { 127 | for (mut Int i = 1; i <= steps; i++ ) { 128 | put(map, x + i, y, fullSteps + i) 129 | } 130 | return new MovingPoint(x + steps, y, fullSteps + steps) 131 | } 132 | } 133 | 134 | local static put(Map map, Int x, Int y, Int fullSteps) { 135 | mut nil List list = map.get(x) as List 136 | 137 | if list == null { 138 | list = new ArrayList() 139 | map.put(x, list) 140 | } 141 | 142 | list.add(new MovingPoint(x, y, fullSteps)) 143 | } 144 | 145 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Advent of Code 2 | [Advent of Code 2019-2024](https://adventofcode.com/) in [Panda](https://github.com/panda-lang/panda) 3 | 4 | ### Background 5 | The aim of project is to explore the pre-alpha version of [Panda](https://github.com/panda-lang/panda) language. 6 | Implementations of various programming puzzles should expose vulnerabilities, bugs and ill-thought-out solutions. 7 | 8 | ### Run 9 | ```bash 10 | git clone https://github.com/dzikoysk/advent-of-code.git 11 | 12 | cd 13 | ./run.sh 14 | ``` 15 | 16 | ### Progress 17 | 18 | #### 2024 19 | 20 | | Day | Name | Panda | 21 | |:---:|:----------------------------------------------------------|:-----:| 22 | | - | Advent of Code 2024 | 0.5.2 | 23 | | 01 | [Historian Hysteria](https://adventofcode.com/2024/day/1) | ✓ | 24 | | 02 | [Red-Nosed Reports](https://adventofcode.com/2024/day/2) | ✓ | 25 | 26 | #### 2023-2022 27 | 28 | | Day | Name | Panda | 29 | |:---:|:--------------------|:-----------:| 30 | | > | Advent of Code 2023 | 0.5.2-alpha | 31 | | * | _Nope_ | ... | 32 | | > | Advent of Code 2022 | - | 33 | | * | _Nope_ | ... | 34 | 35 | #### 2021 36 | 37 | | Day | Name | Panda | 38 | |:---:|:---------------------------------------------------------|:-------------------------:| 39 | | > | Advent of Code 2021 | 0.5.0-alpha - 0.5.2-alpha | 40 | | 01 | [Sonar Sweep](https://adventofcode.com/2021/day/1) | ✓ | 41 | | 02 | [Dive!](https://adventofcode.com/2021/day/2) | ✓ | 42 | | 03 | [Binary Diagnostic](https://adventofcode.com/2021/day/3) | ✓ | 43 | | * | _Nope_ | ... | 44 | 45 | #### 2020 46 | 47 | | Day | Name | Panda | 48 | |:---:|:-----------------------------------------------------------|:-----------:| 49 | | > | Advent of Code 2020 | 0.1.3-alpha | 50 | | 01 | [Report Repair](https://adventofcode.com/2020/day/1) | ✓ | 51 | | 02 | [Password Philosophy](https://adventofcode.com/2020/day/2) | ✓ | 52 | | 03 | [Toboggan Trajectory](https://adventofcode.com/2020/day/3) | ✓ | 53 | | 04 | [Passport Processing](https://adventofcode.com/2020/day/4) | ✓ | 54 | | 05 | [Binary Boarding](https://adventofcode.com/2020/day/5) | ✓ | 55 | | 06 | [Custom Customs](https://adventofcode.com/2020/day/6) | ✓ | 56 | | 07 | [Handy Haversacks](https://adventofcode.com/2020/day/7) | ✓ | 57 | | 08 | [Handheld Halting](https://adventofcode.com/2020/day/8) | ✓ | 58 | | 09 | [Encoding Error](https://adventofcode.com/2020/day/9) | ✓ | 59 | | 10 | [Adapter Array](https://adventofcode.com/2020/day/10) | ½ | 60 | | 11 | [Seating System](https://adventofcode.com/2020/day/11) | - | 61 | | * | Again lack of time 😳 | ... | 62 | 63 | #### 2019 64 | 65 | | Day | Name | Panda | 66 | |:---:|:--------------------------------------------------------------------------|:--------------:| 67 | | > | Advent of Code 2019 | indev-19.12.12 | 68 | | 01 | [The Tyranny of the Rocket Equation](https://adventofcode.com/2019/day/1) | ✓ | 69 | | 02 | [1202 Program Alarm](https://adventofcode.com/2019/day/2) | ✓ | 70 | | 03 | [Crossed Wires](https://adventofcode.com/2019/day/3) | ✓ | 71 | | 04 | [Secure Container](https://adventofcode.com/2019/day/4) | ✓ | 72 | | 05 | [Sunny with a Chance of Asteroids](https://adventofcode.com/2019/day/5) | ✓ | 73 | | 06 | [Universal Orbit Map](https://adventofcode.com/2019/day/6) | ✓ | 74 | | 07 | [Amplification Circuit](https://adventofcode.com/2019/day/7) | ✓ | 75 | | 08 | [Space Image Format](https://adventofcode.com/2019/day/8) | ✓ | 76 | | 09 | [Sensor Boost](https://adventofcode.com/2019/day/9) | ✓ | 77 | | 10 | [Monitoring Station](https://adventofcode.com/2019/day/10) | ½ | 78 | | 11 | [Space Police](https://adventofcode.com/2019/day/11) | - | 79 | | * | Lack of time :< | ... | 80 | -------------------------------------------------------------------------------- /2020/days/day08/day08.panda: -------------------------------------------------------------------------------- 1 | module day08 2 | 3 | require java:collections 4 | 5 | import java.io.File 6 | import java.nio.file.Files 7 | import org.panda_lang.utilities.commons.FileUtils 8 | import org.panda_lang.utilities.commons.StringUtils 9 | import org.panda_lang.utilities.commons.collection.Pair 10 | 11 | main { 12 | List source = Files.readAllLines(new File(System.getProperty("input")).toPath()) 13 | Program program = Parser.parse(source) 14 | 15 | // 16 | // Program returns 17 | // Pair for corrupted code 18 | // Pair for properly patched code 19 | // 20 | 21 | mut Pair result = program.run() 22 | log 'Part one: ' + result.getValue() // 2058 23 | 24 | // 25 | // Patch code in iterations based on root stack. 26 | // Properly executed program should return Bool instead of Stack 27 | // 28 | 29 | mut Int iteration = 0 30 | mut Pair fixedResult = result 31 | 32 | while fixedResult.getKey() is Stack { 33 | Program fixedProgram = program.patch(result.getKey() as Stack, iteration) 34 | fixedResult = fixedProgram.run() 35 | iteration++ 36 | } 37 | 38 | // Bug detected: Math operation can remain as a standalone expression 39 | // ~ https://github.com/panda-lang/panda/issues/596 40 | log 'Part two: ' + fixedResult.getValue() + ' (found in ' + iteration + 'th iteration)' // 1000 (found in 54th iteration) 41 | } 42 | 43 | 44 | type Instruction { 45 | 46 | open String name 47 | open Int value 48 | 49 | constructor (String name, Int value) { 50 | this.name = name 51 | this.value = value 52 | } 53 | 54 | override toString () -> String { 55 | return name + ' ' + value 56 | } 57 | 58 | } 59 | 60 | type Parser { 61 | 62 | open static parse (List source) -> Program { 63 | List code = new ArrayList(source.size()) 64 | 65 | foreach (String instruction : source) { 66 | Int separator = instruction.indexOf(' ') 67 | String name = instruction.substring(0, separator) 68 | Int value = Int.parseInt(instruction.substring(separator + 1)) 69 | code.add(new Instruction(name, value)) 70 | } 71 | 72 | return new Program(code) 73 | } 74 | 75 | } 76 | 77 | type Program { 78 | 79 | internal List code 80 | 81 | constructor (List code) { 82 | this.code = code 83 | } 84 | 85 | open run () -> Pair { 86 | Stack stack = new Stack() 87 | mut Int accumulator = 0 88 | 89 | for (mut Int position = 0; position < code.size();) { 90 | Instruction instruction = code.get(position) as Instruction 91 | // log instruction.name + ' ' + instruction.value + ' at ' + position 92 | 93 | if stack.contains(position) { 94 | return new Pair(stack, accumulator) 95 | } 96 | 97 | stack.push(position) 98 | 99 | if 'acc' == instruction.name { 100 | accumulator = accumulator + instruction.value 101 | position++ 102 | continue 103 | } 104 | 105 | if 'jmp' == instruction.name { 106 | position = position + instruction.value 107 | continue 108 | } 109 | 110 | if 'nop' == instruction.name { 111 | position++ 112 | continue 113 | } 114 | 115 | throw new RuntimeException('Invalid code ' + instruction.name) 116 | } 117 | 118 | // Looks like bug - cannot provide primitives as parameters in generated constructors 119 | // Cannot pass primitive values as arguments for panda::Object parameters 120 | // ~ https://github.com/panda-lang/panda/issues/597 121 | return new Pair(true as Bool, accumulator) 122 | } 123 | 124 | open patch (Stack corrupted, Int iteration) -> Program { 125 | List copiedCode = new ArrayList(code) 126 | mut Int step = 0 127 | 128 | for (mut Int position = corrupted.size() - 1; position > -1; position--) { 129 | Int instructionPosition = corrupted.get(position) as Int 130 | Instruction instruction = copiedCode.get(instructionPosition) as Instruction 131 | 132 | if 'acc' == instruction.name { 133 | continue 134 | } 135 | 136 | if step++ < iteration { 137 | continue 138 | } 139 | 140 | if 'nop' == instruction.name { 141 | copiedCode.set(instructionPosition, new Instruction('jmp', instruction.value)) 142 | // log 'Changed ' + instruction + ' to ' + copiedCode.get(instructionPosition) + ' at ' + instructionPosition 143 | break 144 | } 145 | 146 | if 'jmp' == instruction.name { 147 | copiedCode.set(instructionPosition, new Instruction('nop', instruction.value)) 148 | // log 'Changed ' + instruction + ' to ' + copiedCode.get(instructionPosition) + ' at ' + instructionPosition 149 | break 150 | } 151 | } 152 | 153 | return new Program(copiedCode) 154 | } 155 | 156 | } -------------------------------------------------------------------------------- /2019/days/commons/vm/vm.panda: -------------------------------------------------------------------------------- 1 | module vm 2 | 3 | require java:collections 4 | 5 | import org.panda_lang.utilities.commons.StringUtils 6 | 7 | public class VM { 8 | 9 | public Long launch(Long[] instructions, Long[] values) { 10 | Long[] process = Arrays.copyOf(instructions, instructions.size()) as Long[] 11 | Stack input = new Stack() 12 | 13 | for (mut Int index = 0; index < values.size(); index++) { 14 | input.push(values[values.size() - index - 1]) 15 | } 16 | 17 | Program program = new Program(instructions, input) 18 | return program.execute() 19 | } 20 | 21 | public Long[] toCodes(String data) { 22 | String[] content = data.split(',') 23 | Long[] codes = new Long[100_000] 24 | 25 | for (mut Int point = content.size(); point < codes.size(); point++) { 26 | codes[point] = 0L 27 | } 28 | 29 | for (mut Int point = 0; point < content.size(); point++) { 30 | codes[point] = Long.parseLong(content[point]) 31 | } 32 | 33 | return codes 34 | } 35 | 36 | } 37 | 38 | local class Program { 39 | 40 | local static Int ADD = 1 41 | local static Int MULTIPLY = 2 42 | local static Int INPUT = 3 43 | local static Int OUTPUT = 4 44 | local static Int JUMP_IF_TRUE = 5 45 | local static Int JUMP_IF_FALSE = 6 46 | local static Int LESS_THAN = 7 47 | local static Int EQUALS = 8 48 | local static Int RELATIVE = 9 49 | local static Int EXIT = 99 50 | 51 | local Long[] process 52 | local Stack input 53 | local mut Int pointer = 0 54 | local mut Int relative = 0 55 | local mut Long output = 0 56 | local mut Bool running = true 57 | 58 | constructor (Long[] process, Stack input) { 59 | this.process = process 60 | this.input = input 61 | } 62 | 63 | // 109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99 64 | // Steps: 65 | // 109 => relative + process[pointer + 1] = 0 + 1 = 1, pointer 2 66 | // 204 => output process[relative + process[pointer + 1]] = output process[-1 + 1] = out 109, pointer = 4 67 | // -1 68 | local Long execute() { 69 | while running { 70 | Long parameter = process[pointer] 71 | String fixedParameter = StringUtils.buildSpace(5 - parameter.toString().length()).replace(' ', '0') + parameter.toString() 72 | Int opcode = Int.parseInt(fixedParameter.substring(3).toString()) 73 | 74 | String[] modes = new String[3] 75 | modes[2] = fixedParameter.charAt(0).toString() 76 | modes[1] = fixedParameter.charAt(1).toString() 77 | modes[0] = fixedParameter.charAt(2).toString() 78 | 79 | if opcode == ADD { 80 | // log 'ADD', select(1, modes) + ' + ' + select(2, modes) + ' = ' + (select(1, modes) + select(2, modes)), select(3, modes), pointer, parameter 81 | set(3, modes, select(1, modes) + select(2, modes)) 82 | pointer = pointer + 4 83 | } 84 | else if opcode == MULTIPLY { 85 | // log 'SET', select(1, modes) + ' * ' + select(2, modes) + ' = ' + (select(1, modes) + ' * ' + select(2, modes)), pointer, parameter 86 | set(3, modes, select(1, modes) * select(2, modes)) 87 | pointer = pointer + 4 88 | } 89 | else if opcode == INPUT { 90 | // log 'INPUT', input.peek(), pointer, parameter 91 | set(1, modes, input.pop() as Long) 92 | pointer = pointer + 2 93 | } 94 | else if opcode == OUTPUT { 95 | // log 'OUTPUT', select(1, modes), pointer, parameter 96 | log '>> ' + (output = select(1, modes)) 97 | pointer = pointer + 2 98 | } 99 | else if opcode == JUMP_IF_TRUE { 100 | if select(1, modes) != 0L { 101 | // log 'JUMP_IF_TRUE', select(1, modes), select(2, modes), pointer, parameter 102 | pointer = toInt(select(2, modes)) 103 | } 104 | else { 105 | // log 'JUMP_IF_TRUE', pointer, parameter 106 | pointer = pointer + 3 107 | } 108 | } 109 | else if opcode == JUMP_IF_FALSE { 110 | if select(1, modes) == 0L { 111 | // log 'JUMP_IF_FALSE', select(1, modes), select(2, modes), pointer, parameter 112 | pointer = toInt(select(2, modes)) 113 | } 114 | else { 115 | // log 'JUMP_IF_FALSE', pointer, parameter 116 | pointer = pointer + 3 117 | } 118 | } 119 | else if opcode == LESS_THAN { 120 | if select(1, modes) < select(2, modes) { 121 | // log 'LESS_THAN', select(1, modes) + ' < ' + select(2, modes), pointer, parameter 122 | set(3, modes, 1L) 123 | } 124 | else { 125 | // log 'LESS_THAN', pointer, parameter 126 | set(3, modes, 0L) 127 | } 128 | pointer = pointer + 4 129 | } 130 | else if opcode == EQUALS { 131 | if select(1, modes) == select(2, modes) { 132 | // log 'EQUALS', select(1, modes) + ' == ' + select(2, modes), pointer, parameter 133 | set(3, modes, 1L) 134 | } 135 | else { 136 | // log 'EQUALS', pointer, parameter 137 | set(3, modes, 0L) 138 | } 139 | pointer = pointer + 4 140 | } 141 | else if opcode == RELATIVE { 142 | relative = relative + select(1, modes) 143 | pointer = pointer + 2 144 | // log 'RELATIVE', relative, pointer, parameter 145 | } 146 | else if opcode == EXIT { 147 | running = false 148 | // log 'EXIT' 149 | } 150 | else { 151 | throw new RuntimeException('Unknown opcode ' + parameter + ' with pointer ' + pointer) 152 | } 153 | } 154 | 155 | return output 156 | } 157 | 158 | local set(Int parameter, String[] modes, Long value) { 159 | String mode = modes[parameter - 1] 160 | 161 | if mode == '2' { 162 | process[getPointer(pointer + parameter) + relative] = value 163 | } 164 | else if mode == '1' { 165 | process[pointer + parameter] = value 166 | } 167 | else if mode == '0' { 168 | process[getPointer(pointer + parameter)] = value 169 | } 170 | else { 171 | throw new RuntimeException('Unknown mode ' + mode) 172 | } 173 | } 174 | 175 | local Long select(Int parameter, String[] modes) { 176 | String mode = modes[parameter - 1] 177 | 178 | if mode == '2' { 179 | return process[getPointer(pointer + parameter) + relative] 180 | } 181 | else if mode == '1' { 182 | return process[pointer + parameter] 183 | } 184 | else if mode == '0' { 185 | return process[getPointer(pointer + parameter)] 186 | } 187 | else { 188 | throw new RuntimeException('Unknown mode ' + mode) 189 | } 190 | } 191 | 192 | local Int getPointer(Int pointer) { 193 | return toInt(process[pointer]) 194 | } 195 | 196 | local Int toInt(Long long) { 197 | return (long as Number).intValue() 198 | } 199 | 200 | } -------------------------------------------------------------------------------- /2020/days/day08/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | acc -7 2 | acc +6 3 | acc +4 4 | nop +191 5 | jmp +199 6 | acc +44 7 | acc -9 8 | jmp +505 9 | acc -12 10 | acc +45 11 | jmp +204 12 | jmp +129 13 | acc +17 14 | nop +287 15 | jmp +584 16 | acc +16 17 | jmp +363 18 | acc +4 19 | nop +142 20 | acc +34 21 | nop +345 22 | jmp +522 23 | jmp +53 24 | acc -10 25 | jmp +524 26 | jmp +492 27 | jmp +319 28 | acc -9 29 | jmp +550 30 | acc -19 31 | jmp +15 32 | acc +24 33 | jmp +30 34 | acc -19 35 | acc +12 36 | acc -2 37 | jmp +274 38 | nop +91 39 | acc +10 40 | acc +4 41 | jmp +501 42 | acc +49 43 | acc +29 44 | jmp +488 45 | jmp +504 46 | jmp +277 47 | acc +20 48 | acc +34 49 | jmp -40 50 | acc +10 51 | acc -4 52 | acc -19 53 | acc +38 54 | jmp +239 55 | acc -16 56 | acc -3 57 | nop +513 58 | jmp +526 59 | jmp +131 60 | nop +539 61 | acc -11 62 | jmp +470 63 | acc +30 64 | jmp +166 65 | acc +17 66 | acc -16 67 | nop +315 68 | jmp +364 69 | acc +15 70 | nop -61 71 | acc -12 72 | nop +147 73 | jmp -31 74 | acc -9 75 | jmp +324 76 | acc +0 77 | jmp +1 78 | jmp +321 79 | acc +0 80 | acc +6 81 | acc -17 82 | acc +13 83 | jmp +461 84 | jmp +184 85 | acc +22 86 | jmp +182 87 | jmp +504 88 | nop +131 89 | acc +12 90 | acc -6 91 | acc +29 92 | jmp +187 93 | acc +17 94 | jmp +67 95 | jmp -2 96 | acc +50 97 | acc +17 98 | jmp +442 99 | acc +8 100 | nop +146 101 | acc -12 102 | acc +32 103 | jmp +237 104 | jmp +1 105 | acc +34 106 | acc +1 107 | acc +18 108 | jmp +274 109 | acc +17 110 | acc -12 111 | jmp +282 112 | acc +49 113 | acc +11 114 | acc +28 115 | acc +40 116 | jmp +79 117 | acc +19 118 | acc -8 119 | nop +87 120 | jmp +347 121 | acc +48 122 | nop +189 123 | jmp +419 124 | acc +31 125 | jmp +1 126 | acc +31 127 | jmp +1 128 | jmp -94 129 | nop -45 130 | nop +412 131 | acc -14 132 | acc +35 133 | jmp -49 134 | jmp +177 135 | jmp +127 136 | jmp +360 137 | jmp +114 138 | acc -11 139 | nop +248 140 | jmp -64 141 | acc +31 142 | acc +23 143 | acc +4 144 | nop +110 145 | jmp +61 146 | acc +45 147 | nop +444 148 | jmp +218 149 | jmp -131 150 | acc +36 151 | jmp -142 152 | nop +361 153 | acc -3 154 | acc +6 155 | jmp +161 156 | acc +24 157 | acc -7 158 | acc +4 159 | acc +31 160 | jmp +91 161 | jmp -20 162 | jmp +1 163 | nop -11 164 | jmp -146 165 | acc +25 166 | acc +33 167 | jmp +52 168 | acc -7 169 | jmp +82 170 | acc +7 171 | acc +21 172 | acc +6 173 | jmp +397 174 | acc +12 175 | acc +5 176 | acc -9 177 | acc +24 178 | jmp +371 179 | acc +50 180 | acc +47 181 | acc +19 182 | jmp +238 183 | jmp +396 184 | acc -16 185 | nop +394 186 | jmp +180 187 | acc +1 188 | acc +40 189 | jmp +237 190 | acc +22 191 | nop -30 192 | jmp -129 193 | acc +22 194 | jmp +232 195 | acc +23 196 | acc +27 197 | acc +47 198 | jmp +133 199 | acc +0 200 | nop +30 201 | acc +11 202 | acc -9 203 | jmp +381 204 | jmp +75 205 | jmp -64 206 | acc -15 207 | acc +29 208 | acc +49 209 | jmp +195 210 | nop +113 211 | acc -16 212 | nop +312 213 | acc +6 214 | jmp -44 215 | acc +26 216 | acc +40 217 | jmp +272 218 | jmp +83 219 | jmp +365 220 | acc +24 221 | acc +4 222 | jmp +29 223 | acc +8 224 | jmp -137 225 | acc +13 226 | jmp +1 227 | acc +33 228 | nop -182 229 | jmp +22 230 | jmp +9 231 | nop +20 232 | acc +14 233 | nop +291 234 | jmp -28 235 | jmp -83 236 | acc +18 237 | acc +5 238 | jmp +32 239 | acc +48 240 | nop -128 241 | acc +28 242 | jmp +225 243 | acc +29 244 | nop +280 245 | jmp +304 246 | acc +37 247 | acc +50 248 | acc +30 249 | jmp +131 250 | jmp -60 251 | acc +27 252 | jmp +272 253 | jmp +358 254 | acc -1 255 | acc +37 256 | jmp +203 257 | acc +1 258 | acc +37 259 | acc +12 260 | acc -16 261 | jmp +263 262 | acc -16 263 | acc +30 264 | jmp +86 265 | acc +26 266 | acc +6 267 | jmp +344 268 | jmp -147 269 | jmp -185 270 | acc -5 271 | acc -3 272 | acc +7 273 | acc +9 274 | jmp -205 275 | nop -85 276 | acc -4 277 | acc -1 278 | jmp +266 279 | acc +19 280 | nop -143 281 | acc -3 282 | jmp -12 283 | acc +12 284 | acc -18 285 | jmp +326 286 | acc +39 287 | jmp +165 288 | nop -279 289 | acc +19 290 | acc +46 291 | acc +5 292 | jmp -163 293 | acc -13 294 | jmp +1 295 | acc +33 296 | acc +44 297 | jmp -62 298 | acc -10 299 | acc +7 300 | jmp +240 301 | acc -19 302 | jmp -190 303 | acc -12 304 | jmp -167 305 | acc -2 306 | nop -288 307 | acc -13 308 | jmp +303 309 | acc +24 310 | jmp -283 311 | jmp +309 312 | nop +190 313 | acc +38 314 | acc -12 315 | jmp -47 316 | acc +15 317 | acc +31 318 | jmp -259 319 | nop +154 320 | acc +25 321 | acc +8 322 | jmp -295 323 | acc +37 324 | acc +34 325 | acc -18 326 | acc +41 327 | jmp +156 328 | acc +17 329 | acc +37 330 | jmp -243 331 | nop -318 332 | acc +45 333 | acc +33 334 | jmp +139 335 | acc -6 336 | acc +34 337 | acc +25 338 | acc +3 339 | jmp +260 340 | jmp +1 341 | acc +24 342 | jmp +154 343 | acc +34 344 | acc -19 345 | jmp +211 346 | acc +28 347 | jmp +98 348 | acc +45 349 | jmp -143 350 | acc +41 351 | acc +8 352 | acc +33 353 | nop +217 354 | jmp +119 355 | acc +21 356 | jmp -150 357 | acc +25 358 | acc +19 359 | jmp +1 360 | acc +20 361 | jmp +209 362 | acc +43 363 | acc +18 364 | acc +2 365 | jmp -159 366 | acc +25 367 | acc +20 368 | acc -4 369 | acc +45 370 | jmp +89 371 | nop +33 372 | acc +27 373 | jmp +190 374 | acc +47 375 | acc +36 376 | jmp +180 377 | acc +3 378 | jmp +1 379 | jmp -349 380 | jmp -6 381 | jmp -244 382 | acc +2 383 | acc +42 384 | jmp -357 385 | acc +3 386 | jmp -377 387 | acc +31 388 | nop -292 389 | acc +6 390 | acc +9 391 | jmp -212 392 | jmp -91 393 | acc +11 394 | jmp +119 395 | acc -18 396 | acc +38 397 | acc +31 398 | jmp -261 399 | jmp +1 400 | acc +2 401 | jmp -197 402 | acc +0 403 | jmp +1 404 | acc +40 405 | acc +31 406 | acc +4 407 | acc +45 408 | jmp -68 409 | acc -17 410 | acc +8 411 | nop -384 412 | jmp -193 413 | acc +22 414 | nop +170 415 | acc -19 416 | acc +34 417 | jmp -321 418 | acc +46 419 | jmp +130 420 | acc -19 421 | jmp +115 422 | acc -12 423 | acc +23 424 | acc +16 425 | jmp -94 426 | acc +11 427 | nop -286 428 | jmp -276 429 | acc +36 430 | acc +25 431 | jmp -32 432 | acc +6 433 | acc +39 434 | jmp +171 435 | acc -5 436 | nop -131 437 | jmp -368 438 | acc +41 439 | acc -7 440 | nop -336 441 | jmp -428 442 | acc +21 443 | acc +45 444 | jmp -225 445 | acc -2 446 | acc +14 447 | acc +29 448 | jmp -439 449 | acc +36 450 | acc +26 451 | jmp -433 452 | acc +29 453 | acc +36 454 | acc +31 455 | jmp -232 456 | nop -210 457 | nop -44 458 | jmp -382 459 | nop -119 460 | acc +43 461 | jmp +1 462 | jmp -24 463 | acc -13 464 | acc +22 465 | acc +16 466 | jmp +90 467 | nop -443 468 | acc +23 469 | acc +15 470 | acc -3 471 | jmp -225 472 | jmp -448 473 | acc +21 474 | acc -19 475 | acc +23 476 | jmp +1 477 | jmp -447 478 | acc +36 479 | acc -1 480 | acc +31 481 | nop +8 482 | jmp +97 483 | jmp -96 484 | acc -16 485 | acc +7 486 | acc -2 487 | jmp +1 488 | jmp -237 489 | jmp +1 490 | acc -12 491 | acc +29 492 | acc -1 493 | jmp -188 494 | acc +8 495 | jmp -453 496 | nop -234 497 | acc +46 498 | acc +20 499 | acc +24 500 | jmp -68 501 | jmp -178 502 | acc +42 503 | jmp -469 504 | acc +19 505 | acc +35 506 | jmp -4 507 | acc +49 508 | jmp +65 509 | nop +15 510 | nop -209 511 | acc +27 512 | jmp -261 513 | acc +15 514 | jmp -344 515 | acc +13 516 | acc +43 517 | jmp -194 518 | jmp +1 519 | jmp -335 520 | nop -424 521 | acc -13 522 | nop -387 523 | jmp -333 524 | acc +33 525 | acc +30 526 | jmp -272 527 | acc +16 528 | acc +5 529 | acc +21 530 | acc +41 531 | jmp -312 532 | acc +50 533 | jmp -429 534 | nop +57 535 | jmp -212 536 | acc +7 537 | acc -13 538 | jmp -252 539 | jmp -277 540 | jmp -114 541 | jmp -528 542 | jmp -40 543 | jmp -275 544 | acc +27 545 | nop -322 546 | jmp -356 547 | acc -11 548 | jmp -96 549 | nop -9 550 | acc -15 551 | jmp -194 552 | acc +9 553 | acc +47 554 | acc +44 555 | jmp -459 556 | acc -2 557 | acc -12 558 | nop -354 559 | jmp -166 560 | acc +44 561 | acc +23 562 | jmp -503 563 | acc +47 564 | acc +39 565 | acc +10 566 | acc +14 567 | jmp -543 568 | acc +43 569 | jmp -25 570 | jmp -52 571 | acc -19 572 | jmp -423 573 | acc +35 574 | acc +22 575 | acc +10 576 | acc +16 577 | jmp -527 578 | jmp -482 579 | acc +2 580 | acc +21 581 | acc -17 582 | jmp -417 583 | jmp -282 584 | acc +16 585 | nop -424 586 | nop -527 587 | jmp -207 588 | acc +23 589 | acc +21 590 | jmp -503 591 | acc +17 592 | acc -14 593 | jmp -189 594 | acc +43 595 | acc +14 596 | acc +11 597 | nop -427 598 | jmp -54 599 | acc +8 600 | nop -37 601 | nop -542 602 | jmp -332 603 | acc +27 604 | jmp +7 605 | jmp -98 606 | acc +50 607 | acc +0 608 | acc +48 609 | acc +0 610 | jmp -517 611 | acc +15 612 | acc +10 613 | jmp -478 614 | jmp -141 615 | acc +0 616 | acc +18 617 | jmp -468 618 | acc +49 619 | jmp -112 620 | nop -536 621 | acc -14 622 | acc -13 623 | acc +34 624 | jmp +1 -------------------------------------------------------------------------------- /2020/days/day03/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | ...#...#....#....##...###....#. 2 | #.#...#...#....#.........#..#.. 3 | .#....##..#.#..##..##.......... 4 | .....#.#.............#..#...... 5 | .......#...#.##.#......#..#.#.. 6 | #.#....#......##........##..... 7 | .....##.#....#..#...#...##...#. 8 | ...#...#..#.......#..#...##...# 9 | ..........#...........##....... 10 | ..#..#..#...................#.. 11 | #..#....#.....##.#.#..........# 12 | .#.##.......###.....#.#...#.... 13 | .#..##....##....#.......#...### 14 | #.#..##...#.#..#............... 15 | .........#....#.......##.#.#... 16 | ...###...##....##...#..##.#..#. 17 | ....#.........#..#...#.......#. 18 | ....................#..#.#.#... 19 | ..#....#..........#...........# 20 | .#.....#..#.....##........##..# 21 | #..##..#...##............#..##. 22 | .#..##....#..........#..#.##.#. 23 | ..#####..#.#............##..... 24 | ...###.#....##..#.#....#.....#. 25 | .#.......##....#...#.#.....##.. 26 | ...#....#...##.#...#..#........ 27 | .####.....#....#.#.#...#....... 28 | ...#....#.....#.......#........ 29 | #..#.#.......#...#............# 30 | ...#.....###.##....#.#.###.#... 31 | .#.........#.......#.#....##... 32 | #.#..#...#.#...##......#..#.... 33 | .....#...#..#.#...#..###..#.... 34 | ......#.........#...###........ 35 | .....#..##...#..........#.....# 36 | ..#..#.#.##.#...#....#....##..# 37 | ##....#.##...#.##.#..##....#... 38 | .....#.#.#.#..#....##.#...#.#.. 39 | .....##.......#........#....... 40 | ...#.#.....#...#...##.#......## 41 | ........#..#.#...#.#.....#.#..# 42 | #..##...#.#...##..##...#.#...## 43 | .##.#.#..#...#.....#.#.##.#...# 44 | .#.####.........##.........#..# 45 | .##..............#....#...#...# 46 | ......#...#..#...#..#..###.#... 47 | .......##...#.#.#..##..#......# 48 | .....#....#..##..#.........#... 49 | .....#..#.#.#........#.#.####.. 50 | #..#.......###....##........... 51 | #..##..........#.#......#.#.... 52 | .....##........#...#..##....... 53 | ###...#.##.#.#.#.#.##...##..... 54 | ....#...#........##.#.##..##... 55 | .#..#.#.#......#.......##..#..# 56 | .#...#.................#....#.. 57 | .##..#..........#..##.......#.. 58 | .#.#.#.....#..#.#.........##..# 59 | ...#......##...#.......#...##.. 60 | ##...###....#.###.............# 61 | #.....#.#..#.#..#........#.#.#. 62 | .....#.#......##..#.#.....#.##. 63 | .......#...........#..#.......# 64 | ..#....#.#.#......#.....#...#.. 65 | .....##........#..##..#..##.... 66 | #.#........#...##....#.#..##... 67 | #......#......#....#..#...#.##. 68 | ....#.#.......#.#.#............ 69 | ......####.#.##...#.#.##.....## 70 | ..###.#.#..#.........#.####.... 71 | .#.......#..#.#....#.#..#.#.##. 72 | #....#....#............##...##. 73 | ....#....#............#....#..# 74 | ..#........#..#....#..#..#...#. 75 | .#......##....#..........#....# 76 | #.##.....#..........#.###.#.... 77 | ....##...#.....#.#......#.##... 78 | #.#.....#.......###.###..#..#.# 79 | ..###..##.............#.####.## 80 | #....#.....#....#..##.......#.. 81 | .....#....#...#.#.#.#..#...#.## 82 | ...#.....#..#....###......#.#.# 83 | ##.........#.#..#..#.#..#.....# 84 | .#.....#.#....#.........##..#.# 85 | .#.#..#.###..#..#..........#... 86 | .##....#.#.#...#......##.....#. 87 | #.#....#....#...#...##...#..#.. 88 | #...#........#....#....#......# 89 | #......#...#..#.#.##.....##..#. 90 | ....#...#......##...#..#....#.. 91 | .#......##.##.......#.......#.. 92 | .#...#..####...........#.#.#... 93 | .........#...#.#.........#..... 94 | #.##.....#.#..#.#.###...###..#. 95 | #...##.###......#.###..##.#.##. 96 | ...##.#.....#....#..#......#... 97 | #....###.#..#...##.....#......# 98 | ........###...#...#............ 99 | ........#....#...#...#....#...# 100 | #....#..#..#....#.#........#.#. 101 | ##...#.....#.#..........#..#..# 102 | #.#...##.....#........#...#...# 103 | ##.#.#.......#...#..#.###....#. 104 | .#.......#....##..##...#.....#. 105 | #....#....#.....#.......#...... 106 | .##.##.##...##...#.#.#..#..#... 107 | #..#..#.##....#......##....###. 108 | .......#.#.........#..##.#...## 109 | .#..##...#....#.....#.......... 110 | ..#.#...#......#.#..#.......... 111 | .##....#.#.#.##.......###...#.. 112 | ..##.#...#.#.#.#.......#..#.... 113 | #..#.......#...#........#.....# 114 | .....#.......#......###..#..... 115 | ...##.#.......#.....##.....##.. 116 | ##..#.......#.#.....#....#..... 117 | ..#....#.##.##...#...#......#.. 118 | .#..#.###.#....###........#...# 119 | ....##.##...##..#..#.#....#.... 120 | ..###...##.....##.............. 121 | #....#...##...#....#..........# 122 | .##........#......##...##...#.# 123 | ..#.#.##..........#......#..... 124 | ...#...#.........#.##........## 125 | ..#.#..#.#..#...#....#...#..... 126 | ...##...#..#.###.#..#.#...#.... 127 | ....###........#..#..##...#.... 128 | #.#....##.......#.#........#... 129 | .###...#..#.#.#.#..#...#..##.## 130 | ..#.........#####.#......#..#.. 131 | #.....#.....##..#....#...#...#. 132 | ...#..#....##....##.....##.#... 133 | .........#............#.##..... 134 | ....##.#..#....#.##.......#..## 135 | .###....#.#..#......#.#.......# 136 | .###...###.#.........#.#..#...# 137 | .....#........#..#.#..#.#..##.# 138 | .###..#....##.........#..##.... 139 | ..#.......#..#..##...#.###.#... 140 | #.......#...........#.#...#.### 141 | #.##.##...##.#...##..#.....#... 142 | ..#..#........###.#.....##..... 143 | #.....##....#...##...####..#..# 144 | ....#........#...#...#......... 145 | ......#.#.#.#.......#..#.....## 146 | ..#..#....#.....#.#...##......# 147 | ..#....#...#.###.........#.###. 148 | ...#......##..#.#.....#...#.... 149 | ...#.......#...#...#........##. 150 | ............#...#..#....#.....# 151 | ....##......................#.. 152 | #.#.#....#....#..........##.... 153 | #.#.....#.#.##..#...#.##....##. 154 | ...#...#..#...#..#.#.#.......#. 155 | #.....#..........#.........##.# 156 | #...##..#..#.#.......###....#.. 157 | .#...#..##....#.....##.......#. 158 | ....#.##.....#.........#.#....# 159 | ........#.#...####..#.......#.# 160 | .####...#.#......####.....#.##. 161 | ###..#....#..#.......#.#..##..# 162 | #......#.#....##..#.##.#....#.# 163 | ...###...#...#..##.#..#..#.#... 164 | ...##..##....#..#.....#........ 165 | .....#..............#......#..# 166 | ......#....#......#..#......... 167 | #..#.....#.##...........##..... 168 | .#..#.#..................##.... 169 | #.#..#..##...#....#.#......#... 170 | .##.#.##......#.##...#...#...#. 171 | ..#...#.........#.#..#.#....#.. 172 | .#.####.#..#.#......##.#..#.... 173 | #..#.......#....#.............. 174 | ....#............#..#.......... 175 | .....#####.....#.....#..##...## 176 | #.#....#.#...............#..##. 177 | .#.#..#...#......#.....#.#.#... 178 | .#....#.#.#......#.....##....#. 179 | ....#....#.##..#.......###...## 180 | .....#..#.##...#...#...#..#.#.. 181 | ##..#........#.#..#..##......#. 182 | .#..#..##.......#..#.....#..... 183 | .#.#.....###..##.#.#........... 184 | ..##..##.####..........#..#.... 185 | ..##..#..#...#....#......#.#... 186 | #...#.#......##.....##.#..###.. 187 | #..#..............#........##.# 188 | .........#.##..#.#..#..##.##.#. 189 | #....##....#.#..#.#...##..#.... 190 | .#....#.......#............##.. 191 | .......#.#.......#...#.#......# 192 | ......##...#.......#.#........# 193 | ..###..#.#.##....##...#....##.. 194 | ..##.##..........##..###....... 195 | .#.#.#..#..#.#.......#.#...##.. 196 | ..#..##.........#.###..#......# 197 | ....#.#.#...##.#...#...##..###. 198 | ..###..##.........##...#...#..# 199 | .#..##...#.......#.......#..#.# 200 | ........##....##....#.#.###.#.# 201 | #.....#.#.................#.#.. 202 | ....#.#.#.....##.####.#......#. 203 | ....#.......#.#.##.##.......... 204 | ...#...........#...#.##...#.### 205 | #....#....#..........#.##...... 206 | ##..#...........##.....##.##... 207 | .#.##...##..##....#..#.....#### 208 | #...#...#.##..........##..##... 209 | ....##..#....#.....#.#...#....# 210 | ..#....#..##...###.#.#......... 211 | #......#.#.#...#...#.........#. 212 | #............###.#.#.#..##...#. 213 | .##.....####...##..##..#..##.#. 214 | #..#........#.....#.#.....#...# 215 | #............#....#.#.#........ 216 | ......##...##.#....#.....#...#. 217 | ..#........##......#.#.....##.. 218 | .#..#..#.....##.......#..#.#..# 219 | .#....#..#....##.#.#.#..#..#.## 220 | .####.#..........#...#..##..... 221 | ...###..###...##..#............ 222 | #..#.....##.#...#..##..#....... 223 | .....##....#...###.##...#...... 224 | ...##..#...#..#..##....##....#. 225 | ...###....#.###.#.#.##....#.... 226 | ##.#.#.....#....#.#....#..#.... 227 | .......##.....#.#..##...##...#. 228 | .#....#.#...##.#..#....#.....#. 229 | ..#...#..#...#.##........#...#. 230 | #....#......##.#....##...#.#..# 231 | .....#..#..#..#......#...#.#.#. 232 | ..###....#........#...#.......# 233 | ###...#.......#.#.......##.##.. 234 | ......##.....#.#........#....#. 235 | #.##..#.#.#.#..#....#.##.....#. 236 | ..........#.##.#...#...#..#..#. 237 | ..#...##.#..........#..##.###.. 238 | ..###..##.##..#.#...##.####..#. 239 | #.#.#...............##....###.# 240 | ....#.........#.#....#.#....#.# 241 | ..#...#.###...#....###.....#... 242 | ..#..#....#...#............#... 243 | .#..#....#..##.....##.......... 244 | ..#....#.#...#.#.#.#.......##.# 245 | .........#....##........#.#.... 246 | ...#..##.#..#.##...#...#.#....# 247 | ....####...#...####.#....###..# 248 | ......##...#.##.#.......#..#... 249 | #.#...#.#...#.#...#....#.#.#... 250 | .#.....##...#.....###.#....#... 251 | ......##.....###...#.#...#.#... 252 | #..#..##.#.#......#....#..#..#. 253 | ....#.###.....#..#...#.##.....# 254 | ##.##........#......#....#..##. 255 | ##.....##.#.....#.....##.....#. 256 | .....#.##...#.#..#.#.#.....#... 257 | .#.##..#...#.#..#.....#.#...... 258 | .....##.......#..#...##..#..#.. 259 | #.....#..#.####......#........# 260 | .#..#..##.#..##............#..# 261 | .##..#.#....##.##.....#......#. 262 | .......##.........#..#......... 263 | .#...#.......................#. 264 | #......#.#....##.#.......#..#.. 265 | ..##..##......#.......#....#.#. 266 | ##......#......##...##......... 267 | ..#....####....#.#.....##.#.#.. 268 | ..........#..#.#.#.....#..#.#.. 269 | ##..##...........##.......#.... 270 | ##....#.#....#..#......###....# 271 | ...#.#.#..#.......##.......#... 272 | #....#.......#.......#......... 273 | ...##......##....#...#......#.# 274 | #......#####.#.........#.....#. 275 | #..#.............#..#....#...#. 276 | .......#.##..#..#..#..#....#### 277 | ......#.##..##..........###...# 278 | .#.##....###..#........#....##. 279 | #......#..#...###.#...#.....#.. 280 | .#.#.......#....##.......#.#... 281 | ..#.##..#..##.....#.........#.# 282 | #.#...#..#.##....#.......##.... 283 | .#.....###....#.#..#...#.....#. 284 | #...#..#.......#.#.....##...#.# 285 | #.#####.........#....##.....#.. 286 | #....#..##...#....#.##.......#. 287 | .#.#.........##....##....#..... 288 | ...#..##.......#....#.#.#...... 289 | #.###.##...###....#.....#.####. 290 | .#...#.#.#..##.#..........#.... 291 | #.#.....#.##.#..####.....##.#.. 292 | ...###.##..####.......#......## 293 | .##..#.........#...#.#.....#.## 294 | ..#.....##....###.....#.#...##. 295 | #....#....#..#....#.##......... 296 | ......###....#.#..#..#....##... 297 | .#.#................#.......##. 298 | ...#.......#.........#.#....... 299 | ...#..........#...##.....###... 300 | ....#......#...#............... 301 | .##...#....#.....#.##......#... 302 | .#.....###...##..##...#.#...... 303 | ....##........#.....#...#....#. 304 | #.........#.#...##...#.#..#.... 305 | ...#.#.....#.#........#.#....#. 306 | .#........#.....#.#.#.#.#..#... 307 | ....#...#.....#.#....#........# 308 | ..###.#....#.#....##...##..#.## 309 | .#....#.#.####.#.#.....#....... 310 | .#...#...#.................##.# 311 | ..................##..#..#.#.#. 312 | .#..#............##....###..... 313 | .......#....#...........#...... 314 | ....#.#.#.....###.........#..## 315 | ...#.#....#.#.##.#.##.....##..# 316 | .#.##.#...##...#.......#.....## 317 | .#............#...#..##...#.#.# 318 | #.##..#.##..#..##.###.#........ 319 | ..............##....#...#..#.#. 320 | .#.#...#.#....#....###........# 321 | .#....#.#....#......###........ 322 | ..#.......##......#.##.....#... 323 | .....#......#..#...#.#.....#... -------------------------------------------------------------------------------- /2020/days/day05/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | FBFFBFFRLL 2 | BFFFFBBRLR 3 | FFFBBBBRLR 4 | FBFFFBFLRL 5 | FFBFBFFRRL 6 | FFBBBBFRRR 7 | FBFFBFBLRR 8 | FFBBFBFRRL 9 | FFFFBBFRRL 10 | BFBBBBBLLL 11 | FFBFBFBLLL 12 | FFBFFFBLLL 13 | FBBBFBFRLL 14 | BBFFFBFRRR 15 | FFFBFBBLLR 16 | FBFBFBFRRR 17 | BBFFBFBRLL 18 | FBFBBBBLRL 19 | FBFFFFFLLL 20 | BFFFFFFRLL 21 | BFFFBFBLRL 22 | BFBBBFBRRL 23 | BFFFBFFRRL 24 | FBFFFFFRRR 25 | FFBBBBBLLR 26 | BFBBFFBLRL 27 | FBBFBBBRLR 28 | BFBFBFFRLL 29 | BFBFBFBRLL 30 | BFFBFBFLLL 31 | FFBBFFBLRL 32 | FBBFFBFLRR 33 | FBBBFBBRRR 34 | BFBFFBFRLR 35 | BFBBBFBLLL 36 | FFBFBBBLRR 37 | BFBFFBFLLL 38 | FBFBFBBLLL 39 | BFBBBFBLRL 40 | FBFBFBFLRL 41 | FFBFFBFRRL 42 | FBBFFBFLLL 43 | BFBBBBBLRL 44 | FBBBBBFRLR 45 | BFFFBBFRLL 46 | FBBBBFFLLR 47 | FBBBBBFRLL 48 | BFBBBFFRLR 49 | BFBBBFBRLL 50 | BFFFBFFLLL 51 | FFFBFBFLRL 52 | BFFBBFFLRL 53 | BBFFFBFRLL 54 | BFBBFFBRLR 55 | BFBFBFBRRL 56 | BBFFFBFRRL 57 | FBBFBBBLRR 58 | FFBFBBBLLL 59 | BFFFBFBRLR 60 | FFBBFBBLLL 61 | FBFBBFBLLL 62 | BFBBFBFLLR 63 | FFBFBBBRRL 64 | FFBFFFFLRL 65 | FFFBBFFLRR 66 | FBBBBBFRRR 67 | FFFFBBBRLL 68 | BFBFBBBRRR 69 | BBFFBFBRRL 70 | FBFBBFFRLR 71 | FBBFFBFRRR 72 | BBFFBFBRRR 73 | FBFBBFBLRR 74 | FBBFFBBLRR 75 | FBBBBFFRLL 76 | BFBFFFBRLR 77 | FBFBBFBRRL 78 | FFBFBBFRRR 79 | FBFBFFFRLL 80 | BFBBFFBLLR 81 | FBFFFFBRLR 82 | BFBBBFFRLL 83 | FFBBFFBRLR 84 | FFFBBFBRLL 85 | FBBBBBBLRR 86 | FBFFBBBLRR 87 | BFFFFBFLRL 88 | BBFFFFFLRR 89 | BFFBFFBLLR 90 | FFBBBFFRLL 91 | BFBFBFBRLR 92 | FBBFBFBLRR 93 | FBFBBBFRLR 94 | FBFFBBBRRR 95 | FBBFFBFRLL 96 | FBBBFFFRLR 97 | BFBBBBFLLR 98 | BFFFBFFLLR 99 | FFBFFFBRRR 100 | FBFFFBFLLR 101 | FFFFBBBLLR 102 | BFBFFFBRLL 103 | BFFBBFBLRL 104 | BFFBFBFLLR 105 | FFBFFBFRLR 106 | BFBFFFBRRL 107 | FFBBFBFLLL 108 | BFBBBBBRLR 109 | BFBFBFBLRR 110 | FBFFBFBLLR 111 | FBFBFBBRRL 112 | BFBFBBBLLL 113 | FFBBFBBLRL 114 | FBFFFBFRRL 115 | BFBBFFFLRR 116 | BFBFBBFRRR 117 | FBFFFFBLRL 118 | BBFFBBFRRR 119 | FFBFFBBRLR 120 | FBBFBFBLRL 121 | BFBFFFBRRR 122 | FFFBBBFLRL 123 | BFFBFFBRLL 124 | FBFBFFBLRR 125 | FFBFBBFLLL 126 | FFBBBFFLRL 127 | FFBBFFFRLR 128 | BBFFBFBLRL 129 | FFFFBBFRLR 130 | FFFBFFBLRR 131 | BFFBBBFLLR 132 | BFFFBBBRRL 133 | FBBFBFBRLL 134 | BFFBFFFRRR 135 | BBFFFFFLRL 136 | BBFFFBBRLL 137 | BFFFBBBRRR 138 | BFFFBBBLRL 139 | BBFFBFFRRR 140 | BFFBFFBLRL 141 | FBBBBFBRLR 142 | FFFBFBFRRL 143 | BFFBBBBRRL 144 | FBBBBBFLRR 145 | FBFBBBBLLR 146 | FBBBBFBLRR 147 | FFFBFFBRLL 148 | FFBBBBFLLR 149 | FFBBBBBRRL 150 | FBBFFFFLLL 151 | FBFFBBBRLL 152 | FBFBFFBLLR 153 | FBBBBBFRRL 154 | BFFFBFBLLL 155 | FFFBFFFLRL 156 | FFFFBBFRLL 157 | BFBBFFFRLR 158 | BFFFBBBRLR 159 | FFBBBFBLLR 160 | BFFFBFBRRR 161 | BFFBFBBLRL 162 | FFBFBFBLRR 163 | FBBBBFBRRR 164 | FFBFBFFLLR 165 | BBFFFFFLLR 166 | FBBBFBFRRR 167 | BBFFFFBRRL 168 | FBFBFBBLRL 169 | BFBBBFFLLR 170 | BBFFBBFLRL 171 | BFBFFBBRLR 172 | FBFBBBFRRL 173 | FBBBFFBRLL 174 | BBFFFFBLLR 175 | FFBBFBBLRR 176 | FBBBBBBRLR 177 | FFFFBBBRRL 178 | FBFBBBBRLR 179 | BBFFBFFRRL 180 | FBBBFFBLRL 181 | FFBBBFBLRR 182 | BFBFBBBRLL 183 | FBFFFBBLRL 184 | FBFBBBBRLL 185 | BBFFFBBLLL 186 | BFBBFFBLLL 187 | BFFBBBBRRR 188 | FBFBFFBLLL 189 | FBFBFBFRRL 190 | FBBFFFBLLL 191 | BBFFFBFRLR 192 | FBBBBFFLRR 193 | FBFFFBBRLL 194 | FFBBFBFRRR 195 | FBFFFFFLRR 196 | BFBFFBBLRR 197 | FFBFBFFRRR 198 | BFBFFBBRLL 199 | FBBFFFFRRL 200 | BFFBBFBRLL 201 | BFFFFFBLLR 202 | FBFBBFBLLR 203 | BFFBBFBRLR 204 | BFFBFBFRRR 205 | FFBFBBFRLL 206 | FFFBBBBLRR 207 | BFFFBFBLLR 208 | FBBBBFBLRL 209 | FBFBBFFLRL 210 | FFFBFFFRLL 211 | BFFFFBBRRL 212 | FBBFFFBRRR 213 | FBBFBFFLLR 214 | BFBBBBBRRR 215 | BFFBFBFRLL 216 | FFBFBBFRRL 217 | BFBFBFBLLR 218 | FFBFBBFLLR 219 | FFBFFFFLRR 220 | FBBBFBBRRL 221 | BFFBFBFRLR 222 | BFFBFFBRRL 223 | BFBBBFBRLR 224 | BBFFFFBLRL 225 | FBBBFFBRRL 226 | FBFFFBBRRL 227 | FBBBBBBLLL 228 | FFFBFFBLLL 229 | BFBBFBFRLL 230 | FBFBFFBRLR 231 | FFFFBBBRRR 232 | BBFFFBBRLR 233 | BFBBBBFRLR 234 | FBFFBBFLRR 235 | BFFFBFFRLR 236 | FFFBBBBLLR 237 | FBFFFFBLRR 238 | FBFBFBBRLL 239 | FBFFBBBRLR 240 | BFFFFFFLRR 241 | FBFFFFFRLL 242 | FFBFBFFRLL 243 | FFFBBFFRLR 244 | FBBFBFFRRL 245 | FBBBBBBRRR 246 | BFBFBBBLRL 247 | BBFFFFBRRR 248 | FFBFFBBLRL 249 | FBBBBBBLLR 250 | FFBBFFFLRL 251 | FBBBFBBLRR 252 | FFBBBBBRLR 253 | BFBFFFFLLR 254 | BFFBBBBRLL 255 | BFBFBFFLRL 256 | FBBFFFBLRL 257 | BFBFBBBRRL 258 | BFBFBFBLRL 259 | BFBBFBFLRR 260 | BFFFFBFRLR 261 | BFFFBFBRLL 262 | FBFBFBFLLL 263 | FBFFBFFLRL 264 | BFFFFFFRRL 265 | FBBFBFFRLR 266 | FFBBBFFLLR 267 | FBBBBFFLRL 268 | FBBBFBBRLR 269 | BFBBBFFLRL 270 | FBFFBBBLRL 271 | BFFFFBFRRL 272 | BFFFBFFLRR 273 | FFBFBBFLRL 274 | BFBFFFBLRL 275 | BFFFFFBLLL 276 | FBFFBFBLLL 277 | FBFBBBBRRL 278 | FBBFFBBRLR 279 | BFFFBBFRRL 280 | BFBBFBBRLR 281 | FFFBFBBLRR 282 | FFFBFBFRLR 283 | FBFBFBFRLR 284 | BFBFBBBRLR 285 | BFFFFBBLLL 286 | BFFBBFBRRR 287 | BFFBBBFLLL 288 | FFBBBFFRRL 289 | BFBBBFBLLR 290 | FBBFFBBLLR 291 | FBBFBBFLRL 292 | BFFFFFBRRR 293 | FBBBFBBRLL 294 | FBFBFFBRRR 295 | BFFBBBFRRR 296 | FBBBBBBLRL 297 | FFBBBFFLRR 298 | BFFBBBFRLL 299 | BBFFBBFRLL 300 | FBBFBBFRLR 301 | BFBFBFFRRR 302 | BFBFBBFLRL 303 | BFFFFBFRLL 304 | FFBBFBFLLR 305 | BFFBFBBLRR 306 | FBFFBBBRRL 307 | FBBFBBFRLL 308 | FBFFFBBLLR 309 | FFFBBBBRRR 310 | FFFFBBBLRL 311 | FFBBFFFRRL 312 | BFFBBFFRRL 313 | BFFFBBFLRL 314 | BFFFFBBLRR 315 | BBFFBBBLRR 316 | BFBFFFFLRR 317 | FBFBBBBLLL 318 | BBFFFBBLRR 319 | FFFBFBFLRR 320 | FBBFFFFLRL 321 | FFBBBBFRLL 322 | FBFFBFBLRL 323 | BFBBFBBLLL 324 | FBBFBBFLLL 325 | FFBFFBBRLL 326 | BFBFFFFRLR 327 | FBFFBBFRRR 328 | FFFBBFFRRR 329 | FFFBFFBRLR 330 | FBBBBBFLLL 331 | FBBBFFFLRL 332 | FFBBFFFLRR 333 | FFFBBBBRRL 334 | BFBFBBFRLL 335 | BFBFFBBRRL 336 | FBBFBBFRRL 337 | BFBFBBFLLR 338 | BBFFBBBRRR 339 | BFFFBBFRLR 340 | FFFBBBFRLR 341 | BFFBFFFRLL 342 | BFBFFFFRRL 343 | FFBBFFFLLL 344 | FBFBBBBLRR 345 | FBFBFFFLRR 346 | BBFFBFFLRR 347 | FBBBFBBLRL 348 | BFBFBFBLLL 349 | FBFBFFFLLR 350 | BFFBBFBLRR 351 | FBBFFFBRRL 352 | BFFBBFFRRR 353 | FBBFBBBRRL 354 | BFFFFBBLLR 355 | FFBBBBFLLL 356 | BFFBFFBRRR 357 | BFFFFBFRRR 358 | FFFBBBFRRR 359 | FBFBFFFRLR 360 | FBBBFBFLLR 361 | FFBBFFBRLL 362 | FBFBFFFLLL 363 | BFFBFBFRRL 364 | BFBFFBFRRL 365 | BFBBBBFLLL 366 | FBBBFBFRRL 367 | FFBFBFFLLL 368 | BFBBFFFRRL 369 | FFBBFFBLLR 370 | BFFBBBBRLR 371 | FFBBBBBLRR 372 | BFFBFFFRRL 373 | BFFBFBBRLL 374 | FBBBFBFRLR 375 | FBBFFFFLRR 376 | BFFFBBFLLR 377 | FFFBBFBRRL 378 | FFBBFFBLRR 379 | FBBFFFBRLR 380 | BFBBBBBRLL 381 | BBFFFFFRRL 382 | FFBFFBBRRL 383 | BFBFFBFLLR 384 | FBFBBBFLLL 385 | FBFFFFFRRL 386 | BFFFBFBLRR 387 | FBFFFFBLLR 388 | FBBFBFBRRR 389 | FBBBFFFLLR 390 | BBFFBFBLRR 391 | BBFFFBFLLL 392 | FBFFFBFRLR 393 | BFFFBFFLRL 394 | BBFFBFFLRL 395 | BFFFFFFLLR 396 | BBFFBBBLLL 397 | FFBFBBBLLR 398 | FBBFBBBLRL 399 | BFBBFBBLRR 400 | FFBFBFBLLR 401 | FFBFBFBRRL 402 | BFBBFBBRRL 403 | BFFBFFFLLR 404 | FFBBFFBRRL 405 | BBFFBBBRRL 406 | FFFBBFBRLR 407 | BFBBFBFRRR 408 | BFFFFFFRRR 409 | FBBBFFBLLL 410 | BFBFFFFLLL 411 | BBFFBFBLLR 412 | BFBFBBFRLR 413 | FFBFBBBRRR 414 | BFFFBBFLLL 415 | FBFFBBFRLL 416 | FFBBFBFRLL 417 | BFBFBBBLLR 418 | FBBFBFBLLL 419 | BBFFFFBRLL 420 | BBFFBFBLLL 421 | BFFBFFBLRR 422 | BFFBBFBLLL 423 | FFBFFFBLRR 424 | FBBFFBFRRL 425 | FBBBBFBLLL 426 | FFBFFBBLLR 427 | BFFBBBFLRR 428 | FBFBFFBRLL 429 | FFBFFFBRLL 430 | FFBFFBFLLL 431 | FBFBBFBLRL 432 | FBBFBFFRRR 433 | BFBFBFFLLR 434 | FBBFFFBLLR 435 | BFBBBBFRRR 436 | FBBFBBFRRR 437 | BBFFBFFRLR 438 | FBFBBBFRLL 439 | FBBFBBBLLR 440 | BFFFFFFLRL 441 | BFBFFBBRRR 442 | BFFFBFFRLL 443 | BFBBFBFLRL 444 | FFBFFFFRRR 445 | BFFBBFFRLR 446 | FBBBBBFLLR 447 | FBFBFFBLRL 448 | FFFBBFBLLR 449 | FBBFBFBLLR 450 | FFFBFFBRRR 451 | FBFFFFFRLR 452 | FBFBBFBRLR 453 | FBBBFBFLRR 454 | FBFBBBFLRL 455 | BFFBFFFLRL 456 | FFBBBFFRRR 457 | FFBBBBBLLL 458 | FBFFBBFLLR 459 | FFBFBFFLRR 460 | FFFBBBFLRR 461 | BFBFBBFLLL 462 | BBFFBFFLLR 463 | FFBBFBBRLL 464 | FBBFFBBLLL 465 | FBFFBFBRLL 466 | BFBFBFFLRR 467 | FBBBFFBRLR 468 | FFBFFBFRLL 469 | FFFFBBBLLL 470 | FFBFFBBRRR 471 | FBBBBFBRLL 472 | BFFFFBBRRR 473 | FFBBFFFRLL 474 | FFBFBFBRLL 475 | BBFFFFBLLL 476 | FFBBBFBRRL 477 | BFFFFBBLRL 478 | FBBBFBBLLR 479 | FBBBFBBLLL 480 | FFBFBFBLRL 481 | FBBBBFFRRR 482 | FBBFFFFRLR 483 | FFBFFFBRLR 484 | BFBFBFBRRR 485 | FFFBFBBRLL 486 | FBBBFFBRRR 487 | FBBFBFFRLL 488 | BFFBFBFLRR 489 | BFBBBFFRRL 490 | BFFBBFBLLR 491 | FFBBBFBRLL 492 | FBFBFBBLRR 493 | BFBBFFFLRL 494 | BFBFBBFLRR 495 | BFBBBFFRRR 496 | FBBBFFFRRL 497 | FBFBFBFLLR 498 | FBBFFFFLLR 499 | FFBFBBFRLR 500 | FFFBFBBLRL 501 | BBFFFBBLLR 502 | BFFBBBFRLR 503 | FFFFBBBRLR 504 | BBFFBBFRLR 505 | FBFFFFBRLL 506 | FBFBFFFRRR 507 | FBFFFBBLLL 508 | BFBBBBFRLL 509 | FBFBFFBRRL 510 | FFFBFFFRLR 511 | BFBBFBFRRL 512 | FBFFBFFLRR 513 | FBFFFBBLRR 514 | FFBFBBBRLR 515 | FBBFBFFLRR 516 | FBFFFBBRRR 517 | FFBFBBBRLL 518 | FFBBBBBRRR 519 | BFFBBFFLLL 520 | BFBBBBBRRL 521 | BBFFBBBRLL 522 | FBFFFFFLRL 523 | BFFBBFFLRR 524 | FBFFBBFLRL 525 | BFBFFBFRRR 526 | FBFBBFBRLL 527 | BFFFBFBRRL 528 | FBBFFBFLLR 529 | BFFFFFFLLL 530 | FBFBFBFRLL 531 | FBBBBFFRRL 532 | BFBFFBBLLR 533 | FBBFBFBRRL 534 | FFFBFFFLLR 535 | FFBBBBBLRL 536 | FFBFFBBLRR 537 | FFFBFBFRRR 538 | BFBBFBBRLL 539 | BFBBBFBLRR 540 | FFBBBBFLRR 541 | FBBBFFBLLR 542 | BBFFBBBLLR 543 | FBFBBFFRRL 544 | FBBBBBFLRL 545 | FFFBBFFRRL 546 | BFFBBBBLRR 547 | FFFFBBBLRR 548 | FFFFBBFLRR 549 | FBFFFBFLLL 550 | FBFBFBBLLR 551 | BFFBBBBLLL 552 | FFBFFFFRLR 553 | BFBBFFBLRR 554 | FFBBFBFLRL 555 | BFBFBFFLLL 556 | BFFBFBBLLR 557 | BFBBFBBLRL 558 | FFBBBBFLRL 559 | FBBBFFFLLL 560 | FFFBFFBRRL 561 | BFFFFBBRLL 562 | BFFFBBBRLL 563 | BFFBFFFLRR 564 | FFBFBFBRRR 565 | BBFFBBFLLR 566 | FFBBFBBLLR 567 | FFBFFBFRRR 568 | FFBBBFFRLR 569 | BFFBBBBLLR 570 | FFFBFFFLRR 571 | FBFFFFFLLR 572 | FBFFBBBLLL 573 | BBFFBBFLLL 574 | FFBBFBFLRR 575 | BFFBFBFLRL 576 | FBFBBBFRRR 577 | BFBBFBBLLR 578 | FBFFFFBRRL 579 | FFFBBFBLRR 580 | BBFFFFBLRR 581 | BFBBBBFRRL 582 | FFBBBFBLLL 583 | BFBBFBFRLR 584 | BFBBFFBRRL 585 | BFBFBFFRRL 586 | FBBFFBBLRL 587 | FFFBFFBLRL 588 | BFFBBFFRLL 589 | FBBBFFFRLL 590 | FBBFBBFLLR 591 | FFBFFFFLLR 592 | FBBBFBFLRL 593 | BFFFBBBLLR 594 | FBFBBBBRRR 595 | FBBFBFBRLR 596 | FFFBFBFLLR 597 | FFFFBBFRRR 598 | FFFBBFFLRL 599 | BFBFFBFRLL 600 | FFFBFFBLLR 601 | FBBFFFBRLL 602 | FFBBBFBRRR 603 | FFBBFBBRLR 604 | BBFFFFFRRR 605 | FFBFFFFRLL 606 | FBBFFBBRRL 607 | BBFFFBFLRR 608 | FBBFFFFRRR 609 | FFBFFFBRRL 610 | BFBBFBFLLL 611 | BFFFFBFLRR 612 | BBFFFFFLLL 613 | FFBBFBBRRL 614 | FFBFBFFLRL 615 | FBFFBBFRRL 616 | BBFFBFBRLR 617 | BBFFBBFLRR 618 | FBFFBFBRRR 619 | FBBFBBFLRR 620 | FBFFFBFRLL 621 | BFBFFFFLRL 622 | FFFBBFBRRR 623 | BFBBBBBLLR 624 | FBBFFBBRRR 625 | FFBBBFFLLL 626 | FBBBBFBLLR 627 | BBFFFFFRLL 628 | FFBBBBFRLR 629 | FBFBFBBRRR 630 | FBFFBFFLLL 631 | FBFFBBBLLR 632 | FBBBBFBRRL 633 | BFBFBFFRLR 634 | FBBFBBBRLL 635 | BFBBFFFRLL 636 | FBBBFBFLLL 637 | FFBFFFFRRL 638 | FBFBBFFRRR 639 | FBFFFFBLLL 640 | FBBBBBBRLL 641 | BFFBFBBRRR 642 | BBFFBBFRRL 643 | FBBFBFFLRL 644 | FBFFFFBRRR 645 | FBBFFFFRLL 646 | FFFBFFFRRR 647 | FBFFBBFLLL 648 | BFFFFBFLLL 649 | BFFFFBFLLR 650 | FFBFFBFLLR 651 | FFBFFBFLRR 652 | BFFBBBBLRL 653 | FFBBFFBLLL 654 | FBBFBBBLLL 655 | FBFBBBFLLR 656 | BFFBBBFLRL 657 | BFBBFFBRLL 658 | FBFFBFFRRR 659 | FFBFFFBLRL 660 | FFFBBBFRRL 661 | FFBFBBFLRR 662 | FFFBBBBLRL 663 | FFFBBFFLLL 664 | FFFBFBBRRR 665 | FBBFBFFLLL 666 | BFFFBBBLLL 667 | BFFBFFFRLR 668 | FFFBBBBLLL 669 | BFFFFFBRRL 670 | FFBBFFFLLR 671 | BFBBFFFRRR 672 | BFBFFBFLRR 673 | FFFBBBFLLR 674 | FBFBBBFLRR 675 | BBFFBBBRLR 676 | FBFBBFFLRR 677 | FFBBBFBLRL 678 | FFFBBBFRLL 679 | BFFBFFBRLR 680 | BBFFFBBRRR 681 | BFBBBBFLRL 682 | BFBBBFBRRR 683 | FBBBBFFLLL 684 | FFFBFBBLLL 685 | BBFFFFFRLR 686 | BBFFBFFLLL 687 | FFBFBBBLRL 688 | FFBBFBFRLR 689 | BFBBBBBLRR 690 | FFBFFFBLLR 691 | FFBFFBFLRL 692 | BFFBFBBRLR 693 | FBFBFFFRRL 694 | FBBBFFFLRR 695 | FFFBBFFLLR 696 | FBBBBFFRLR 697 | FFBBFBBRRR 698 | BFBBFBBRRR 699 | BFBFBBFRRL 700 | BFFBBBFRRL 701 | FFFBFFFLLL 702 | FBBFFBFLRL 703 | FFFBFBBRLR 704 | BFBBFFFLLR 705 | BFBBFFBRRR 706 | FBFFBFBRRL 707 | FFBBBBBRLL 708 | BFFBFFBLLL 709 | BFFFBBFRRR 710 | FBFFFBFRRR 711 | FFBFBFBRLR 712 | FBFBBFFLLR 713 | FBBFBBBRRR 714 | BFBFFFFRRR 715 | FFBFFFFLLL 716 | FBFBBFFRLL 717 | BFBFFBFLRL 718 | BFBBFFFLLL 719 | FBFBBFBRRR 720 | BFBFFFBLLR 721 | BFBFFFBLLL 722 | BBFFFBFLLR 723 | BBFFBFFRLL 724 | FFBBBBFRRL 725 | BBFFFBFLRL 726 | BBFFBBBLRL 727 | BFBFFFBLRR 728 | FFFBFBFRLL 729 | BFBFFBBLLL 730 | BBFFFBBRRL 731 | BFBBBFFLLL 732 | BFFBBFFLLR 733 | FFBFFBBLLL 734 | BFFBBFBRRL 735 | BFFFFFBLRL 736 | BBFFFFBRLR 737 | FBFBBFFLLL 738 | FFBBBFBRLR 739 | FFFBBFBLLL 740 | FBFFFBBRLR 741 | FFBFBFFRLR 742 | BFFFFFBLRR 743 | FFFBBBBRLL 744 | FFBBFFFRRR 745 | BFFFFFBRLR 746 | FBBBFFBLRR 747 | FBFBFBBRLR 748 | FBBFFFBLRR 749 | BFBFFBBLRL 750 | FBFFBFBRLR 751 | FBFBFFFLRL 752 | BFFFFFBRLL 753 | BFBBBBFLRR 754 | BFFBFFFLLL 755 | FBFFBFFRRL 756 | FFFBBFFRLL 757 | BFFFBFFRRR 758 | FBFFBFFLLR 759 | FFFBBBFLLL 760 | FBFFFBFLRR 761 | BFFBFBBLLL 762 | BFFFBBBLRR 763 | FBBBBBBRRL 764 | FBFFBFFRLR 765 | FBBFFBBRLL 766 | FBBBFFFRRR 767 | BFFBFBBRRL 768 | FFBBFFBRRR 769 | BFBBBFFLRR 770 | FFFBFBBRRL 771 | BFBFBBBLRR 772 | FFFBBFBLRL 773 | FBFFBBFRLR 774 | BFFFBBFLRR 775 | BBFFFBBLRL 776 | FBBFFBFRLR 777 | FFFBFBFLLL 778 | FFFBFFFRRL 779 | BBFBFFFLLL 780 | FBFBFBFLRR 781 | BFBFFFFRLL -------------------------------------------------------------------------------- /2021/days/day02/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | forward 6 2 | down 3 3 | forward 8 4 | down 5 5 | forward 9 6 | down 2 7 | up 9 8 | down 9 9 | forward 8 10 | down 3 11 | down 8 12 | forward 2 13 | down 1 14 | up 3 15 | up 6 16 | up 9 17 | down 7 18 | up 7 19 | down 1 20 | forward 7 21 | down 7 22 | up 4 23 | down 2 24 | forward 8 25 | up 3 26 | up 1 27 | down 1 28 | down 6 29 | up 2 30 | down 5 31 | forward 4 32 | down 5 33 | down 3 34 | forward 4 35 | down 3 36 | up 8 37 | forward 1 38 | up 9 39 | forward 2 40 | up 7 41 | down 2 42 | down 9 43 | down 1 44 | down 6 45 | down 8 46 | down 6 47 | down 1 48 | down 1 49 | down 9 50 | down 9 51 | down 2 52 | forward 9 53 | down 1 54 | forward 4 55 | down 2 56 | forward 6 57 | down 8 58 | forward 4 59 | forward 8 60 | forward 4 61 | forward 4 62 | up 4 63 | up 9 64 | down 6 65 | forward 2 66 | forward 5 67 | down 2 68 | forward 1 69 | down 9 70 | forward 2 71 | down 8 72 | down 2 73 | forward 5 74 | down 7 75 | forward 7 76 | down 4 77 | up 3 78 | down 9 79 | forward 3 80 | down 7 81 | up 4 82 | down 5 83 | down 4 84 | forward 8 85 | down 2 86 | down 2 87 | forward 9 88 | down 9 89 | down 5 90 | down 1 91 | down 5 92 | forward 5 93 | down 1 94 | up 7 95 | down 2 96 | forward 7 97 | forward 6 98 | forward 5 99 | forward 4 100 | down 3 101 | forward 9 102 | up 1 103 | down 1 104 | up 8 105 | down 4 106 | down 7 107 | forward 2 108 | down 1 109 | up 9 110 | up 3 111 | down 4 112 | down 1 113 | down 9 114 | down 4 115 | forward 4 116 | forward 7 117 | down 7 118 | down 1 119 | up 6 120 | forward 8 121 | down 8 122 | forward 2 123 | down 4 124 | up 4 125 | forward 3 126 | down 1 127 | up 8 128 | up 2 129 | forward 3 130 | forward 5 131 | forward 7 132 | down 5 133 | up 2 134 | down 6 135 | forward 9 136 | forward 3 137 | down 1 138 | forward 7 139 | up 1 140 | down 4 141 | up 2 142 | forward 5 143 | down 1 144 | forward 2 145 | down 3 146 | forward 9 147 | down 1 148 | down 6 149 | down 7 150 | up 9 151 | down 5 152 | down 1 153 | forward 5 154 | forward 7 155 | down 6 156 | forward 1 157 | down 3 158 | forward 3 159 | forward 1 160 | down 7 161 | forward 9 162 | forward 7 163 | forward 4 164 | up 1 165 | down 8 166 | up 8 167 | down 3 168 | forward 9 169 | up 2 170 | down 4 171 | down 4 172 | down 3 173 | forward 7 174 | forward 3 175 | down 5 176 | up 4 177 | up 7 178 | down 6 179 | forward 2 180 | down 2 181 | down 9 182 | down 9 183 | down 7 184 | down 7 185 | forward 5 186 | forward 8 187 | up 2 188 | forward 9 189 | forward 5 190 | down 2 191 | up 6 192 | down 2 193 | up 2 194 | down 6 195 | down 3 196 | down 2 197 | down 3 198 | down 9 199 | forward 6 200 | up 9 201 | down 3 202 | forward 9 203 | forward 4 204 | forward 1 205 | down 3 206 | down 4 207 | forward 8 208 | forward 4 209 | down 7 210 | forward 9 211 | forward 2 212 | forward 9 213 | down 2 214 | down 3 215 | down 1 216 | down 6 217 | forward 5 218 | down 3 219 | forward 1 220 | down 3 221 | forward 7 222 | down 3 223 | forward 3 224 | up 2 225 | up 8 226 | down 2 227 | down 3 228 | down 7 229 | forward 6 230 | forward 7 231 | up 5 232 | forward 4 233 | forward 6 234 | down 1 235 | forward 1 236 | forward 9 237 | down 2 238 | down 8 239 | forward 6 240 | down 8 241 | down 5 242 | forward 9 243 | forward 3 244 | down 6 245 | forward 3 246 | forward 1 247 | up 7 248 | down 2 249 | down 9 250 | up 6 251 | forward 7 252 | down 9 253 | up 8 254 | forward 5 255 | forward 2 256 | forward 9 257 | down 3 258 | up 7 259 | forward 7 260 | down 4 261 | up 6 262 | up 5 263 | forward 6 264 | forward 2 265 | down 9 266 | forward 9 267 | forward 3 268 | down 4 269 | forward 5 270 | forward 4 271 | forward 4 272 | down 8 273 | forward 4 274 | forward 2 275 | up 8 276 | down 8 277 | forward 6 278 | up 4 279 | down 7 280 | forward 8 281 | up 9 282 | forward 3 283 | forward 5 284 | forward 8 285 | down 5 286 | up 6 287 | up 6 288 | down 5 289 | forward 2 290 | down 3 291 | up 1 292 | down 8 293 | forward 3 294 | down 4 295 | up 9 296 | forward 8 297 | forward 5 298 | forward 2 299 | forward 6 300 | forward 8 301 | up 5 302 | forward 5 303 | down 2 304 | down 4 305 | down 8 306 | forward 3 307 | up 9 308 | down 1 309 | down 9 310 | forward 7 311 | forward 9 312 | down 4 313 | down 2 314 | forward 3 315 | down 1 316 | forward 2 317 | down 2 318 | down 5 319 | forward 2 320 | forward 3 321 | forward 9 322 | down 2 323 | forward 3 324 | forward 9 325 | forward 6 326 | forward 7 327 | down 6 328 | forward 5 329 | up 7 330 | forward 6 331 | up 1 332 | down 7 333 | down 6 334 | down 3 335 | down 7 336 | forward 2 337 | forward 8 338 | forward 3 339 | down 3 340 | forward 7 341 | down 3 342 | up 8 343 | forward 1 344 | down 5 345 | down 9 346 | down 6 347 | forward 1 348 | forward 1 349 | down 1 350 | down 1 351 | forward 8 352 | forward 7 353 | forward 1 354 | up 2 355 | down 4 356 | up 7 357 | down 3 358 | up 8 359 | up 7 360 | forward 3 361 | up 9 362 | down 5 363 | forward 4 364 | down 6 365 | up 8 366 | forward 6 367 | forward 7 368 | down 1 369 | up 7 370 | down 9 371 | down 9 372 | up 9 373 | forward 7 374 | down 6 375 | down 4 376 | down 6 377 | down 7 378 | down 7 379 | up 7 380 | down 4 381 | up 7 382 | forward 1 383 | down 8 384 | down 3 385 | down 2 386 | forward 9 387 | up 7 388 | down 1 389 | down 2 390 | forward 1 391 | forward 5 392 | down 7 393 | up 4 394 | down 7 395 | down 4 396 | down 5 397 | up 8 398 | down 6 399 | down 2 400 | down 4 401 | up 5 402 | down 8 403 | down 3 404 | down 9 405 | forward 6 406 | forward 5 407 | down 1 408 | down 3 409 | down 2 410 | down 3 411 | forward 8 412 | forward 4 413 | forward 6 414 | forward 9 415 | up 1 416 | forward 6 417 | forward 8 418 | down 2 419 | down 1 420 | forward 4 421 | forward 2 422 | forward 3 423 | forward 2 424 | forward 5 425 | forward 2 426 | forward 7 427 | down 5 428 | forward 2 429 | forward 3 430 | forward 9 431 | down 3 432 | down 4 433 | down 7 434 | down 9 435 | down 5 436 | forward 5 437 | down 4 438 | down 8 439 | up 3 440 | forward 1 441 | forward 2 442 | forward 6 443 | up 2 444 | down 9 445 | down 8 446 | up 8 447 | up 3 448 | forward 2 449 | down 6 450 | forward 9 451 | down 3 452 | down 3 453 | forward 7 454 | down 5 455 | forward 2 456 | down 4 457 | down 1 458 | forward 1 459 | down 5 460 | up 4 461 | down 2 462 | forward 8 463 | down 9 464 | down 5 465 | up 4 466 | forward 9 467 | down 3 468 | down 8 469 | forward 8 470 | forward 9 471 | forward 3 472 | up 5 473 | forward 6 474 | down 7 475 | forward 5 476 | down 4 477 | down 9 478 | down 1 479 | up 4 480 | down 8 481 | forward 4 482 | up 4 483 | forward 4 484 | forward 8 485 | forward 3 486 | forward 6 487 | down 9 488 | forward 5 489 | up 4 490 | forward 8 491 | forward 2 492 | down 2 493 | down 1 494 | up 3 495 | forward 5 496 | down 3 497 | down 6 498 | forward 7 499 | down 8 500 | down 1 501 | forward 9 502 | down 8 503 | forward 7 504 | forward 7 505 | forward 7 506 | up 9 507 | up 5 508 | forward 5 509 | forward 2 510 | down 4 511 | up 8 512 | up 7 513 | forward 5 514 | forward 3 515 | forward 7 516 | up 1 517 | down 2 518 | up 1 519 | forward 3 520 | up 8 521 | down 3 522 | forward 1 523 | forward 5 524 | forward 2 525 | forward 5 526 | down 8 527 | up 1 528 | forward 9 529 | down 3 530 | down 7 531 | up 5 532 | down 5 533 | down 1 534 | down 4 535 | down 6 536 | up 9 537 | forward 5 538 | forward 3 539 | down 8 540 | down 7 541 | forward 3 542 | down 9 543 | forward 8 544 | down 3 545 | up 2 546 | up 7 547 | forward 3 548 | down 9 549 | down 5 550 | down 9 551 | up 6 552 | down 9 553 | down 1 554 | down 1 555 | up 4 556 | up 5 557 | up 6 558 | forward 5 559 | down 3 560 | up 1 561 | forward 9 562 | forward 8 563 | forward 8 564 | forward 3 565 | forward 5 566 | forward 8 567 | forward 1 568 | down 8 569 | up 7 570 | down 3 571 | forward 9 572 | forward 1 573 | up 8 574 | down 7 575 | up 4 576 | down 2 577 | down 5 578 | forward 3 579 | down 5 580 | forward 8 581 | forward 4 582 | down 6 583 | up 7 584 | up 7 585 | forward 8 586 | down 6 587 | down 8 588 | down 9 589 | forward 8 590 | forward 1 591 | forward 6 592 | up 2 593 | up 1 594 | up 8 595 | forward 8 596 | forward 1 597 | forward 4 598 | forward 7 599 | forward 2 600 | down 7 601 | down 8 602 | up 5 603 | up 4 604 | up 4 605 | up 7 606 | forward 3 607 | down 2 608 | up 5 609 | down 8 610 | forward 6 611 | up 9 612 | forward 1 613 | down 2 614 | forward 7 615 | down 4 616 | down 6 617 | down 3 618 | down 7 619 | down 9 620 | down 3 621 | forward 1 622 | forward 5 623 | down 2 624 | down 6 625 | up 7 626 | up 2 627 | up 3 628 | up 5 629 | forward 9 630 | down 6 631 | up 1 632 | down 1 633 | forward 3 634 | forward 5 635 | up 8 636 | forward 5 637 | forward 9 638 | up 5 639 | up 4 640 | down 6 641 | up 8 642 | down 8 643 | down 7 644 | down 2 645 | down 6 646 | up 1 647 | up 1 648 | forward 8 649 | down 4 650 | up 3 651 | down 2 652 | down 1 653 | forward 2 654 | down 4 655 | down 6 656 | forward 2 657 | up 8 658 | forward 9 659 | up 1 660 | up 4 661 | forward 2 662 | down 9 663 | down 4 664 | forward 7 665 | forward 6 666 | forward 2 667 | forward 2 668 | forward 5 669 | forward 6 670 | down 3 671 | forward 1 672 | up 9 673 | forward 2 674 | down 3 675 | down 1 676 | down 3 677 | up 9 678 | forward 5 679 | up 5 680 | up 7 681 | down 5 682 | down 4 683 | down 9 684 | down 3 685 | down 3 686 | down 9 687 | down 4 688 | down 3 689 | down 9 690 | forward 9 691 | down 1 692 | down 6 693 | down 7 694 | down 7 695 | down 5 696 | down 8 697 | down 5 698 | forward 1 699 | forward 3 700 | up 1 701 | forward 2 702 | up 5 703 | up 8 704 | down 1 705 | up 8 706 | up 6 707 | up 4 708 | up 1 709 | forward 3 710 | forward 2 711 | forward 4 712 | up 3 713 | down 6 714 | down 1 715 | down 6 716 | up 8 717 | up 7 718 | forward 8 719 | down 9 720 | down 3 721 | forward 2 722 | forward 8 723 | forward 8 724 | down 1 725 | forward 9 726 | down 2 727 | down 3 728 | down 9 729 | down 2 730 | forward 8 731 | down 2 732 | down 6 733 | forward 8 734 | forward 1 735 | up 1 736 | forward 3 737 | down 5 738 | down 6 739 | down 5 740 | down 4 741 | forward 6 742 | forward 3 743 | down 7 744 | down 8 745 | down 7 746 | up 7 747 | down 9 748 | down 8 749 | forward 6 750 | down 1 751 | forward 8 752 | forward 9 753 | up 4 754 | down 1 755 | forward 1 756 | forward 9 757 | down 4 758 | down 2 759 | forward 4 760 | down 5 761 | forward 4 762 | down 7 763 | forward 6 764 | down 3 765 | forward 3 766 | forward 2 767 | forward 7 768 | down 2 769 | forward 2 770 | down 3 771 | up 9 772 | forward 4 773 | forward 1 774 | forward 8 775 | forward 8 776 | forward 6 777 | forward 7 778 | up 8 779 | down 4 780 | up 6 781 | forward 3 782 | up 8 783 | forward 3 784 | forward 1 785 | forward 3 786 | forward 9 787 | up 2 788 | up 5 789 | forward 8 790 | forward 6 791 | forward 6 792 | forward 4 793 | down 6 794 | forward 7 795 | forward 3 796 | forward 2 797 | forward 2 798 | forward 6 799 | forward 5 800 | down 7 801 | up 1 802 | forward 5 803 | up 1 804 | up 9 805 | forward 5 806 | up 3 807 | forward 1 808 | down 2 809 | up 2 810 | down 4 811 | forward 7 812 | forward 4 813 | forward 1 814 | down 1 815 | up 4 816 | down 4 817 | up 2 818 | up 5 819 | down 5 820 | forward 7 821 | up 1 822 | down 6 823 | up 4 824 | forward 3 825 | forward 8 826 | down 6 827 | forward 4 828 | down 2 829 | down 3 830 | down 5 831 | down 4 832 | down 9 833 | up 4 834 | forward 5 835 | up 1 836 | up 2 837 | forward 7 838 | forward 2 839 | up 1 840 | down 8 841 | forward 4 842 | forward 4 843 | up 8 844 | down 3 845 | down 4 846 | up 7 847 | down 8 848 | down 6 849 | down 2 850 | down 3 851 | forward 9 852 | forward 7 853 | forward 6 854 | down 2 855 | down 7 856 | forward 5 857 | forward 2 858 | up 5 859 | down 5 860 | forward 5 861 | down 3 862 | down 1 863 | forward 4 864 | forward 3 865 | down 2 866 | up 1 867 | down 3 868 | down 5 869 | forward 6 870 | forward 5 871 | up 5 872 | down 3 873 | forward 8 874 | down 9 875 | up 4 876 | up 4 877 | down 8 878 | forward 5 879 | down 7 880 | down 3 881 | up 1 882 | down 4 883 | down 5 884 | forward 4 885 | forward 2 886 | forward 4 887 | up 9 888 | down 5 889 | forward 4 890 | forward 6 891 | forward 9 892 | forward 7 893 | forward 5 894 | forward 6 895 | up 4 896 | forward 8 897 | down 4 898 | forward 4 899 | forward 6 900 | up 8 901 | down 4 902 | forward 3 903 | down 8 904 | forward 4 905 | down 9 906 | forward 5 907 | down 4 908 | up 8 909 | forward 2 910 | down 6 911 | up 3 912 | down 5 913 | down 1 914 | down 6 915 | down 9 916 | forward 9 917 | down 1 918 | down 5 919 | up 8 920 | forward 5 921 | down 6 922 | down 9 923 | forward 1 924 | down 6 925 | down 8 926 | down 1 927 | down 2 928 | down 1 929 | forward 5 930 | up 7 931 | forward 5 932 | down 2 933 | down 4 934 | down 1 935 | forward 7 936 | down 7 937 | down 8 938 | forward 4 939 | forward 7 940 | down 2 941 | down 3 942 | forward 2 943 | up 9 944 | down 4 945 | down 5 946 | forward 4 947 | forward 4 948 | forward 6 949 | down 5 950 | forward 8 951 | down 9 952 | forward 8 953 | down 7 954 | up 7 955 | forward 9 956 | up 1 957 | forward 4 958 | up 3 959 | down 2 960 | down 4 961 | down 5 962 | forward 2 963 | forward 8 964 | up 3 965 | up 1 966 | down 1 967 | forward 7 968 | forward 9 969 | forward 6 970 | up 1 971 | down 2 972 | forward 1 973 | up 5 974 | forward 3 975 | down 7 976 | down 6 977 | forward 9 978 | forward 6 979 | forward 3 980 | forward 8 981 | down 2 982 | down 7 983 | forward 1 984 | down 6 985 | up 3 986 | down 6 987 | down 9 988 | up 2 989 | forward 8 990 | forward 1 991 | down 9 992 | forward 8 993 | forward 8 994 | down 3 995 | up 9 996 | down 6 997 | up 3 998 | forward 3 999 | forward 5 1000 | forward 7 -------------------------------------------------------------------------------- /2019/days/day08/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 202201222022222222222222210222222222221222220202222222022222222222222221222200221022222222222220222222220220202221222222222222222221222221222212022202202220222222222222222222221220222222220222222212222222022222222222222222222220220122222222222220222222221220212221222222222222222221222221222202122222212211222022222222222222212220222222222222221212222222022222222222222222222221221122222222222221222222202220222220222222222222222221222220222212022222222220222022222222222202221220222222222222220202222222022222222222222221222202222022222222222222222222200222222221222222222222221222222222222222222202212220222022222222222212220220222222221222221202222222222222222222222222222202221222222222222221222222202221202221222222222222222220222220222212122222212212222222202222222200220222222222221222222222222222122222222222222222222210221022222222202221222222211220202222222222222222220222222222222222222202222200222022212222222212202221222222222222221212222222022222222222222220222211220222222222212220222222212222212220222222222222222220222220222222022202202211222022222222222221221221202222222222222202222222222222222222222220222211222122222222222221222212220222212221222222222222222221222211222212122222202210222122202222222212211220202222220222221202222222122222222222222220222221221222222222222222222212200220222222222222222222221220222202222212122202202221222222202222222222211222222222220222222202222222122222222222222221222212221122222222202220222202201222212220222222222222221220222212222222022222222200222122212222222200212220212222220222220222222222022222222022222220222202220222222222212221222212211220202220222222222222220221222200222222022222212200222022210222222211222221212222220222220212022222022222222222222222222220220022222222222220222212221221212220222222222222222221222212222212222212202211222222211222222200202220212222221222221202022222222222222022222221222212222022222222202220222202221222212220222222222222222222222200222212222212212220222222221222222210220222222222221222221202022222022222222222222222222220222222222222212222222212220220212222222222222222221222222221222212222202222221122122211222222211221220222222222222221202122222222222222122222221222222221122222222212222222222212221212222222222222222221220222221222222022222212211122222220222222210212222202222220222221222022222022222222022222222222220222122222222212220222212201220222222222222222222222220222202222202122212212221222122201222222220222220202222220222222212122222122222222122222220222211221022212222222221222202222222202220222222222222220221222200222212222222212211222222221222222202200222222222222202220222022222122222222022222221222202222122222222222221222202212222222220222222222222220222222211222222222202222210222122200222222212201220202222220202221212122222222222222222222221222222220222202222222220222222212222222221222222222222222222222220222222222222212210022022202222222221222220202222221202221202222222122222222122222220222201221122222222202222222222221220212221222222222222222220222200222202222222212201122222220222222221222222212222222212220222022222022222222022222222222201221122212222202221222212202221212222222222222222221222222211222202122212222201222222202222222212200222200222221202222222022222022222222222022221222220222222212222222222222202222221212222222222222222222222222212222212022212222222122022221222222210221200220222220222220202222222222222222122122222222220222022222222202222222222200222212222222222222222210221222221222222222222202221022122220222222211212201220222222022220212022222022222220222022220222210221022202222222221222212212220212221220222222222212221222200222202122222212211222122210222222200221212201221220112220212022202222222221022022220222210221122202222212220222212211220202222220222222222201221222221222212222202222221122222222222222210220201220222221112222212022222022222220222222222222201221122212222202222222222211221222222221222222222221222222200222202022222222202022122202222222221221202202221220202221222222212122222221222022221220222221022202222202221222222221220202221220222222222202222222221222222122202212202122022220222222210200202202222220122222212122202022222221220222220221201222122212222222222222212211220202221222222222222200220222211222222222210222202022122201222222220211220201220221202220222022202222222220020122222222220220222212222222222222202212221212221222222222222222222222220220222122222212212122122222222222222201202200221221002221212222222222222221221122220222221221122202222202221222222222221222222220222222222200220222211222222222221202200222222211222222222212212222221221112221102222222122222222020122220221221221022222222202220222222210221212220221222222222210222222221220202022211202222222022202222222222202221220221221122222012022202222222221222222222220220220122202222222220222222202222202222221222222222210222222221221202122200222201022222201222222202201221221221222012220002122222122222221121122220220222221122212222222222222202221221222221222222222222221221222212221202022222222211022022202222222220222220211222221202222002222212022222220021122222221201221222212222212220222222201222212221221222022222220222222221221202222222222220022122222222222211200211200220220202220002222212122222222022222222222210221022202222202220222212212221222220222222022222210221222200221202122212222202122122211222222202211221221222221102211222222212122222221120122221222200220122202222202221222202221222222222220222222222220220222201221202022220222222022222222022222221201210200222220212201212122212122222221121022222220210222222212222212222222212210220222220221222222222211221222211120202222220212202222122202222222200220202200022221222202122022212022222221222222222221210221022212222202221222202211222202221021222222222220222222201120212022210212212022222201022222200221221221020220212210212022212022222221221022222222222221122222222222221222212210221202220220222022222221220222210222212122201212200222122210222222201211212222021222002221222222212122222220022122220221221220222212220222221222202200120222222022222222222201220222210220222222220212200022122202222222202201201200122221022212202112212022222220020022220221222222122212220212222222202200021202220121222022222212222212221121212022202222212022222201222222212210201222220221122211012022222122222221121222220220201221122202222202222222222200021222220021222222222220222212212120202022201212200222122202122222210221210210220222002201012022202122222220021022222220200222022212222202221222212200121222220022222022222222221222210022212122222212212122222211222222212200201200021220012211202022202022222222122122222220220222222222220212221222202212020202222222222222222200222212222120222022201222221022022201221222200210220211220220122200202022212122220221022222222222222222022202221212221222222201020202202121222022222210221222200022202222212222212122022220122222210210200212020222012222102002212022221220122222222220222221022202221212222222212202220212220122222022222200221222211022212222221222221022022200222222200220220221122221102222022222212122220220122022221222222222222202220212221222202221021222212221222222222211221212212122202022201202201022022201121222021200220200220222222212102212222022222222220222220222201220222212220202222222222220221212221220222222221221221222202121212122222222211022021222020222212212201211222221022220002102212122222222021022222222210220022202220222220222212220121202220022222222222221222202211122222122202222212122221221122222111212222211122220212222112222202122221221222022220221212222022222222222222222222222022212201220222022220110220212200121202122222212220022021201122222022212212222021222012210222212222122221220020222222220221222122222220222221222212221220212212121222022220000221212212021222222202222221122020200120222010202202211220220202210202202202122220220100022222222221222122222221222222222222212022222202122222222220221221212210221212122221200221122221202020222022200200211121220022212222202202122222220020022222220200221122212222212222222202201222212200022222222222102222202220020222122202220211122222220222222121202211220021220222201202122222022222221000122221220201222022222220222220222210222220222221120222022220201222112221021212022202221201022122201121222202212220221220222212201212012212122221220122022222221221222222202220202221222221222222202221220222122222120220102202122222222222201221122022200122222220211222210220222022210112112212212222221102122221220212221122202220222222222212222121202201022222022221101222122202120200122212202211022121210022222200221221200022221222220012022202112220222120022222220220220222200222222222222220201120222221021222022222000221222201222201222221222201222220211020222220202211220201220212200202202212122220221200222222221202221222202221212221222212202021222211020222122220101221012212222201222202212022122121220022222221110212211210221112222202002222012220222002222220220222220222202220212220222212200121202211121222222222220222222221121200022222210210222222201221222122002211201121220112211022202212122221222102122222220220221022212220202222222222220122222220222222222221221220202210220200022212211121222122212222222020221221200100220222212002102212122222220012022221221211220122210220222220222220221121222202020222222220011222022200020200022212122211222221210120222002222220202220222002212102002222202220222210022222221201221202221220202221222202201021222201021222022220210221002221121221122222100212122121211122222021011221221201220002201002002212202221220111022222220201221012202221202222222210221122212201220222022220110220202222122221222211112200222120212221222222202212200220221022201012102222212221222202022220211210221110221222202221222200211121222212121222022222021222102201222202222211010220222221212021222020012212221201222122222102002212212222221120022220201201220110202222212220222212202220222222021222021220210222122200121200122220010122012222210222222110112210202002200112222022112222112222220202122220010222221201200222222222222211210122202202120222221221101221022201220202022220112110002021211222222100021221201201220212212122002222012220221211022221200210220012200220212222220200221022212201022222020220210222102211021212022221200012212021201221222101202221212011222222222100112212112221221221022220210202221021221220202220222212222220222201111222220220200220212210120201122220012012022120210121222212100210222122202102211121122222202221222101222221212200222210202220202120222202221122222211102222122222220220002200221210022210220001112120202020222122012201212010222202212110202202112220220222022221001221220000220222202220220200211022202211211222222220120222112222222222022210101210211020200021222120122222211001202102202100102222102221220101022222120221221120212220222020222200211122202210001222121222222220022210121212222212012012122022222221222121200201220222201002211020102202222221222012121221211211222110212221012222220212201222212201000222022222122222102201220222122201111221020021201120222102112220221002222222201200102222222222222012221220210222200200212220112122222211211021212220210222220222212222112021222221222201211010001022210021222022120202202200201002221120002222022222221220120220110221200022200221212121222201211222212201222222022222021222002011021200122201100112110220211222222010122211222020221112210112122202202220221211121220201210212222220221222021221221220121202221202222022220101222122101221110122212000220002022221020222201012212110022221202211122012212112220221210020220210211211110200220202021222211220021222201200222122221100221012001120022022221212000222221202120222100010211021012011022212110012202202222220210122221210202202011222220012022222212201220202202010222220222211221222011220221022200000001222020222120222202010210010000211022202001012202102222220001120220220212210020220221012202220201211022202222012222022221112222202111220200222221012000012022210222222022222211020101222222002201202222122222220222220221120222222220202222112012222210202120222221220222122222001221012210122122220200120010100220222022222000120220102112002222222010202222222220220020221220020201201222221220012112222200221221212221211222022222121221102002022202022121110012010221212021222212001221202220000202210210122212022221221001122221120220200212201220202220221212222122212220222222221221001221222021020111221020011202111221220120222200201220010000020002012121022202001222222001020221101201022021201220202000222202212020212220211222221222210221212202021222121112022211201220222220221021111221211010122022202020012212121221221020120222220220220222200210002101221222221221202201122222121221111222102122121220021211001210021222202101220011102210112122021012020200112202201220222111121220222200122210200222002001220201210222212201020222221221020220122110021222000022122001120221212210220101210221120120010202020222121202102202222120020222022220102101020200012111220220221120212212000222120221010222212001020211210200020110012222221121220222002222122001121210201100212222020202221010220220000220110101002202212011220210200121202202021222222222120222222220221212201022110101202021212202220210012210112112012102121122102202222222221002221222112210112122022221112110221200210121202212111222020220002221222022021211111002022111110120222221221220212201121122101022211120000222022211222101022220102221222210210202212000021212221220212210101222122222001222222120022021111022222101120220222020220212001221201022102002022020110212021201220112122222002211112002101200202222122220202022222200222222021221101221002121020111122011021210200221202200220102111202120211201100111120100202000212221112021220200210211120201121112210021210222120222210110222202022012220122011220120200202011112012220202200122212001221121122002110102002001202221212222212022220200222122022102100212110121200201021222221111222221120002222212221221011010001001012111121221100221001200202001100121121120120200012000200222110021221111222011221010110112102120211210122212202022222101121122221112000022002202121121010111120200200221001011212220212122010122001222002001201220011022222101220212111000002002120122211210021202212112222110122001221222022222220010011002222100221202121220121212210011211202100111022022102110221220101100221200201022121210011222101221220220221212220000222001021100220222010022122202220220211101122201211222212000201211112112220202020222112212200220220201220012202000210120012022121220201200021212200211222110022010210212112222121201220221110100221212100220122101221001101001020200111121112122201221212110221112200022211111020022222220201212020222222121222000021211211212012221202210201012022101121211102121002211200202221222202020111101112201212222010100221022202020022001112022022022221202022202222122222212121021220102010120200221020221112120122212210122011221220101220000021012021102122002200220002110221221212100220000010112020120212211020212220121222200021212202112200121201002121221102001122221200121001002202020022102111210222221022101222222012220222110220222211210201102120122212221121202210021222222021002202012212021112120111020011111201112102102212202020011021111000202212221000200121102110022000220101221122110102000022212020012102001021012010002202202002010222201201112100 -------------------------------------------------------------------------------- /2020/days/day09/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 11 2 | 1 3 | 33 4 | 5 5 | 20 6 | 31 7 | 49 8 | 26 9 | 3 10 | 35 11 | 25 12 | 39 13 | 29 14 | 28 15 | 23 16 | 44 17 | 19 18 | 4 19 | 21 20 | 2 21 | 7 22 | 41 23 | 10 24 | 32 25 | 14 26 | 68 27 | 6 28 | 11 29 | 8 30 | 18 31 | 27 32 | 20 33 | 71 34 | 13 35 | 9 36 | 16 37 | 73 38 | 52 39 | 34 40 | 25 41 | 79 42 | 15 43 | 12 44 | 17 45 | 113 46 | 94 47 | 19 48 | 24 49 | 21 50 | 22 51 | 114 52 | 31 53 | 23 54 | 26 55 | 28 56 | 29 57 | 32 58 | 47 59 | 27 60 | 39 61 | 33 62 | 80 63 | 35 64 | 38 65 | 34 66 | 36 67 | 127 68 | 40 69 | 41 70 | 227 71 | 42 72 | 43 73 | 45 74 | 44 75 | 48 76 | 54 77 | 70 78 | 71 79 | 65 80 | 55 81 | 110 82 | 60 83 | 72 84 | 74 85 | 114 86 | 77 87 | 69 88 | 90 89 | 75 90 | 187 91 | 78 92 | 100 93 | 81 94 | 83 95 | 85 96 | 86 97 | 118 98 | 93 99 | 92 100 | 102 101 | 115 102 | 120 103 | 127 104 | 175 105 | 129 106 | 160 107 | 132 108 | 144 109 | 169 110 | 147 111 | 252 112 | 150 113 | 153 114 | 156 115 | 179 116 | 178 117 | 164 118 | 166 119 | 168 120 | 185 121 | 204 122 | 208 123 | 222 124 | 194 125 | 284 126 | 235 127 | 276 128 | 256 129 | 261 130 | 273 131 | 330 132 | 297 133 | 291 134 | 447 135 | 300 136 | 303 137 | 306 138 | 378 139 | 320 140 | 332 141 | 334 142 | 374 143 | 351 144 | 485 145 | 379 146 | 398 147 | 455 148 | 478 149 | 634 150 | 491 151 | 647 152 | 517 153 | 553 154 | 896 155 | 977 156 | 750 157 | 588 158 | 591 159 | 606 160 | 603 161 | 623 162 | 626 163 | 652 164 | 654 165 | 685 166 | 829 167 | 725 168 | 1132 169 | 777 170 | 1084 171 | 946 172 | 969 173 | 995 174 | 1008 175 | 1120 176 | 1123 177 | 1070 178 | 1707 179 | 1722 180 | 1431 181 | 1273 182 | 1179 183 | 1217 184 | 1876 185 | 1857 186 | 1249 187 | 1337 188 | 1306 189 | 1339 190 | 1502 191 | 1554 192 | 1671 193 | 1785 194 | 2625 195 | 1964 196 | 2319 197 | 2039 198 | 2901 199 | 2078 200 | 2190 201 | 3215 202 | 2886 203 | 2704 204 | 2396 205 | 4375 206 | 3149 207 | 2428 208 | 2466 209 | 2555 210 | 2588 211 | 2645 212 | 2643 213 | 2808 214 | 2841 215 | 3456 216 | 3225 217 | 4358 218 | 3749 219 | 4951 220 | 4229 221 | 4435 222 | 4117 223 | 4778 224 | 5363 225 | 5681 226 | 4824 227 | 5100 228 | 7333 229 | 5274 230 | 12433 231 | 5016 232 | 5288 233 | 5021 234 | 6304 235 | 7664 236 | 5451 237 | 5484 238 | 7759 239 | 9386 240 | 6681 241 | 9138 242 | 7978 243 | 7866 244 | 8552 245 | 8664 246 | 10500 247 | 8895 248 | 9602 249 | 9840 250 | 14426 251 | 9845 252 | 10037 253 | 19175 254 | 10290 255 | 14346 256 | 11697 257 | 10309 258 | 10472 259 | 10935 260 | 12165 261 | 12132 262 | 14036 263 | 19447 264 | 14547 265 | 17818 266 | 15844 267 | 16418 268 | 28111 269 | 22202 270 | 27420 271 | 18497 272 | 18735 273 | 19442 274 | 20154 275 | 26134 276 | 19882 277 | 20327 278 | 24837 279 | 20762 280 | 24655 281 | 20781 282 | 21244 283 | 27353 284 | 45850 285 | 24297 286 | 44991 287 | 28583 288 | 32262 289 | 34429 290 | 34236 291 | 46016 292 | 35153 293 | 38617 294 | 37232 295 | 39741 296 | 37939 297 | 38177 298 | 39596 299 | 40036 300 | 59183 301 | 66612 302 | 41089 303 | 45078 304 | 41543 305 | 49827 306 | 78278 307 | 63736 308 | 68665 309 | 78112 310 | 75849 311 | 73574 312 | 79482 313 | 66498 314 | 108406 315 | 69389 316 | 119821 317 | 72385 318 | 78321 319 | 75171 320 | 81579 321 | 77535 322 | 98779 323 | 79632 324 | 85114 325 | 82632 326 | 122613 327 | 116260 328 | 86621 329 | 133125 330 | 147501 331 | 156390 332 | 130234 333 | 177795 334 | 135887 335 | 138883 336 | 151109 337 | 144560 338 | 141669 339 | 159006 340 | 141774 341 | 147556 342 | 157167 343 | 200934 344 | 152706 345 | 183893 346 | 209866 347 | 167746 348 | 212866 349 | 219746 350 | 228395 351 | 268966 352 | 202881 353 | 481832 354 | 410635 355 | 283443 356 | 266121 357 | 269117 358 | 274770 359 | 280447 360 | 354535 361 | 286229 362 | 344655 363 | 289225 364 | 535238 365 | 637978 366 | 300262 367 | 1048613 368 | 320452 369 | 907095 370 | 351639 371 | 370627 372 | 436712 373 | 415747 374 | 644917 375 | 431276 376 | 469002 377 | 492106 378 | 540891 379 | 543887 380 | 549564 381 | 751728 382 | 786374 383 | 736974 384 | 846641 385 | 836761 386 | 575454 387 | 589487 388 | 609677 389 | 1015544 390 | 875716 391 | 620714 392 | 946081 393 | 672091 394 | 1507650 395 | 722266 396 | 801903 397 | 847023 398 | 1566795 399 | 900278 400 | 1292805 401 | 961108 402 | 1032997 403 | 1090455 404 | 1093451 405 | 1125018 406 | 1583997 407 | 1164941 408 | 1210201 409 | 1185131 410 | 1196168 411 | 1199164 412 | 2085917 413 | 1774618 414 | 1342980 415 | 1714165 416 | 1868259 417 | 1705088 418 | 2540350 419 | 2025296 420 | 1524169 421 | 1834900 422 | 2783161 423 | 1861386 424 | 1933275 425 | 2433435 426 | 1994105 427 | 2928351 428 | 2183906 429 | 2350072 430 | 2324182 431 | 4307330 432 | 2553181 433 | 4639098 434 | 3575551 435 | 6332626 436 | 3392428 437 | 3048068 438 | 2867149 439 | 4716436 440 | 3229257 441 | 3359069 442 | 3549465 443 | 3385555 444 | 5733371 445 | 3457444 446 | 3696286 447 | 3794661 448 | 3855491 449 | 5579329 450 | 6633203 451 | 4178011 452 | 4674254 453 | 5398140 454 | 6778722 455 | 6961106 456 | 5420330 457 | 5601249 458 | 5915217 459 | 6096406 460 | 6252704 461 | 8782366 462 | 6226218 463 | 6563435 464 | 6588326 465 | 6614812 466 | 7081841 467 | 6842999 468 | 7972672 469 | 7635455 470 | 7153730 471 | 13411925 472 | 7650152 473 | 8033502 474 | 8852265 475 | 11262580 476 | 9576151 477 | 10072394 478 | 13932452 479 | 11021579 480 | 11335547 481 | 11516466 482 | 11697655 483 | 12011623 484 | 13696653 485 | 19803945 486 | 12789653 487 | 12841030 488 | 13151761 489 | 13431325 490 | 17950359 491 | 13924840 492 | 13996729 493 | 15126402 494 | 19166618 495 | 31501600 496 | 17226303 497 | 15683654 498 | 19731157 499 | 21588860 500 | 43513223 501 | 23997234 502 | 21093973 503 | 22719234 504 | 28247882 505 | 23033202 506 | 25513195 507 | 24487308 508 | 30922956 509 | 25630683 510 | 25941414 511 | 35513700 512 | 21806024 513 | 37272514 514 | 27356165 515 | 32909957 516 | 75014823 517 | 29123131 518 | 45091207 519 | 34850272 520 | 41713611 521 | 35414811 522 | 76014163 523 | 40825130 524 | 42682833 525 | 42899997 526 | 43813207 527 | 44525258 528 | 52156333 529 | 44839226 530 | 46293332 531 | 60928006 532 | 66766544 533 | 47436707 534 | 47747438 535 | 89364484 536 | 49162189 537 | 69553462 538 | 104039058 539 | 60266122 540 | 73648389 541 | 70836742 542 | 63973403 543 | 70265083 544 | 127694550 545 | 112422455 546 | 76239941 547 | 95455521 548 | 83507963 549 | 87208091 550 | 88652433 551 | 88338465 552 | 105767232 553 | 91132558 554 | 92275933 555 | 95184145 556 | 96909627 557 | 107702829 558 | 151398680 559 | 109428311 560 | 187547021 561 | 113135592 562 | 141101825 563 | 124239525 564 | 130531205 565 | 134238486 566 | 153773046 567 | 217341766 568 | 146505024 569 | 159747904 570 | 194419665 571 | 163448032 572 | 170716054 573 | 222890919 574 | 175546556 575 | 231942354 576 | 179471023 577 | 186316703 578 | 198835387 579 | 187460078 580 | 267625681 581 | 204612456 582 | 272883496 583 | 222563903 584 | 233667836 585 | 472238137 586 | 316648381 587 | 254770730 588 | 258478011 589 | 264769691 590 | 386338951 591 | 309953056 592 | 306252928 593 | 334164086 594 | 335294460 595 | 378306410 596 | 338994588 597 | 346262610 598 | 361863259 599 | 355017579 600 | 402034926 601 | 365787726 602 | 373776781 603 | 487333594 604 | 392072534 605 | 427176359 606 | 438280292 607 | 568431067 608 | 456231739 609 | 488438566 610 | 513248741 611 | 519540421 612 | 523247702 613 | 611032301 614 | 643076101 615 | 616205984 616 | 640417014 617 | 848304273 618 | 669458546 619 | 674289048 620 | 712771369 621 | 685257198 622 | 701280189 623 | 716880838 624 | 1036496443 625 | 1096648753 626 | 765849315 627 | 800953140 628 | 915614925 629 | 894512031 630 | 865456651 631 | 926718858 632 | 1081679808 633 | 1798560646 634 | 1007978987 635 | 1042788123 636 | 1130572722 637 | 1134280003 638 | 1227238285 639 | 1256622998 640 | 1749267812 641 | 1309875560 642 | 1391169886 643 | 1755968856 644 | 1359546246 645 | 1386537387 646 | 1402138036 647 | 2230928756 648 | 1482730153 649 | 1666409791 650 | 1566802455 651 | 2361518288 652 | 3055183644 653 | 1958403048 654 | 2286265104 655 | 2658761034 656 | 2409449011 657 | 2142258990 658 | 4189331804 659 | 2050767110 660 | 4325170825 661 | 2440448282 662 | 2390903001 663 | 2483861283 664 | 2566498558 665 | 2876678015 666 | 3158106892 667 | 2842276399 668 | 2746083633 669 | 2761684282 670 | 2788675423 671 | 3624989143 672 | 3957705456 673 | 4812451392 674 | 3624812839 675 | 3617569565 676 | 4009170158 677 | 4524901606 678 | 5251725410 679 | 4337032214 680 | 4533161991 681 | 4193026100 682 | 6065261121 683 | 4441670111 684 | 4924309565 685 | 4831351283 686 | 4874764284 687 | 7008168669 688 | 5050359841 689 | 5312582191 690 | 5507767915 691 | 5534759056 692 | 10459068621 693 | 5550359705 694 | 7634159301 695 | 6406244988 696 | 7242558708 697 | 9706115567 698 | 7242382404 699 | 8534071764 700 | 7954601779 701 | 10059660662 702 | 8870194205 703 | 8530058314 704 | 8634696211 705 | 8726188091 706 | 9024377383 707 | 15040941199 708 | 9925124125 709 | 9755660848 710 | 9881711124 711 | 10187346475 712 | 10820350106 713 | 10362942032 714 | 10847341247 715 | 14080418019 716 | 15610020367 717 | 15196984183 718 | 13184519006 719 | 19680784973 720 | 13648627392 721 | 16112752913 722 | 23573751517 723 | 15772440718 724 | 16484660093 725 | 16824795984 726 | 18893000346 727 | 17164754525 728 | 19943007323 729 | 17750565474 730 | 22940179854 731 | 20729052371 732 | 38573785319 733 | 20244653156 734 | 21183292138 735 | 25559926215 736 | 29255942378 737 | 21210283279 738 | 23547461038 739 | 24031860253 740 | 53770769502 741 | 30935084480 742 | 29761380305 743 | 26833146398 744 | 29421068110 745 | 30133287485 746 | 31885193631 747 | 36982723997 748 | 33523006192 749 | 33309456077 750 | 33989550509 751 | 37409407681 752 | 34915319999 753 | 37693572797 754 | 46972040107 755 | 40973705527 756 | 41427945294 757 | 64975406332 758 | 42393575417 759 | 44730753176 760 | 44757744317 761 | 47579321291 762 | 64244540557 763 | 50380607436 764 | 50865006651 765 | 56254214508 766 | 62944074302 767 | 78837352975 768 | 56966433883 769 | 70972274506 770 | 97227920035 771 | 65194649708 772 | 70292180074 773 | 66832462269 774 | 83821520711 775 | 68904870508 776 | 84988728972 777 | 72608892796 778 | 78667278324 779 | 82401650821 780 | 83367280944 781 | 86185689611 782 | 93258582068 783 | 115049924391 784 | 89488497493 785 | 92337065608 786 | 103833535799 787 | 101245614087 788 | 151276171120 789 | 107119221159 790 | 121448864216 791 | 122161083591 792 | 127258613957 793 | 123798896152 794 | 231092149756 795 | 132027111977 796 | 134099520216 797 | 137124642343 798 | 150199743213 799 | 254033279012 800 | 141513763304 801 | 207149812563 802 | 155010543617 803 | 161068929145 804 | 165768931765 805 | 169552970555 806 | 372918744328 807 | 273540875281 808 | 249419697548 809 | 190734111580 810 | 193582679695 811 | 222694478303 812 | 253475976193 813 | 284299263429 814 | 311066733859 815 | 268772377261 816 | 257898416368 817 | 251057510109 818 | 255826008129 819 | 419802210777 820 | 325609791672 821 | 271224162559 822 | 292135185960 823 | 291713506517 824 | 332247874884 825 | 527929287945 826 | 420610480664 827 | 360287082135 828 | 565254381798 829 | 413428589883 830 | 363135650250 831 | 384316791275 832 | 416277157998 833 | 464806842254 834 | 444210087773 835 | 514829664263 836 | 555523425988 837 | 504533486302 838 | 508955926477 839 | 583848692477 840 | 670859720886 841 | 527050170688 842 | 506883518238 843 | 616113090264 844 | 709926582947 845 | 562937669076 846 | 563359348519 847 | 623961381401 848 | 981531539796 849 | 887771300872 850 | 723422732385 851 | 925233084475 852 | 744603873410 853 | 779412808248 854 | 1704645892723 855 | 807345738023 856 | 800593949273 857 | 920810644300 858 | 909016930027 859 | 1251487391648 860 | 1011417004540 861 | 1013489412779 862 | 1089987839764 863 | 1015839444715 864 | 1216810101185 865 | 1544772025701 866 | 1489339391195 867 | 1069821187314 868 | 1240074471665 869 | 2686177432519 870 | 1347384113786 871 | 1549194465876 872 | 1368565254811 873 | 1468026605795 874 | 1580006757521 875 | 1524016681658 876 | 1820835150802 877 | 2019487279913 878 | 1586758546271 879 | 1607939687296 880 | 2058833129671 881 | 2289933340468 882 | 1829827574327 883 | 2101404844304 884 | 3109475119677 885 | 2623779132011 886 | 2029328857494 887 | 2537847793109 888 | 2085660632029 889 | 2286631288499 890 | 2309895658979 891 | 2417205301100 892 | 2438386442125 893 | 2820081229186 894 | 2715949368597 895 | 2815410719581 896 | 2892581936469 897 | 2836591860606 898 | 2992043287453 899 | 3110775227929 900 | 4921910793963 901 | 3194698233567 902 | 3437767261623 903 | 3416586120598 904 | 3693600319325 905 | 5516361068480 906 | 3859156431821 907 | 4130733701798 908 | 4114989489523 909 | 4315960145993 910 | 4467715299619 911 | 4339224516473 912 | 4372291920528 913 | 6611284354165 914 | 4596526947478 915 | 4727100960079 916 | 6513681548511 917 | 5608531305066 918 | 6408629408051 919 | 6010108953148 920 | 9930267669109 921 | 9046298566689 922 | 8032686021892 923 | 8503025622326 924 | 6305473461496 925 | 6632465495190 926 | 6854353382221 927 | 7110186439923 928 | 7275742552419 929 | 7552756751146 930 | 7974145921344 931 | 7989890133619 932 | 8582704789142 933 | 8454214005996 934 | 11868716897139 935 | 12418738361199 936 | 8711516437001 937 | 9099392880607 938 | 12523790501659 939 | 11032574421575 940 | 10335632265145 941 | 11618640258214 942 | 16444104139615 943 | 12315582414644 944 | 13999999086767 945 | 19169935796865 946 | 12937938956686 947 | 13159826843717 948 | 13415659901419 949 | 13486818877411 950 | 20597005317334 951 | 13964539822144 952 | 14385928992342 953 | 14828499303565 954 | 15526902672490 955 | 20392884282543 956 | 16572594922761 957 | 17036918795138 958 | 27486817964178 959 | 17810909317608 960 | 20718033138821 961 | 25748435232139 962 | 31810908404375 963 | 21368206686720 964 | 33169934883632 965 | 25618639344981 966 | 24556579214900 967 | 35546532442386 968 | 52043397179078 969 | 26097765800403 970 | 26353598858105 971 | 46986846031701 972 | 29912831664832 973 | 26902478778830 974 | 28315318180976 975 | 28350468814486 976 | 32639408621173 977 | 51716405145384 978 | 30355401976055 979 | 32099497595251 980 | 33609513717899 981 | 44923063737247 982 | 54448234614889 983 | 38528942456429 984 | 52650914010969 985 | 42086239825541 986 | 83527313549759 987 | 45924785901620 988 | 47465972487123 989 | 50175218559881 990 | 50910178073005 991 | 50654345015303 992 | 52451364658508 993 | 53000244579233 994 | 53256077636935 995 | 54668917039081 996 | 55252947593316 997 | 60989877435659 998 | 55217796959806 999 | 70401558006517 1000 | 70628440051680 -------------------------------------------------------------------------------- /2019/days/day06/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | RN2)HSX 2 | TYQ)JFL 3 | PBD)P1X 4 | 69L)R17 5 | LWG)VPQ 6 | TL1)MC6 7 | LV4)LFV 8 | LGY)LF3 9 | Y8D)CMZ 10 | N5F)CR9 11 | C6M)J97 12 | M39)BZP 13 | MNY)8NQ 14 | NVF)HXQ 15 | FKJ)KP3 16 | 5YR)87D 17 | CYL)677 18 | JPT)ZL6 19 | 79B)J1Q 20 | JYH)TS6 21 | LJN)QY3 22 | 61T)YKQ 23 | 3CM)8DT 24 | 6FM)D8L 25 | TJ5)G4G 26 | 1KL)BGT 27 | 371)95C 28 | 7VQ)241 29 | GWX)KNY 30 | 7NS)VYG 31 | N5J)9K1 32 | VH9)Q3H 33 | 4SL)JRQ 34 | 6VB)Z96 35 | Z68)YY6 36 | RHD)S1K 37 | FP5)XJH 38 | BWC)98G 39 | JKT)PTH 40 | YKL)THM 41 | TJJ)BXL 42 | VM9)LV1 43 | W8C)P7R 44 | C5J)8SL 45 | 7DG)RN2 46 | JQD)KXN 47 | C53)DX6 48 | RST)4DP 49 | 652)FG6 50 | 1PB)CCQ 51 | KY5)HBS 52 | J68)GZT 53 | GMJ)WLX 54 | ZM1)DFF 55 | 38F)S9G 56 | 869)TYQ 57 | 534)H7C 58 | BXH)YQV 59 | FNP)15P 60 | YKK)F27 61 | 925)HTT 62 | 1FD)J77 63 | 8RN)N35 64 | 88J)65N 65 | 9DM)CW4 66 | DSH)DXM 67 | QSK)2WM 68 | 6DH)C53 69 | 544)K2Z 70 | F65)9QT 71 | 1H2)8MY 72 | 6CS)F61 73 | SD1)82Q 74 | SW2)C5J 75 | 96X)3CF 76 | M8G)4VR 77 | QML)XM8 78 | 5C1)8R1 79 | 2R9)YNZ 80 | PY5)LFR 81 | TL1)ZKK 82 | HHD)794 83 | TKX)LNB 84 | 95C)BVL 85 | 9NM)8HJ 86 | YKQ)Z29 87 | YMG)388 88 | ZGV)XTB 89 | 6PN)F7C 90 | DNQ)GSQ 91 | 6T7)GZZ 92 | W3G)9X3 93 | F5T)KL4 94 | 4H2)QBC 95 | HQC)GG4 96 | 1N7)GH9 97 | JT2)QNR 98 | ZHD)CTW 99 | 3SS)9S4 100 | Q3H)2TB 101 | KXN)NV4 102 | 13K)9WV 103 | PP1)VWR 104 | 1YJ)BGM 105 | 6RC)M6W 106 | NYZ)5P6 107 | HTT)HP1 108 | 712)PSR 109 | DP8)N9L 110 | B2R)8N1 111 | 4VR)FP5 112 | T3X)FCR 113 | PG9)NFN 114 | 25P)D1Q 115 | NFK)CV8 116 | KGJ)G5S 117 | QRL)C4N 118 | BDM)F95 119 | Y1T)5C1 120 | WLX)HX3 121 | 12X)9TL 122 | BPD)SZJ 123 | GMP)RHF 124 | W4D)YYS 125 | 722)JVQ 126 | JJ4)3FG 127 | 3FG)X4Q 128 | ZM6)3G3 129 | MC6)L7Q 130 | DPB)M39 131 | MQF)W28 132 | 87V)8ZV 133 | 7DG)M3Y 134 | 1VN)MFS 135 | 9Q6)3C9 136 | 7MP)17N 137 | Y5M)Y3X 138 | 6N3)LTV 139 | VQ3)W8G 140 | QRK)GD2 141 | LNB)LFL 142 | DKF)RL2 143 | 1T5)W95 144 | VZ5)K5V 145 | 76Q)W4D 146 | QH2)8JR 147 | 2WM)S9C 148 | 9X1)V35 149 | KZN)YRP 150 | 9X5)T47 151 | FPS)TCH 152 | YRJ)Y6B 153 | 67X)SFG 154 | D68)YQ6 155 | YKV)B2L 156 | 6PN)7FT 157 | KWW)ZQ6 158 | ZTS)2BS 159 | HG6)2B8 160 | 9K1)62W 161 | 4YH)J98 162 | RRG)FJW 163 | J98)QK3 164 | LRZ)P76 165 | 83Y)GXQ 166 | 838)X49 167 | 4LB)GC3 168 | 2R4)DPB 169 | MC4)31H 170 | M8Z)FKJ 171 | 8R1)NDM 172 | GNX)GYF 173 | MFL)DL7 174 | WGD)JSX 175 | SGN)TKX 176 | C2D)P6P 177 | LHH)G31 178 | PN6)959 179 | Q4Q)1CD 180 | 3GL)82F 181 | MS5)SPX 182 | 7GZ)7MC 183 | JRQ)RWY 184 | 51T)C2D 185 | 9N6)PR9 186 | CTW)Y54 187 | MJW)LJ7 188 | QBC)PW7 189 | NDM)RD5 190 | K85)KWW 191 | HBS)T66 192 | PC2)H7X 193 | MFS)VF9 194 | 4J5)X6P 195 | JP8)GF2 196 | 7VZ)C3H 197 | 6HK)KVS 198 | BKR)96X 199 | QMF)JT2 200 | XDC)FLD 201 | TG3)XDC 202 | CCQ)CH7 203 | 48C)CTS 204 | 9WV)1YK 205 | 31G)M8Z 206 | RYN)HV3 207 | WC6)9DH 208 | H7C)XT5 209 | 36P)SX4 210 | P28)RWX 211 | H7C)L59 212 | P3K)RKB 213 | HP3)MS5 214 | Y1F)X6X 215 | LZV)F4K 216 | 6TR)33Y 217 | YQ6)N8D 218 | MMP)6NJ 219 | 4R8)J47 220 | 9JV)JF2 221 | 15R)ZQP 222 | CH7)31G 223 | FJW)1KF 224 | YSV)G5C 225 | LKV)C6M 226 | W28)HP3 227 | 33Y)MQF 228 | V35)PN6 229 | 24J)6PN 230 | ZJ1)QH2 231 | BGT)S8W 232 | 61W)MD5 233 | GZZ)M6B 234 | FCR)427 235 | RD5)WGD 236 | 72B)9Q6 237 | 62W)51T 238 | 82Q)CQH 239 | MZT)TL1 240 | D8M)T2B 241 | R8X)8YD 242 | F1K)9WC 243 | ZL6)3LX 244 | M6K)KTL 245 | GY6)GYN 246 | V8Q)J88 247 | WHH)STN 248 | XCC)WQK 249 | LGC)5JG 250 | S9G)FDZ 251 | LR8)W6M 252 | FC5)HX2 253 | MBC)M6F 254 | JSX)P3K 255 | K5J)Y9T 256 | ZRC)99H 257 | RGR)HHD 258 | QK2)GYY 259 | Y93)8QK 260 | Z5Z)7VQ 261 | DM6)41X 262 | ZQP)KWZ 263 | T4S)8PB 264 | 66B)SGZ 265 | 2Z3)L28 266 | CR9)ZTW 267 | 79G)MFL 268 | M56)X79 269 | JLJ)CJ9 270 | SD7)JZT 271 | KVS)YSV 272 | K2M)869 273 | BX1)371 274 | F4K)1H2 275 | RZQ)MP3 276 | HX2)GLM 277 | 3M6)PY5 278 | YY6)M6G 279 | 32F)MWS 280 | 1JC)SPG 281 | Y54)GQT 282 | 1BN)MBC 283 | 7MC)9JV 284 | G35)RTC 285 | 38H)J68 286 | CFB)ZLH 287 | YYS)81D 288 | J2H)557 289 | L57)N6J 290 | 5YR)LLG 291 | SX4)JN2 292 | PMV)44K 293 | ZH2)XSN 294 | QTJ)V8J 295 | 5DZ)VZ5 296 | VYL)165 297 | PR9)W41 298 | NLD)61V 299 | TKD)H4G 300 | 45M)H25 301 | 9PF)WT5 302 | 7FT)YM1 303 | LBT)32F 304 | SJS)224 305 | 7NW)874 306 | DXZ)SW2 307 | XR2)SLK 308 | TD9)PC2 309 | 1X1)WLM 310 | 57Y)C1Y 311 | HCF)3GL 312 | 7W2)2BB 313 | 5RT)6T7 314 | YLZ)DGZ 315 | MBX)7LN 316 | F9G)MJW 317 | 88P)8WS 318 | DRM)HCZ 319 | B7Z)BBH 320 | VD9)LKV 321 | MJW)J9N 322 | JYK)5CF 323 | 5FJ)6TR 324 | DG4)QML 325 | MTY)55J 326 | NRM)BX1 327 | CRP)1KL 328 | YHP)JNJ 329 | DPH)N4X 330 | ZLH)FNK 331 | QZ7)JTK 332 | W9Y)4P2 333 | ZCQ)HCF 334 | Y9K)MBX 335 | ZGV)F9G 336 | Z96)W9Y 337 | XQT)YTZ 338 | J88)FPS 339 | 8DT)FWK 340 | T88)2L9 341 | FCH)ZCZ 342 | HWZ)7PJ 343 | VW3)P5F 344 | X8G)BW9 345 | GZD)VQ3 346 | SPX)LCT 347 | QK3)7MP 348 | 31H)1M3 349 | MR9)RGR 350 | JF6)3PF 351 | 7GK)JM7 352 | Y41)QK2 353 | 54M)1JC 354 | 12D)B2R 355 | X77)ZHD 356 | 3D6)5J6 357 | X79)ZRC 358 | 3HJ)K1M 359 | W9Y)8PW 360 | H59)YLZ 361 | 5YF)Z3M 362 | 44V)ZGV 363 | GH9)LPP 364 | QTS)BHF 365 | WM1)8RN 366 | LHN)QSG 367 | YSQ)Y9R 368 | 1YK)RYN 369 | JQK)QJ9 370 | JYH)VD9 371 | H84)4KZ 372 | 8GC)7W2 373 | 63N)QTS 374 | 9CK)N89 375 | 241)RZQ 376 | DBQ)D4H 377 | MTY)12X 378 | TWS)YRD 379 | 83H)5YF 380 | LHN)5CM 381 | 683)BPV 382 | SLK)WTG 383 | 1N7)9HJ 384 | RKB)TGL 385 | 2W5)2FR 386 | K5V)ZTD 387 | MZ7)5KW 388 | N8Y)DBX 389 | BBH)WLH 390 | 7C3)F44 391 | M39)69L 392 | LV1)R1N 393 | QSK)PY6 394 | ZWN)CX1 395 | 427)MTY 396 | DW7)1RY 397 | ZSQ)R5W 398 | 6VT)22N 399 | 557)2Y7 400 | QGN)P7Z 401 | F65)NYZ 402 | RJ9)QGN 403 | ZCZ)KJ3 404 | Z1S)PKJ 405 | Y4F)TWS 406 | QH7)ZH2 407 | J8X)P5R 408 | 2BB)GF4 409 | 726)YP6 410 | YK5)7GZ 411 | LTV)7JD 412 | 2NN)1ZW 413 | BVS)9CK 414 | 361)FRD 415 | T21)712 416 | LVY)W8C 417 | V39)Z1S 418 | 2S6)HQC 419 | RWY)MKM 420 | L28)F97 421 | PNB)B7G 422 | HCZ)HWZ 423 | MHT)RST 424 | 34X)9SM 425 | KJ3)79F 426 | K8L)8GC 427 | FRD)9T6 428 | KK5)G2K 429 | 82F)KYL 430 | 5LB)V8Q 431 | 21L)46C 432 | MFR)VKC 433 | HMH)7T2 434 | XK9)CBP 435 | ZK3)X8C 436 | FVD)YKV 437 | JTK)CYN 438 | QDJ)3SS 439 | YNZ)DHZ 440 | F7R)7NW 441 | WLH)2T4 442 | 1H2)D68 443 | 98G)NLD 444 | 959)PMV 445 | KMN)61T 446 | GQT)ZTS 447 | LF3)WHH 448 | 3C9)J2X 449 | 4K2)BJT 450 | R2K)5SJ 451 | W6M)N8P 452 | BJT)P4X 453 | 41X)FS6 454 | MK8)KDB 455 | PJ7)HM1 456 | T5G)MHY 457 | 8DT)FCH 458 | F9Y)BPT 459 | W8Q)3DD 460 | YQC)BGH 461 | NWN)C17 462 | MD5)Y1F 463 | MHY)QH7 464 | ZMH)NN8 465 | V32)WTX 466 | FK1)ZJ1 467 | SD7)1TM 468 | 1TK)T4P 469 | 79F)3S8 470 | C1Y)QTL 471 | ZML)PKM 472 | M3Y)2V5 473 | VQ8)ZMH 474 | S9C)M6K 475 | TKD)544 476 | DL7)K8L 477 | BHF)8BC 478 | WT5)NYF 479 | JD3)GNM 480 | GC3)32M 481 | 5CF)XV8 482 | B3S)P5J 483 | 5L7)5DV 484 | PGN)3JR 485 | 2V5)843 486 | 8NQ)RHD 487 | W5N)76Q 488 | GF4)QHF 489 | 78B)MHT 490 | JZT)GZD 491 | RWX)FLN 492 | FGG)HN9 493 | MP3)B94 494 | F1C)79B 495 | C3H)7WK 496 | WLH)T21 497 | R5W)7VL 498 | 6DS)3S6 499 | QNR)271 500 | Y75)95S 501 | K8V)T4J 502 | 2DN)RCV 503 | 3G3)34X 504 | 84Z)V32 505 | 2T4)TWG 506 | S26)814 507 | DPF)D8M 508 | N9D)THZ 509 | 8S7)2CC 510 | 8CX)CLG 511 | 4DZ)RBH 512 | 42G)DWS 513 | SFN)LZV 514 | P7Z)LTH 515 | G2K)J2H 516 | 2L4)5YZ 517 | 6S6)GDR 518 | 2CC)MZ7 519 | WNX)T9K 520 | DHZ)LVY 521 | WQK)5WJ 522 | LS1)44V 523 | 2XL)2GH 524 | X3D)VTB 525 | 5KW)PP1 526 | 4BH)V39 527 | STV)ZSQ 528 | 83D)PH7 529 | VF9)VH9 530 | S8W)6VB 531 | F4B)Y75 532 | VYG)SFY 533 | KTL)45M 534 | LFL)PS5 535 | MWS)JLY 536 | SH3)39L 537 | 9DH)61W 538 | MD4)NK9 539 | 49C)2W5 540 | 7CL)3TL 541 | CBP)2R4 542 | 271)K7T 543 | 3TL)5L7 544 | ZM1)ZML 545 | W9T)GBS 546 | 6FL)LHN 547 | Z7W)1PB 548 | JNJ)XCC 549 | YTZ)6DS 550 | BST)4BW 551 | SZJ)DKF 552 | PTH)2S6 553 | 2VH)361 554 | 8BC)Q4B 555 | PSR)7WV 556 | 4BB)32V 557 | PQL)TJ5 558 | D3X)TVD 559 | HYC)J8X 560 | ZPF)XXY 561 | 1RT)BST 562 | Q3H)Q7C 563 | YVJ)ZWN 564 | XPX)1TK 565 | SJS)YK5 566 | 22N)N72 567 | JRN)H84 568 | 1T5)MD4 569 | XZG)4ZJ 570 | 55J)8C7 571 | N8P)GMJ 572 | PSR)1VN 573 | YQV)FGH 574 | KRT)SZQ 575 | CP5)1N7 576 | Q5F)29K 577 | Q5P)QMF 578 | YP5)726 579 | YW9)4SL 580 | R8P)7ZB 581 | 1RY)JF6 582 | ZQZ)R8P 583 | 7W2)YHP 584 | 2B8)SH3 585 | 794)H59 586 | BBJ)27J 587 | VJF)S4R 588 | XPT)RV1 589 | 7T2)ZXL 590 | GLM)3BF 591 | 32M)SS5 592 | 9HJ)JG2 593 | 8MY)YKL 594 | QMF)JQJ 595 | PK5)CLP 596 | GYF)WY9 597 | G5C)JGL 598 | JG2)K8V 599 | YQC)79G 600 | 4PL)L45 601 | 32P)BY1 602 | ZDQ)925 603 | W41)G5P 604 | SM2)P87 605 | NBZ)5FJ 606 | 814)KZN 607 | NJK)PNB 608 | FMY)NRM 609 | 4VZ)CGG 610 | 652)YKK 611 | WVB)BY5 612 | C4N)4R8 613 | 9BM)87V 614 | 9QT)HKS 615 | N6J)6HK 616 | 8PW)B4S 617 | LPP)7NS 618 | HCF)DP8 619 | 6DK)MC4 620 | 4JV)48C 621 | WYH)JTD 622 | 4D2)1SQ 623 | C17)MK8 624 | X77)WSM 625 | XTB)PCT 626 | J47)9X5 627 | 3Q3)88P 628 | 97J)C92 629 | HP1)HG6 630 | 4P2)DW7 631 | 843)D3X 632 | THZ)D4Q 633 | F44)36P 634 | P5R)WDY 635 | BZP)PJ7 636 | RDF)48T 637 | R17)7WG 638 | FWK)Y4F 639 | 39X)JQD 640 | SY2)BDM 641 | DJN)Y93 642 | KTP)RTM 643 | 73W)WNX 644 | 935)LBT 645 | N2L)5DZ 646 | L7L)5MS 647 | 224)785 648 | FDZ)GNX 649 | F3H)5WR 650 | LPB)YSQ 651 | DBV)Y9K 652 | ZKP)97J 653 | FJW)ZM1 654 | MYD)MM5 655 | COM)HM9 656 | SGZ)Q4Q 657 | NK9)4H2 658 | VM4)5G3 659 | Q7C)FPX 660 | FS6)M56 661 | XBR)N8Y 662 | BDL)SML 663 | YRD)HKR 664 | F7C)PRR 665 | 388)RY4 666 | HV3)XBR 667 | M9X)NWN 668 | F27)CYL 669 | WDY)SJS 670 | ZR4)5LY 671 | L7Q)YP5 672 | YRP)DY2 673 | HX3)1SD 674 | R9H)PBD 675 | X8D)W3B 676 | Y41)6FM 677 | Z9F)4TR 678 | MM5)66B 679 | SML)38H 680 | NFN)1KN 681 | 4W2)ZLV 682 | BZP)9X1 683 | Q7C)5DY 684 | 1TM)HKB 685 | VKX)LWG 686 | FCR)F7F 687 | BY1)5J7 688 | THS)LKP 689 | WQK)C19 690 | 17N)Y1T 691 | CKH)L57 692 | 78P)NV5 693 | GF2)FGG 694 | FGG)SD1 695 | 874)KTP 696 | JRR)CFB 697 | 4VC)T3X 698 | DGZ)WZC 699 | 1CD)83D 700 | XXY)S26 701 | LKH)JD3 702 | K1M)KK5 703 | 8YQ)6V7 704 | TKR)VQ8 705 | N7H)ZZP 706 | R1N)F1C 707 | TPW)R2K 708 | JGL)XNJ 709 | 5WJ)72B 710 | 62W)ZPF 711 | KNY)C7F 712 | SPG)3PC 713 | FNK)NBZ 714 | HKB)NFK 715 | CJ9)9WW 716 | KWZ)M8G 717 | P28)NVF 718 | 6V7)MYD 719 | ZYH)JYD 720 | XQT)VFM 721 | 99H)9FJ 722 | 4ML)GY6 723 | CP5)WM1 724 | X6P)STV 725 | 1SQ)KRT 726 | 7JD)J2B 727 | 3JZ)F7R 728 | 65N)QRK 729 | MW7)TFR 730 | 2L9)ZDQ 731 | D4H)F9Y 732 | PS5)WTV 733 | G35)6QC 734 | LTH)9MY 735 | DQJ)2VH 736 | SPB)6HB 737 | L9W)L7L 738 | WNL)83H 739 | 34G)JLJ 740 | 8SL)H75 741 | JVQ)CKH 742 | 165)VW3 743 | X4Q)DBQ 744 | VWR)7YW 745 | T9K)JW4 746 | 79G)WYH 747 | S5T)K6R 748 | 78P)QRX 749 | GZT)447 750 | 3S6)4YH 751 | PCT)57Y 752 | 39X)W9T 753 | Y9R)5RT 754 | 8C7)DNQ 755 | 9WC)MNY 756 | 785)SFN 757 | RCV)42G 758 | D1Q)Q5P 759 | C4Y)DG4 760 | 72G)78B 761 | XHT)S5T 762 | HX3)WTB 763 | JVC)9NM 764 | KMZ)WVB 765 | HN9)5LB 766 | WTV)JP8 767 | 8JP)Z5Z 768 | VTB)WHR 769 | BWP)YTK 770 | PY6)DXZ 771 | 5G3)2NN 772 | ZXL)3HJ 773 | 3ZD)VKX 774 | 4ZJ)8RD 775 | GWX)1FD 776 | WDY)4ML 777 | P4X)3D6 778 | JQJ)34G 779 | KNH)Q81 780 | HPR)SG1 781 | RY4)73V 782 | 7ZB)BYD 783 | BPT)ZK3 784 | CLG)G7W 785 | 3CF)1D1 786 | B5F)21L 787 | Z4Y)FBV 788 | GM9)JRR 789 | D9M)C7J 790 | B4S)ZKP 791 | P5J)32P 792 | T9K)FK1 793 | HXQ)7LT 794 | MSD)88Z 795 | 5P6)JRN 796 | M91)JQK 797 | W82)ZSH 798 | WLM)935 799 | DY2)J81 800 | 9XJ)4JZ 801 | N72)VM4 802 | T2B)V7B 803 | M6B)2XL 804 | J77)N5J 805 | 9W2)T2J 806 | JFL)Q11 807 | FNK)V15 808 | W8G)QRL 809 | T4J)F5T 810 | G5S)F65 811 | G31)LGC 812 | 8YD)6CS 813 | 838)TWL 814 | CW4)RDF 815 | 46C)GM9 816 | HSX)MTZ 817 | 447)RJ9 818 | N4X)25P 819 | 9FJ)6S6 820 | W8S)ZVM 821 | NN8)N7H 822 | 6T7)M9L 823 | CV8)2L4 824 | ZZP)PYZ 825 | HKR)YXC 826 | C28)6VT 827 | FBV)QPZ 828 | WY9)BXH 829 | JF2)GSK 830 | PYR)195 831 | GD2)KY5 832 | 1ZW)BKR 833 | CZL)VX9 834 | C7F)VP1 835 | VFM)CYB 836 | MC6)TZP 837 | C75)9BM 838 | GSQ)LHH 839 | J2X)3K1 840 | 7CL)JJ4 841 | RHF)MZT 842 | 5DV)3CM 843 | 5MR)Z68 844 | 6HZ)N2L 845 | D39)HYC 846 | D4Q)DV6 847 | 2TB)H3R 848 | 673)J27 849 | J81)B5F 850 | 1D1)JKT 851 | 44K)Y8D 852 | 8PB)1T5 853 | C92)QZ7 854 | LW8)4TW 855 | 3Q4)SGN 856 | FK1)D9Q 857 | ZSH)PK5 858 | BXL)6HZ 859 | FQ5)T5G 860 | KDB)C75 861 | 3HJ)LRZ 862 | VCJ)LV4 863 | G7K)4JV 864 | HMP)54M 865 | 7PJ)3Q4 866 | GH2)5R2 867 | B1W)DPH 868 | P6P)1YJ 869 | B9S)3JZ 870 | J1Q)NVV 871 | CQH)BWC 872 | 48T)FNP 873 | Z29)86W 874 | NNC)LGY 875 | H3R)DPF 876 | CLP)JKB 877 | LLG)8TM 878 | TQQ)7C3 879 | 8N1)XR2 880 | D9Q)B3S 881 | GC3)84Z 882 | QPZ)83Y 883 | 5DR)JPT 884 | 2BS)M2H 885 | F1T)XQT 886 | KYL)SPB 887 | VP1)Q6F 888 | P2H)NJK 889 | CTS)7VZ 890 | J27)YD4 891 | NRM)Z4Y 892 | RTC)M91 893 | 7LT)D39 894 | W95)T88 895 | M6W)691 896 | KP3)BBJ 897 | SZJ)HR2 898 | V8J)88J 899 | 8VG)S95 900 | R3K)VWT 901 | ZVM)XZG 902 | 9MY)6L2 903 | L59)WGP 904 | 5WR)LKH 905 | M9L)D2X 906 | JSF)X8D 907 | RGR)K85 908 | H7X)VJF 909 | 7KT)Y26 910 | ZK3)PG9 911 | 61V)YQC 912 | NYF)8YQ 913 | ZLV)WT4 914 | 9X1)L9W 915 | CQK)GH2 916 | C7J)SD7 917 | FG6)15R 918 | K6R)Z9F 919 | SS5)WT1 920 | 9X3)LJN 921 | JVQ)2Z3 922 | 4BW)JRC 923 | 5LY)XPX 924 | LJ7)D9M 925 | LRZ)PYR 926 | JW4)KT5 927 | HM9)LS1 928 | SG1)XHT 929 | HK8)4G3 930 | L45)KNH 931 | 1KF)DJN 932 | KXG)TXP 933 | FPX)2DX 934 | DNQ)4K2 935 | DX6)W46 936 | 7GH)3ZD 937 | MK8)5MR 938 | RKB)7DG 939 | QHF)X3D 940 | QJ9)5DR 941 | F97)PQL 942 | X6X)2DN 943 | PRR)ZYH 944 | CJ9)HK8 945 | 677)MMP 946 | FRD)R3K 947 | 13K)TJJ 948 | 3PF)3FQ 949 | FGH)XX5 950 | N8D)9W2 951 | 4DP)R9H 952 | 3JR)YVJ 953 | B5F)VJB 954 | YTH)PJ2 955 | 78M)4VZ 956 | PJ2)C28 957 | 5DY)R8X 958 | TPW)HPR 959 | TZP)YW9 960 | JRC)4J5 961 | 5SJ)XK9 962 | Y6B)67X 963 | B7G)K5J 964 | BGH)MW7 965 | 8JR)T2Z 966 | VX9)HQZ 967 | XM8)B9S 968 | MS5)HLP 969 | 9S4)4BH 970 | LFR)K2M 971 | 5JG)3SP 972 | J2B)Z7W 973 | X49)TG3 974 | 7LN)JPC 975 | GXQ)GS4 976 | 6L2)TNX 977 | 3FG)BDL 978 | T47)X77 979 | RX9)1X1 980 | GYY)KXG 981 | QS4)M9X 982 | Y26)VM9 983 | RTM)9DM 984 | 3HZ)12D 985 | KK2)ZM6 986 | 68X)N9D 987 | B7G)3M6 988 | DB3)4LB 989 | 2DX)RZ9 990 | C19)CQK 991 | NBB)3HZ 992 | 8TM)F3H 993 | WT4)4PL 994 | CZL)JYH 995 | 15P)KK2 996 | 9MV)DRM 997 | TFR)JVC 998 | ZQ6)TVW 999 | Z7W)DQJ 1000 | 8MW)QSK 1001 | XJH)X8G 1002 | P5F)NBB 1003 | YQN)YMG 1004 | F7F)73W 1005 | Y3X)652 1006 | HM1)Y41 1007 | ZTD)TKR 1008 | 4YK)13K 1009 | 95J)1FJ 1010 | 1FJ)5YR 1011 | PW7)534 1012 | CX1)MFR 1013 | DWS)TPW 1014 | LFV)N5F 1015 | 427)P28 1016 | K2Z)CP5 1017 | V7B)SY2 1018 | N8P)NNC 1019 | F44)39X 1020 | 3FQ)2R9 1021 | YXC)DM6 1022 | ZTW)9XJ 1023 | 7WG)2Q8 1024 | QTL)M6H 1025 | F1K)LRD 1026 | 3BF)THS 1027 | T66)FMY 1028 | 27J)1RT 1029 | 1KN)BPD 1030 | GNM)9PF 1031 | MTZ)QWN 1032 | QSG)MF2 1033 | 8T7)683 1034 | Z5Z)8S7 1035 | 8SH)W4F 1036 | XX5)BWP 1037 | 9DH)KGJ 1038 | M9X)6N3 1039 | TGL)MR9 1040 | MQF)FQ5 1041 | TS6)6FL 1042 | CYN)6DH 1043 | 195)SAN 1044 | STN)WZL 1045 | RBH)M8S 1046 | 73V)WNL 1047 | BPV)HMH 1048 | 8QK)DBV 1049 | WY9)JTV 1050 | G7W)9N6 1051 | TXP)4BB 1052 | PH7)WC6 1053 | CGG)1BN 1054 | JF6)NNR 1055 | 5MS)DB3 1056 | 9SM)965 1057 | D8L)916 1058 | 691)7CL 1059 | 4G3)8MW 1060 | 6NJ)T4S 1061 | 7WK)RX9 1062 | JLY)Y5M 1063 | DBX)J1K 1064 | GBS)F4B 1065 | HXQ)CRP 1066 | WTX)8VG 1067 | WGP)YOU 1068 | TVW)G7K 1069 | M2H)GKG 1070 | 65N)722 1071 | 5J7)XPT 1072 | THM)78M 1073 | QY3)CZL 1074 | 9SM)ZR4 1075 | P76)W8S 1076 | BYD)QTJ 1077 | JYD)LW8 1078 | 4G3)W3G 1079 | 5R2)QS4 1080 | 2GH)HZ9 1081 | LCT)F1K 1082 | WSM)YTH 1083 | 21L)LR8 1084 | HR2)W5N 1085 | 916)7KT 1086 | 9TL)7GH 1087 | N9L)W8Q 1088 | VJB)TD9 1089 | FLN)838 1090 | 1SD)LPB 1091 | HKS)49C 1092 | 88Z)YRJ 1093 | CYB)68X 1094 | CH7)JYK 1095 | XV8)4YK 1096 | PXJ)SM2 1097 | 2Q8)8T7 1098 | 6QC)G9M 1099 | BVL)6DK 1100 | J1K)FC5 1101 | W3B)4DZ 1102 | 4TW)YQN 1103 | HLP)8JP 1104 | M8S)S76 1105 | YD4)Q5F 1106 | 48T)GWX 1107 | PKM)4W2 1108 | 86W)FG2 1109 | JTD)JSF 1110 | VJB)B7Z 1111 | ZM6)P2H 1112 | G9M)TKD 1113 | ZQP)8XQ 1114 | TWG)PXJ 1115 | 8XQ)3Q3 1116 | GG4)ZQZ 1117 | W4F)FVD 1118 | WT1)673 1119 | 5CM)4D2 1120 | K7T)24J 1121 | 9HJ)8SH 1122 | Q6F)VYL 1123 | 8RD)78P 1124 | JG2)6RC 1125 | Q6F)BKL 1126 | T2Z)KMZ 1127 | LR8)KMN 1128 | GKG)38F 1129 | XT5)8CX 1130 | FG2)VCJ 1131 | V15)9MV 1132 | GBS)4VC 1133 | M6G)TQQ 1134 | J9N)QDJ 1135 | MF2)BVS 1136 | BX1)C4Y 1137 | 1M3)95J 1138 | J97)7GK 1139 | VWT)PGN 1140 | S9G)72G 1141 | 87D)B1W 1142 | PYZ)F1T 1143 | ZCZ)W82 1144 | WHR)CRV 1145 | 7GK)63N 1146 | JN2)RRG 1147 | QRX)HMP 1148 | 4VR)ZCQ 1149 | V8Q)GMP 1150 | SFG)RXQ 1151 | 39L)G35 1152 | WZL)DSH 1153 | TWL)MSD -------------------------------------------------------------------------------- /2021/days/day03/input/dzikoysk.input: -------------------------------------------------------------------------------- 1 | 000100011010 2 | 110011110110 3 | 011000101111 4 | 001101100101 5 | 011100001000 6 | 101101011011 7 | 101111010101 8 | 011010000101 9 | 010101000010 10 | 100001111000 11 | 111011111100 12 | 100001001100 13 | 100000001011 14 | 110111110010 15 | 001110010110 16 | 001000001000 17 | 001000000110 18 | 101101101010 19 | 111000111101 20 | 011010111101 21 | 000101100111 22 | 000101000001 23 | 101101101011 24 | 001110010010 25 | 101001100001 26 | 110010100111 27 | 010111100111 28 | 001011010001 29 | 000010011010 30 | 000010010001 31 | 001101100001 32 | 100000001101 33 | 001011010111 34 | 110000010101 35 | 010001001101 36 | 100101011001 37 | 101101111001 38 | 000110001111 39 | 111011110010 40 | 011011111011 41 | 001111111011 42 | 110001010111 43 | 010101101011 44 | 110101101000 45 | 011010111100 46 | 101000110110 47 | 001011110011 48 | 011011101001 49 | 000111010010 50 | 010111010110 51 | 111000100001 52 | 101110000001 53 | 110011111101 54 | 101000011101 55 | 000100010100 56 | 011010100011 57 | 010101011100 58 | 111010001011 59 | 100110001110 60 | 111101101001 61 | 011000010100 62 | 110101011010 63 | 011010111111 64 | 010010000100 65 | 111011000000 66 | 001011110100 67 | 100110000111 68 | 000110111111 69 | 101100111110 70 | 010010001011 71 | 010001010110 72 | 010010001010 73 | 101111101100 74 | 110001100001 75 | 101100000010 76 | 110110010000 77 | 111000000001 78 | 100110111111 79 | 011111100111 80 | 100111001100 81 | 111001011001 82 | 101001110001 83 | 110110011100 84 | 000000110100 85 | 100101100000 86 | 110010111001 87 | 000100001111 88 | 011000101000 89 | 110011010010 90 | 011011010000 91 | 001010011011 92 | 111010011000 93 | 101000111101 94 | 001000011000 95 | 010100100000 96 | 101101111011 97 | 010000001001 98 | 100010010101 99 | 101010111010 100 | 001111000111 101 | 100110011000 102 | 100001101011 103 | 111101111011 104 | 010100010111 105 | 011100011110 106 | 010001000000 107 | 001111000000 108 | 001110101101 109 | 101101001011 110 | 101101001111 111 | 101111000111 112 | 101001001000 113 | 010100001011 114 | 110110100101 115 | 110001000000 116 | 011110010110 117 | 001011111011 118 | 100001011100 119 | 000000010001 120 | 000101111001 121 | 010110010111 122 | 010000111001 123 | 011011000101 124 | 111101100101 125 | 010111101001 126 | 010110000010 127 | 011001111101 128 | 101000000100 129 | 011000000010 130 | 001111000101 131 | 001000110001 132 | 011010010110 133 | 101001011000 134 | 011010111010 135 | 010101001001 136 | 111000101110 137 | 100100101100 138 | 010011001001 139 | 001010111001 140 | 110101100000 141 | 111111101010 142 | 001001011110 143 | 111111100000 144 | 001101010110 145 | 101011011000 146 | 001111001001 147 | 010000100001 148 | 100100110001 149 | 110001011001 150 | 110011010111 151 | 000111011001 152 | 011001001011 153 | 111011000101 154 | 000000110000 155 | 000110101001 156 | 001010100100 157 | 100101100101 158 | 010101011001 159 | 001000101010 160 | 100100000000 161 | 110101110001 162 | 101000111100 163 | 110000001010 164 | 111010100010 165 | 101010111110 166 | 101110010001 167 | 000010001100 168 | 000000100011 169 | 101010000011 170 | 011101000000 171 | 100110010101 172 | 000010001001 173 | 010111111111 174 | 110100011011 175 | 000011111011 176 | 000010000101 177 | 110001110010 178 | 011011001111 179 | 111001111001 180 | 011110100100 181 | 000011010000 182 | 001001010001 183 | 000011011001 184 | 000000001111 185 | 111100001100 186 | 111100100101 187 | 110110001110 188 | 000101001110 189 | 010011011000 190 | 110010000101 191 | 101110111101 192 | 001111111001 193 | 101001000101 194 | 100011111001 195 | 100111000110 196 | 000001001111 197 | 110110011000 198 | 010010000010 199 | 010101011111 200 | 100001010010 201 | 100111100011 202 | 000101111100 203 | 100000011110 204 | 010110101000 205 | 001110110000 206 | 000110111110 207 | 110000000011 208 | 111110000010 209 | 111000001000 210 | 001111011011 211 | 010100000100 212 | 010101100110 213 | 000111000001 214 | 000010111000 215 | 111010110011 216 | 000010101100 217 | 011101000101 218 | 011001000110 219 | 100010010111 220 | 110001010011 221 | 101011111010 222 | 000000111001 223 | 101100101010 224 | 011110001000 225 | 011110111010 226 | 001000101001 227 | 100100100001 228 | 111101010100 229 | 100100101000 230 | 011010101101 231 | 111011111011 232 | 110000101110 233 | 000101011010 234 | 010111000011 235 | 010011011100 236 | 001101110011 237 | 111101110000 238 | 000110010000 239 | 101000000110 240 | 001110100001 241 | 010111010011 242 | 000010010000 243 | 001000110110 244 | 111100000000 245 | 011111111000 246 | 111000100010 247 | 001111101101 248 | 011100101111 249 | 110001111010 250 | 011011111110 251 | 000111010110 252 | 000101100000 253 | 001010111101 254 | 110100100101 255 | 001101111000 256 | 101000010011 257 | 010110001011 258 | 110101100111 259 | 001000010110 260 | 000100111010 261 | 111010000000 262 | 011010110010 263 | 111111010010 264 | 110010001110 265 | 110111101010 266 | 101110111000 267 | 101100011001 268 | 000001010011 269 | 101011111100 270 | 001111101001 271 | 110010011010 272 | 010110010101 273 | 000010000010 274 | 101111101101 275 | 001000100001 276 | 001010010110 277 | 111011010010 278 | 111010111000 279 | 001111010100 280 | 001101110111 281 | 010010011011 282 | 010010010001 283 | 111100011101 284 | 111110110110 285 | 001000110101 286 | 011001011100 287 | 001000001101 288 | 110110000010 289 | 111111101011 290 | 000100000110 291 | 101000010111 292 | 001001000101 293 | 100001011101 294 | 101110000110 295 | 010111001110 296 | 000100101010 297 | 100010111001 298 | 111010100110 299 | 001001100100 300 | 110100110100 301 | 100101101111 302 | 011010111110 303 | 000100111000 304 | 110001011000 305 | 111101110011 306 | 100001010000 307 | 110101111110 308 | 011011011011 309 | 010111110100 310 | 101000110111 311 | 100101011101 312 | 110110010001 313 | 001000000011 314 | 111111101100 315 | 100111100101 316 | 111100001001 317 | 000000000110 318 | 110010101100 319 | 001111100011 320 | 001101100000 321 | 011000111100 322 | 110110001000 323 | 000110101011 324 | 011010100000 325 | 001100100010 326 | 101100111011 327 | 100001010001 328 | 100101101001 329 | 001100011011 330 | 110011001110 331 | 110010101111 332 | 010001100010 333 | 110010000100 334 | 110010000000 335 | 111000111001 336 | 011100000101 337 | 000110000110 338 | 111100100010 339 | 011011010100 340 | 011000001101 341 | 100100000110 342 | 101100111010 343 | 011011100001 344 | 111111001101 345 | 100010100100 346 | 010000010101 347 | 101111001000 348 | 011100010101 349 | 010110011100 350 | 110101010011 351 | 110101000100 352 | 000010000110 353 | 110101111010 354 | 100011111101 355 | 111000000100 356 | 101111100010 357 | 011110010000 358 | 111000111000 359 | 000000111011 360 | 100010110101 361 | 000001101011 362 | 001000000010 363 | 001101101010 364 | 111011101000 365 | 010011101001 366 | 110001110111 367 | 111010001001 368 | 110001001110 369 | 011101011011 370 | 010110010110 371 | 110110111100 372 | 000110100101 373 | 110000010111 374 | 100101000011 375 | 000000010101 376 | 111110110011 377 | 000001011011 378 | 111011110111 379 | 001100001110 380 | 000000011010 381 | 000100101001 382 | 101001101000 383 | 100011101110 384 | 101111001001 385 | 000100110000 386 | 000100011011 387 | 001111000010 388 | 010010010100 389 | 010111011111 390 | 100100000100 391 | 111101111000 392 | 110100010100 393 | 011110111000 394 | 001010001111 395 | 111110011111 396 | 101111100111 397 | 010101000110 398 | 010011111101 399 | 011111101001 400 | 000000101111 401 | 111100111011 402 | 001010011000 403 | 011101100010 404 | 011010010000 405 | 111001000000 406 | 000100000100 407 | 010000100000 408 | 111001101011 409 | 110001000001 410 | 110100001011 411 | 011010110001 412 | 001001110111 413 | 010000101011 414 | 000011110101 415 | 111100000101 416 | 011100110010 417 | 010111100101 418 | 010101010101 419 | 110000100111 420 | 010111100100 421 | 001101101101 422 | 101100001011 423 | 000101010000 424 | 110100111000 425 | 110101101110 426 | 111000001101 427 | 010001111111 428 | 111101000011 429 | 001000111000 430 | 100000000110 431 | 001010101010 432 | 111011001101 433 | 000110110111 434 | 110111110001 435 | 111010110100 436 | 011001000000 437 | 000100000101 438 | 011110100110 439 | 100011010111 440 | 010000101010 441 | 000111001100 442 | 000011001001 443 | 011010100010 444 | 110110100100 445 | 000111010011 446 | 111110010111 447 | 000101010010 448 | 011101000011 449 | 011101010110 450 | 100000110101 451 | 000100101101 452 | 101100001101 453 | 100101001010 454 | 100000100000 455 | 111011000011 456 | 001100100110 457 | 001001010010 458 | 010110001000 459 | 111110100100 460 | 000001111111 461 | 010101111001 462 | 110111000001 463 | 111110011001 464 | 100101100110 465 | 001100100100 466 | 001001101110 467 | 000011001010 468 | 001011111110 469 | 101010111011 470 | 011110100010 471 | 100111000100 472 | 100000100111 473 | 100011010010 474 | 011001010010 475 | 101111110010 476 | 100011111111 477 | 111010001100 478 | 011010000000 479 | 110100011111 480 | 100001100110 481 | 000001110110 482 | 000001101001 483 | 010010010010 484 | 011011000100 485 | 010100100001 486 | 100010000100 487 | 001001000001 488 | 111001001101 489 | 100101110011 490 | 101000100000 491 | 100010110011 492 | 110010100001 493 | 111111110010 494 | 010010110001 495 | 111011000010 496 | 010010010110 497 | 011001101011 498 | 011110110101 499 | 010000111111 500 | 010010011101 501 | 101100100101 502 | 001001001101 503 | 111000010000 504 | 000100011001 505 | 111111011100 506 | 010101110101 507 | 100110010111 508 | 100111010010 509 | 010111000000 510 | 000000001001 511 | 110011110000 512 | 001000011101 513 | 111000110001 514 | 000110011011 515 | 011101111010 516 | 101111111011 517 | 001011000100 518 | 001101100100 519 | 111101000001 520 | 001100101101 521 | 010111111011 522 | 100110111001 523 | 000011010100 524 | 010110100110 525 | 000010110001 526 | 101110111010 527 | 110000011110 528 | 010010101010 529 | 001100010110 530 | 011011111101 531 | 001110110110 532 | 000001110100 533 | 101000100101 534 | 110001100100 535 | 100000011001 536 | 011110011001 537 | 100010110010 538 | 100110111011 539 | 100011111010 540 | 011011011001 541 | 011000011000 542 | 010110111100 543 | 111000110100 544 | 001100001100 545 | 110001111001 546 | 110011011100 547 | 011100110000 548 | 001110011010 549 | 010011000111 550 | 010010101110 551 | 011000101101 552 | 111000111111 553 | 111001111101 554 | 101001011001 555 | 000111101010 556 | 001110111110 557 | 101100010110 558 | 011001001101 559 | 110100101000 560 | 010010001111 561 | 101011010001 562 | 001101011010 563 | 011111110000 564 | 000100111111 565 | 111101000010 566 | 100000010111 567 | 001100000011 568 | 101010011111 569 | 111011100110 570 | 100011011101 571 | 110101010101 572 | 011101010000 573 | 100010111100 574 | 100001000011 575 | 001011110110 576 | 111010111010 577 | 011010101000 578 | 110100000000 579 | 111001000111 580 | 010101110010 581 | 111000100000 582 | 100011001001 583 | 000010100010 584 | 010011111000 585 | 000101101110 586 | 100011110011 587 | 011001111011 588 | 000001111000 589 | 011111000110 590 | 100111000111 591 | 111110011010 592 | 101111001010 593 | 111100110011 594 | 011101100011 595 | 100000010101 596 | 101010010101 597 | 100111111000 598 | 101101101111 599 | 101100101000 600 | 110000111010 601 | 100110000010 602 | 000011000111 603 | 111100000001 604 | 101110111100 605 | 010001011011 606 | 100101111100 607 | 101111101010 608 | 111000010001 609 | 011010110110 610 | 100111011110 611 | 011111001001 612 | 011001111001 613 | 011010010011 614 | 100011010011 615 | 001011011011 616 | 111010010110 617 | 101001000000 618 | 100101101110 619 | 110001101010 620 | 010000000101 621 | 011110010010 622 | 000001101111 623 | 101110011100 624 | 101001001011 625 | 101111011010 626 | 101001010110 627 | 110001101111 628 | 110110010111 629 | 010111110111 630 | 001100101011 631 | 001111100000 632 | 011010001110 633 | 100011111100 634 | 001001111101 635 | 100101010100 636 | 011101110011 637 | 110111100001 638 | 001000100100 639 | 011001000011 640 | 101010011101 641 | 001100100000 642 | 011001010100 643 | 111111111010 644 | 010111111101 645 | 001010001100 646 | 111111111000 647 | 010101111100 648 | 000111001101 649 | 110101000000 650 | 010010011000 651 | 010001010100 652 | 010001110000 653 | 011110110000 654 | 000011111101 655 | 101101110001 656 | 101101001010 657 | 110000000000 658 | 100100111101 659 | 111110111001 660 | 010000111000 661 | 110100001100 662 | 011111110110 663 | 001100001010 664 | 100011101010 665 | 001001100101 666 | 101011001101 667 | 101101100100 668 | 010111010001 669 | 001000001110 670 | 110111110101 671 | 101110101011 672 | 100110000101 673 | 110011000111 674 | 100110011110 675 | 100100110100 676 | 101111011001 677 | 011001110010 678 | 101000010110 679 | 000101010011 680 | 100111001110 681 | 111000011111 682 | 110011100011 683 | 000100001011 684 | 011100100010 685 | 000001010010 686 | 010110001001 687 | 101111011110 688 | 010011100110 689 | 111001000011 690 | 100011001010 691 | 100101011110 692 | 010110111111 693 | 000001100101 694 | 110111111101 695 | 011110011010 696 | 111111010110 697 | 011110111110 698 | 100000000111 699 | 101000111110 700 | 000001011111 701 | 111000100110 702 | 100101000000 703 | 001000100010 704 | 111010001111 705 | 111011101010 706 | 101110100101 707 | 000010110011 708 | 100100110011 709 | 110001100101 710 | 000101010110 711 | 100100100110 712 | 100110111100 713 | 001011010100 714 | 011101011001 715 | 010110101011 716 | 000010101010 717 | 100100010001 718 | 110001100111 719 | 101101101000 720 | 101110100000 721 | 111100110000 722 | 000111100110 723 | 110001000011 724 | 000111000110 725 | 100011100110 726 | 111011011101 727 | 101100000000 728 | 001011110000 729 | 101010101110 730 | 001110110010 731 | 110010111101 732 | 111011001100 733 | 011100001001 734 | 001101111100 735 | 111110111011 736 | 000011100001 737 | 011001011010 738 | 111101101101 739 | 111010001000 740 | 010000000001 741 | 001000010001 742 | 101110011001 743 | 111000000000 744 | 010011110100 745 | 011111011001 746 | 010011100010 747 | 100010011010 748 | 010100001110 749 | 110111100101 750 | 000111111100 751 | 000001011010 752 | 010100111100 753 | 100000001000 754 | 101100111001 755 | 001100010001 756 | 001000001111 757 | 001011010010 758 | 100110000000 759 | 101010010010 760 | 111101100001 761 | 010001000011 762 | 111111000010 763 | 111111101001 764 | 001110100010 765 | 101000101000 766 | 101001000100 767 | 111100101101 768 | 010100110111 769 | 000010010101 770 | 110010110101 771 | 001101111010 772 | 001000011110 773 | 101000010001 774 | 001100001011 775 | 001100000100 776 | 000110100011 777 | 001100001101 778 | 111111001001 779 | 100011100010 780 | 000101011011 781 | 000001010101 782 | 110110101001 783 | 001100010000 784 | 101111000000 785 | 100001010100 786 | 101101010010 787 | 110110111010 788 | 011011001010 789 | 100100011011 790 | 101111110101 791 | 001101110100 792 | 111100110100 793 | 000011011101 794 | 100100100100 795 | 001111011100 796 | 001011110010 797 | 000000011000 798 | 100011100000 799 | 111011011111 800 | 000101101000 801 | 100010010011 802 | 000011110001 803 | 000111101111 804 | 010111001011 805 | 110011101111 806 | 100001001111 807 | 111101001110 808 | 011001011110 809 | 010010111010 810 | 101011101100 811 | 010101000011 812 | 001111100001 813 | 110000011010 814 | 110011100100 815 | 000011001100 816 | 000100010101 817 | 011111101000 818 | 000001101010 819 | 001001010011 820 | 001000011001 821 | 001110011111 822 | 011101111100 823 | 011000100100 824 | 010011001101 825 | 111111010000 826 | 010010100000 827 | 010011110010 828 | 011100111110 829 | 100001110011 830 | 100000000011 831 | 101011111011 832 | 100000110110 833 | 111010011101 834 | 101111110000 835 | 110000001001 836 | 000111000011 837 | 100001001101 838 | 100110001001 839 | 000100011000 840 | 001111000001 841 | 011110100001 842 | 111111111101 843 | 010000100101 844 | 101011110101 845 | 100101100010 846 | 010001101101 847 | 011011110000 848 | 011011000010 849 | 101101111000 850 | 110010111110 851 | 110001011110 852 | 010001110011 853 | 100100100000 854 | 101010010001 855 | 100000111111 856 | 111110011011 857 | 001000100101 858 | 000111100010 859 | 110111011101 860 | 101011011010 861 | 000000000001 862 | 110010011001 863 | 001010011001 864 | 100111010101 865 | 001110110111 866 | 110110000110 867 | 101011111101 868 | 100101001110 869 | 011110010111 870 | 110111010110 871 | 011011000111 872 | 011100011000 873 | 101100011010 874 | 101111110011 875 | 011110101100 876 | 100001101100 877 | 011010110100 878 | 111100011110 879 | 011110011101 880 | 100010110110 881 | 010000111100 882 | 001101010100 883 | 000101110011 884 | 101101100010 885 | 110011110111 886 | 010001001100 887 | 100111010001 888 | 000000000111 889 | 010101111110 890 | 000101101111 891 | 000011101111 892 | 000001110011 893 | 000101000010 894 | 110101011111 895 | 001001011010 896 | 100101000010 897 | 110100011101 898 | 001001010000 899 | 101011100000 900 | 111010110010 901 | 010001100000 902 | 100100111100 903 | 110000000101 904 | 101101001001 905 | 111010001101 906 | 011011010111 907 | 101110110001 908 | 001110010011 909 | 011111001000 910 | 011111010011 911 | 001110000010 912 | 110110111111 913 | 011011001011 914 | 110110001101 915 | 101010110101 916 | 100111110100 917 | 100000111001 918 | 011001111111 919 | 110010011111 920 | 110110100110 921 | 001111111100 922 | 001110011000 923 | 100010111000 924 | 000010101000 925 | 000110101111 926 | 011100111100 927 | 010001101111 928 | 100011100011 929 | 100100111110 930 | 010100011101 931 | 101100101101 932 | 001111101000 933 | 111110101001 934 | 110100000010 935 | 001010101111 936 | 011001110001 937 | 010110111000 938 | 001100011100 939 | 011010010111 940 | 010010001100 941 | 110101010111 942 | 111000001111 943 | 111100000100 944 | 011010101111 945 | 110101111100 946 | 111101011111 947 | 000110000111 948 | 011110110010 949 | 111110010010 950 | 001011100111 951 | 110010000001 952 | 111111110100 953 | 101001011010 954 | 000100011110 955 | 011100100111 956 | 110000001100 957 | 001010001010 958 | 110011100001 959 | 110001011011 960 | 110010010100 961 | 101011100100 962 | 110111101110 963 | 011100100100 964 | 011100100011 965 | 100111011000 966 | 010100000011 967 | 001111100111 968 | 000110000100 969 | 101100100001 970 | 111101110010 971 | 101110101100 972 | 010001100011 973 | 110101010001 974 | 111101101110 975 | 000111100111 976 | 000011110110 977 | 011010000001 978 | 111110100110 979 | 000100011100 980 | 011111100001 981 | 101111110110 982 | 100111000010 983 | 000110100001 984 | 011001101010 985 | 110110110011 986 | 110000111110 987 | 001100101010 988 | 100101001101 989 | 001001101100 990 | 100101011111 991 | 101111001011 992 | 111101000000 993 | 010110010100 994 | 011111001110 995 | 011111111111 996 | 101100001110 997 | 101011100110 998 | 111001100001 999 | 111101011101 1000 | 001100111110 --------------------------------------------------------------------------------