diff --git a/2023/day_11.txt b/2023/day_11.txt new file mode 100644 index 0000000..794d39e --- /dev/null +++ b/2023/day_11.txt @@ -0,0 +1,140 @@ +.....................#......#...................#...............#........................................#.................................. +...........................................................#.............................................................#.................. +.....................................................................#.........#......#...........#.............#........................... +.....................................................#.......................................#.............................................. +......#.................................#..........................................................................................#........ +....................#.........#.............................................................................#............................... +..#.........................................................#.............................................................................#. +........................................................................................#...........#..................#.................... +........#....................................#........................#.........................................................#........... +..............................................................................#................................#............................ +..................................................#............#............................................................................ +.........................#......#........#................................................#..........................................#...... +......#..............................................................................#...............#...................................... +...................................................................#........................................................................ +....................#...........................#............................................................#..............#.....#......... +..................................#....................#.........................................#......#..............................#.... +.#.......................................................................................................................................... +........#.....#........................#...........#.............#.....................#.................................................... +..........................#.................................#.....................#......................................................... +.............................................................................................................................#.............# +...................................#......................................................#....................#............................ +.....................#...................#............#..................#.............................................#...........#........ +..............................................................................................#............................................. +....#..........#...............#..........................................................................#................................. +.............................................#.............................................................................................. +...................................................................#..............#.................................#....................... +..................#........................................................#................................................................ +..#.................................#...................#..............................#.........................................#.......#.. +...............................................................#...............#.....................#..........#.........#................. +.........#......................#.............................................................#............................................. +..............#...............................#............................................................................................. +........................................#.................................#............................................................#.... +..............................................................................................................#......#......#............... +.........................#..........#.............................................#........#................................................ +....................................................................#.....................................#................................. +....#...............#........#...............................#........................#........................................#............ +........................................................#................................................................................... +............................................#...........................#......................#.....#...................................... +.........................................................................................#.............................................#.... +...........#....................#..................................#.................................................#...........#.......... +.#.......................................................................................................................................... +................#........................#..........#....................................................................................... +........................#........................................................................................#.......................... +........................................................................#.........#...................#...................#................. +........................................................#......................................................................#............ +.....#.....................................................................................#................................................ +...............#...................................#.................#..............................................................#....... +.........#..................#..................................#..................................................#......................... +......................................#.......#....................................#......................................................#. +..........................................................................................................#......................#.......... +...#..............#.......................#.....................................................#........................................... +................................#...............................................#..........#................................................ +..........................#......................#......................#................................................................... +..................................................................#................................#........................................ +......................................................#.................................#.........................#...................#..... +..............#..........................#..................................................................................#............... +......#......................#.................................................................#...........#................................ +.............................................................................#.............................................................. +.......................#..........................#......................................................................#..........#....... +.#.................................#................................................................#....................................#.. +........#......#................................................#...............................................#........................... +..........................................................................#.....#.........................#...........#.....#............... +............................#..............#..........#....................................#................................................ +............................................................................................................................................ +............#..........#.................................................................................................................... +............................................................#.......................#..............#........................................ +.....................................#...............................#...................................#.................................. +.........#.....................................................................#.....................................#...............#.....# +#.............#............................................................................................................................. +......................................................#....................................#....................................#........... +...................................................................#............................................#........................... +............................................................................................................................................ +....................#............................#................................................#......................................#.. +.............................#...................................................#.......................................................... +.........................................................................#...............#.................#................................ +.............#.........#.........#.....#......................#............................................................#................ +............................................................................................................................................ +.............................................#..........#.....................#..................................#.......................... +............................................................................................................................................ +...................................#.............#................#.....#.....................................................#............. +....#.....................#..................................#.............................................................................. +............................................................................................................................................ +#.....................................#...................................................................................#................. +...............................................#......................#.....#...................................#........................... +.........#...................#.....................................................#.................#...................................... +.......................#...............................#........................................#..............................#............ +...#.....................................#..................................................................#............................... +...................................................#......................................#...........................................#..... +.................#.......................................................................................................................... +...................................................................................................................#......#................. +.................................#..............#.....#......................#.................#.........#.................................. +#....................................................................#........................................#...........................#. +............................................................................................................................................ +.........................#.................................................................................................................. +...............................#.......................................................................................#.................... +..........#...................................#..................#.....................#....................#............................... +............................................................................#.....#......................................................... +....#............#............................................................................#.......#..........#.......................... +..................................................................................................................................#......... +...................................#...........................................#............................................................ +.............................#..........................#.................................#........#........................................ +..............#....................................................#........................................#.............#...........#..... +...............................................#.............#.......................................................#...................... +........#..............................................................#.................................................................... +.......................................................................................#........#........................................... +......................#........#.........................#..................#........................#......................#............... +.#.........#.....#..............................................#........................................................................#.. +.....................................................#...................................................................................... +.........................................#...........................#..............................................#....................... +.............................................................#................................................#................#............ +......#.......................................#.......................................#...............#..................................... +....................#.......#............................#................#...........................................................#..... +...........#.....................................................................................................#.......................... +..........................................................................................#..............#.................................. +..................................................#..........................................................................#.............. +...............#............................................#.....................................................................#......... +........................#...........................................#............................#..................#....................... +................................................................................#..............................#.......................#.... +......................................#...................................#..............#..............#................................... +..#............................................#..............#...........................................................#................. +.........#........................#...................#..................................................................................... +.............................#.............................................................................................................. +....................................................................................#....................................................... +.........................#.............#............................................................#......#......#.........#......#........ +...................#...........................................................................#...........................................# +.......#...............................................#.....#........#..........#.......................................................... +..............#....................#........................................................................................................ +........................................................................................................#.................#...........#..... +..#...............................................................#.........#.......#....................................................... +.........#......................#..........................#.....................................#............#............................. +...................#.................................#.................................................................#.................... +....................................#....................................................................................................... +...........................#......................................................................................................#......... +............................................#.................#............#...................#.......#...................#................ +............#.....................................#......................................................................................... +...........................................................................................................#......#......................... +.....................................#..............................................#......#................................................ +.........................................................................#..............................................#................... +#....................#........#...................................................................#.....................................#... +.....#........................................#.........#........................#.......................................................... \ No newline at end of file diff --git a/2023/uiua/day_11.ua b/2023/uiua/day_11.ua new file mode 100644 index 0000000..222fec9 --- /dev/null +++ b/2023/uiua/day_11.ua @@ -0,0 +1,10 @@ +MappedIndices ← +⊃(\+×≡/×=@.)(⇡⧻): -1 + +Input ← &fras "../day_11.txt" +⊜∘≠, @\n Input # split on newlines +↯¯1_2⊞⊂ ∩(MappedIndices 1000000) ⊃∘⍉ # map indices +=@#▽≠@\n. Input # find galaxies +▽ # keep galaxies +↯¯1_2_2⊠⊟. # galaxy pairs +/+≡(/+⌵-°⊟) # distances +÷2 # account for reversed pairs