diff --git a/Day14/Part1.js b/Day14/Part1.js new file mode 100644 index 0000000..3a620a8 --- /dev/null +++ b/Day14/Part1.js @@ -0,0 +1,8 @@ +import { readFileSync } from "fs"; +const t0 = performance.now(); + +const input = readFileSync("input.txt").toString(); +console.log(input); + +const t1 = performance.now(); +console.log(`Runtime: ${t1 - t0}ms`); diff --git a/Day14/input.txt b/Day14/input.txt new file mode 100644 index 0000000..bc4794e --- /dev/null +++ b/Day14/input.txt @@ -0,0 +1,100 @@ +#.....OO..O#.O.#O......#...#...#.O......OOO.....O#...OO##...#..#O..O...........O..#O....O......O..#. +#....O#..OO#..O.#O#O......O..#..#.O..#.....###....#.O.....#O#.##..##..............O..OO.#O.##OO.O.O. +OO..#.O.O....O..#..##.O..#.O..#O..#..#..#..O.O..#...O#.OO.O.#.....#..#.O..OO.#......#....#.O..#.#.#O +....#..#.#.O...O.........#...O...##.....O......#O#O.#O.............O..#O.....O.O.O..O#......#.O.#..O +#...O..#..#..#..OO......#.....O.OO...#...OO.O......#O.....OOOOO.##......#.#....OOO#...#.......O..... +.O.O...O.#.....O..##......##O#....O.##.#OO#...#OO..O..##...#....#..O.O.##......#..O.O#...........#.# +....#....#...OO....#..#.O...O...O.OO#O.OO..O...OO.O....#OO#.#....O....O..#...#.#.##.O...O.O..O..##.. +...OOO..#..##..O..O.#...#O......OOO....#.#.OO.#.#..#.##O...O.O....##OO..............O#.O..##.O#..OO. +##..#.......OOO..O....#.O...O.O......O#..O##.OO###..OO....O......#....##.O.....#O#O...#..O....#..... +#..OOO..#.O##O.......O..O....O...#.....#OO..#.......##.O...#....#.#..O.O.#O.....OOOO##..##O#O....O.. +#.O#..O.#..OO.O.#O.OO#O....OO.....#..O...#..........#....OO..O#O.#OO......#....OO...#....#O.O.O.##.. +#......#.#.#.##.#O#.O....OO....##.O.#..O..O..O...#O.........#.O#.#..#..#...#....#OO..#OO..#........# +...#..O.O.OOO#O#..OO......OO....#..##.....#O.....#.##.OOO#O#..#.....O....#......O.#.#O.O.O..OO.#.... +.#O..OO#O...#...#O..O#.OO....O..##..#..#...........#..OO#O.#..#...OO...O.#..#..O..##......OO....O..O +.O..O#O..#...#O#O#.#......#.#..O...............O..O.O#.O..........##..#.O.....OO#.OO.#....#.####.... +O..#.O#..O.O.O...#.#O.#.......O....OO.O.#.O.O....#O##.O.......##O..OO#O...##.##O#...........O#.O###. +.O..#O..#....#..O#O....OO#....O#........#.#.#...#......#..##...O.......#O.#.#O#.O...#O.#.OO.#....... +###O.......#.....O.O..#.#.....O.....#...#.#......#O.O.......##......##......OO.#.O..OO...O#......... +..O..O.OO#..OO#O##....O..OO...O.O..OO....#.O...#O.##..#.O........#....#OO#....#...O...O.##.#.#O#OO## +....#OO.O.....#.OO.#.#.#.#......OO......O...#.#.#....O..O#......#O.O#...O#.......#..O..O..O.##....OO +.OO#OOO.....O.OO...O...#....#OO........OOOOO..O..#...O#..O.....#..O#.#......#O.#..###.O.O..#.O.....# +O##.####O.##.OO..#..........O#.O...........#..O..........O...#.....O......#........O.#O.#O#O.O..O... +...#.OO..##.....##.O.##...O....O.##.....#.O..O.O.....O.....#....O..#.#..O..O....O....#O..#O..O..O... +...O#..OO#O..O...O.....#..#..#.O.O......O#......O.##.OO....O...#....#..O............O...OO#.O..O#.O. +O..O..O.#O....O#.##O..#..#.#.O.....####OO...O.##..O#..OO...OO.#O.......##..#.O.....O..O.#O...O..O..# +........#O..#O..O..#.#.....#..#...O.......O...#..OO.##.....O...O..O.#.....##.......#O.#O.#O...#O.#.. +......O...#O#OOO.##.##O..#...O....#O.......OO....#...OO....O...#..O...#O.....OO#O#O##..O..OOO.#..#.O +##O..O.O..O.........#O....OO.##O..O..#OO....O.......O#O#.O..O......#....O...#..O#....#.OO#..#....O.# +..O....#...........#.O.O.O...#.#....#.#.........O.#..O.#.#..O........#O....##..#O...O.O#...O.#...O.O +#....O............#....#..O.O......#....#.#O......#.OOO...#.O..O##...#.#..#...O..O..#..#....O...O... +........#..O#.......#O.O.........O.###..#...O#..O.....OO#O...O...OOO.#..........#.O.OO#...O......... +.#.....##.#.#O###.O...#.O##O.#..#..OO.....#.....#....#...O........#..##O.#...O.....O........O#.O.O.. +.O.O##...O..##O...#.........OO#O.#...#O.......O.....O#....O.O.....###...O.#..#....O........OO..O.... +#.##OO.O.....OOO.#...O......O....#..OO..#O..##...OO.....#.#...O.O#..#O##...OO..#....O#..#.O.#.#..OO. +.O........OO.##....O.#.#....#...O.O#..O...##....OO.O....O.##O..#.O....#O....O.....#..O..O.#...OOO..# +.OOOO..O#O..##......O##....#OO.#..#...#...OO#.........O.#...#..##..O...O.##.OO##..O.#.......#...#O.. +.O##......#...#O..OO.O.O.O.......O.#................OO.......O.OO....O......#..O..#....OO#.OO....O#. +....#OOO...#..O..#..OO..##...##...#...O.O...#.O..OO#O....#.....##OO...O.O....#.OO.O.#.#O..O.O#.#...# +OO...#OO.OO#...#.#....O.#.O...#.....OO..O.....#O..#....O.#.#...............O#..#...###.O.O..#......O +#O#.#.....##.O#....#O....O...O.#.OO#.OOO...OO.....OO...O....#.#O....OO..O..#OO#.O...O..#O.##...#.... +.#.#O#...OO.....#.O##.OO.....#O.#O....O#..O#..O...O....O#.O...#O........#..#OO...#...O.O.#O##....O.. +.O..#.O#O..O....O...#........O....O........OO..O.#..O..#...O.O.#.O.#.O...O........O..#.#.O#...#...#O +....O..O.##O#..O.....OO.O.......##.#....O.....O.OO....#.#..O....#...#O#O.#.#.O..O.#...##.#.O..O.O... +#..OO.OO.#...O##O#.O.#.OOO..#O.#.........OO.O..##.#..#..............OO#..##OOOO.O.#..#....#...#....O +..O..#.....##.#...OO..O.....OO.....O#.O.##.#...O.#O..#............##....##.....##..#.#.O...O#..OO..O +O.#..O.#.........#...OO....OO....#..#...OOO.O..OO.#...OO.......#.#.O..O..O....O.......#O..#O..O..O.. +#.O#...OO......#..OO#.....#..O....O#....#O...O....#...O...#.O.O..O.O..#O...O.O...OO.#O..#.O.......O# +#O........##..O...........O#.........#.O.......O...##..OOO..#...###O....#..#.#.#OO#...#O....O.O...O. +#......OO.........O......OO..#..OOO.#......#...O....#.O.#.....OO.#...O..O..........###.O...O......#O +####O..OO#....O#...#.O.......O.#...O.....O##....O.O#........#.....#O.#......O.#O....O.#.OO.O.O.#OO.# +..#.....#.....O...#..O......##.###...#..O...OO#O...O.#..OO...O#...#.....O..#....#O..OO.O#.....#...## +......O#O...O..O...#..O..O.O..#OO.O.#...O##..OOO.#.#.....O....##....#O...O.....OOO..#O.O..O#.OO.O#.# +.....O.....O.OO##...OO#....###..#..OO.#O.#.#..#.....#.....O......OO.#.#OO...##......#..O##.#..O#O... +...#O..#...O...O.O...#....O.#...O..O.O.......#.#O...O.O...O#.....#.O.#.......OO.#..O..O#.....O...... +......#.O#.............O...O..O#O...O#.O.#..O..O.O#....#.....O...#...#O.........##...OOO.OO.#.#....O +..O..#O...##.O.O......O##...####.#...#..O#....#...O.O.OO........#...O.#.#........#...O......#....O.O +..O..#O.OO...O..#...#O....O.....#O......#OO.....#...#..#....O..#..##O..O..##...........O.O##...####. +#.OO.O........O.....#O....O..#..##.##.O.....#..........#OO.O.O#O#.....#.O#..O...#O##.....#.#OO...... +#.....#....O##..O..OO..O...#..O.##.......#..O..O....#.OO..#..#...O..#..O.#.....O.O..#O#.....#....... +..O...O..O..#O#...........O.....O....OO.....O..OO...###O##..#.O..O..O..O.#.#OOO#O.O......#.O..#.#... +...O#O.O.#..#..........#..OO.###..#O##..O#..OOO....O.#.....##.O##..#...OO...#O....#....OO.O.#.#.#... +.O...#..O#O.O.OO....OOO....O#..OO.#O...O.O..#......O.O...##..#..#O.O.#OO...O.O##...........O#O...O.. +..#..#..##...OO#.....O#O.O#..O...O.##O.##...OOO.O.#O#O..O....O#....O..#...#.O##.....#.O.OOO..#.....# +.OO....##O..O#O.O..#.#....OO..O.#.......OOO#.O.......#O.O.O.O.#...O....O.O...##O...O..#OO#.....#...O +.......O.O.O#.OO.#.#OO...#.O#..#...O...#...#.#.....O.#O..OO........O#OO##..#.O.O.O#.O..OO#..#.O##... +...........O...#..#.OO.....O#.#.#...#O......O..OO..#.#...#.O.O.#.O...O.#.O.O..OO.............#.#O... +.#.O#..O.O.O.OOO.##.......#..O.O..O##...O......OOO.......#O#.O.##..#..O...#..#.O.#.O..O...OO#O#.#... +.........OO....O..#.......O..O.OOOO#O....O...O..O.O..#OOOO.O.OO.O...O.......#..O....#..O####..O...O. +O.O.............#..##O#..O..#..............##.O....#O....OOOO............O.#.#O.O....O.#.......O.O#. +....#O.O.#......#....O.O...#O#O#OO#.O.O.....O...O.#...O.OO#...OO#.OO............#....#..O....##.#... +#.O..O.O.O.O.............#.#...#....O..#OO.#........O.........O....#..#.O.O.#....#....#..#O..O...... +.#OO..O..O.O.O#...........#...OO.#.....O.O........O..O.....#.##.OO.O..O..........O...#.O...#..O..#O. +...#O#O#.......#.O..O.O.#....#..#..O.O.O..O#..O##........O.O.#....#.......#..O.O..O.#...O..O...#...# +OO.O...#..O.#...#O#......##.#O....O...O.......O.O.O......#...........O.O.#O#.........O...O#..O#.#O.. +O.OO.O.O.O.O..#..OO......OO....OO......OO....#.....O........O.#O.O##.O.O.O.#OO.O....OO..##O#...O.... +..O..OOO.O...#....O..O#.O...O..O.O#O..OO...#OO.#....#.#.#OO.....#...O..OO#OOO....O..OO.O.O.O#..#.O## +O....O............#.O...O...O.O.O.......#..O....#O..#..O#O...#........#....O...#O.##O.#.O.##O....O.. +.O.O....O..O..O..O..O..O.O.O.#....##...O.O.....O..##.O#.O.O.#.OOO.O........O#OO..OOO.#.#..O.....#O.# +OOOO..#.........O...O.....#O.O..#.O.#......O..OO.......#O.............O...#.#.O..#.#.......#.O...... +.....OO.O...OO.#O...O.#.#.O.#.#..O.O.....O.O.##O..#...O.#...##O.O##...#O#...#O..........O#....##.O.. +.#..#.....#.O..##O.O...O.#..#.#..###...........O..#.....O#.OOO#..#OO.#.##.O#.....OO..##O.#.O..#O...O +#....O...O...O#..O.O......##O...O....##....##.O#.O.....#..##.O#.O#.#...#O.###...#..OO.#O..O.OO....#. +..O.OO.#....O.#.OO....O......##.OO.....#.......#.#..O.O.O...O.........#O#..O.O....O....#O.O.O....### +.O...#......#OO.#.O#.O.#.O...O....OOO##O#.O##....#.O#..#O#......#.#.........OO....O.#....O.....O.... +.#..O.O..#O.#....OO....O.O.#.....OO.O#.O#...##O...O#............#.OO.....O...O....#.#O#...#..#.O#.O. +.#O.......O.O.#...O.......#..O..#O..O.##..O#.O#....O..O....O.O#...O..OO................#.OO..O.O.#O. +.....O.#...O.O.#...#...O.O.O.#......#.O.#.##.........#.#.#O.............#O#.....O.#....O..OO#......# +O....O..#.#...#O#.....O.O...#....O..#.O#....O....##.OO..##.....#.O.O...#O...O##....O#OO#...#O#O#.O.. +..O.#..#O.O...#......#...O.O..O...O......OO#...O...#OO.OO.#.O##..OOO....O..#...OO.O...#O#O..#OOO.#.. +.##....O.#..O#.#OO..#...O....#O...#..OO................O....O....O#.O.#.OO.O....#...OO.#.O#..#O#...# +.....#....#.OO..#O....#.#.....#..##.....O...#.O..O...............#O##....OO.#OO.OO.....O..O......##. +.##..##O..#......#O..O...OO....O.#.#OO..#.....O....#O.#.#.#..O...#O.#....#O.O.....#.#O.O..........O. +.......O##.O..##..##..O#....O.OOO.OO.#..##O...O#.#......#O.....O..#..#...#...#O..#.#..#..#....#..O.. +...#.O..O.#....O....O###....O#...#..#O..O...#.#..O.O.OO...O.##......#..##.OO#O..O.......O#.O...O.O.. +....O.O.O..#O...O.................OO.O.......O.OO.O#.OO..#.O.OOO.O.O....O...OOO....OO....OO#.#...O.O +OO.....O.#.##.#O..O.O...#.O.O#...O...O.OO....#..#..........O...##..#.....#.#O...#..O#..###...OO#..#. +....#O.....O..O..#.O##.#...###..O...O.O...O#..#.O.#O..#..O.#..O..#....#...#..O..O.O....#..#.....#... +#O.......#..O.O..#.....O#O..O..O.O..##..#....O.O#.#..#.O.#.OO..O...#O....O....O#O#..#.#O.O.....#...O +.O.###.O..#..#..#.......O.O....#..OO...##..O#O#O#.....O.##O.#..O.O.OO.#.O...OO...OO.O..OO.O..#...O#. +.O#OO.#.....O..#.O#.#O.O......O..###.#...#.......O#...#O.#..#..O.#.#......O.O..#O..#...#O..#O.OOO.#.