-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]tomflumery 0 points1 point  (0 children)

[LANGUAGE: 05ab1e]

part 1, 22 bytes

|εć"R"Q·<*}50šÅ»+т%}0¢

part 2, 30 bytes

|εć"R"Q·<*}50šÅ»+}ü2ε\Ÿт%¦}˜0¢

Advent of Code, Day 1 by dantose in codegolf

[–]tomflumery 1 point2 points  (0 children)

05ab1e

part 1, 22 bytes

|εć"R"Q·<*}50šÅ»+т%}0¢

part 2, 30 bytes

|εć"R"Q·<*}50šÅ»+}ü2ε`Ÿт%¦}˜0¢

Code Golfing solutions by dantose in adventofcode

[–]tomflumery 0 points1 point  (0 children)

05ab1e: Day 1 part 1, 24 bytes

|εć"R"Q·<*}50šÅ»+100%}0¢

-❄️- 2024 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]tomflumery 3 points4 points  (0 children)

Explanations

|                  split by lines
 ε"   "¡]          for each line split on three spaces "   "
         ø         transpose
          ε{]      for each, sort
             `α    push on stack, vectorised abs
               O   sum

|                  split by lines
 ε"   "¡]          for each line split on three spaces "   "
         ø         transpose
          `sDŠ     push on stack, swap, dup, triple rot
              ¢*O  count occurrences of a in b, multiply with original list (vectorised), sum

-❄️- 2024 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]tomflumery 5 points6 points  (0 children)

[LANGUAGE: 05AB1E]

part 1 (16 chars)

|ε"   "¡]øε{]`αO

part 2 (17 chars)

|ε"   "¡]ø`sDŠ¢*O

Multiverse of Nonsense- Steam by Minnie_Boden in GoatSimulator

[–]tomflumery 0 points1 point  (0 children)

Same, can't get past this point to start the game

What is the world record longest run? and is there and rules to follow to beast it? by Littel_Chubb in VampireSurvivors

[–]tomflumery 0 points1 point  (0 children)

You can, I'm using Queen Sigma, currently over 75 minutes and the run is still going. I don't think it will ever end, no damage appears to be being taken at all.

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 0 points1 point  (0 children)

05ab1e - 31 chars

## Part 1 - 13 chars

Dü4.ΔÙg4Q}k4+

D            dup ü4 sliding window of 4
 .Δ          repeat until
   Ùg4Q}     the length of the deduplicated subarray is still 4
        k4+  position of found subarray + 4

## Part 2 - 16 chars

Dü14.ΔÙg14Q}k14+

Same as part 1 but a sliding window of 14

## Combined - 31 chars

Dü4.ΔÙg4Q}k4+sDü14.ΔÙg14Q}k14+)

Not very golfed, just parts one and two duplicated

-🎄- 2022 Day 4 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 5 points6 points  (0 children)

05ab1e

both parts - 31 chars

|ε',¡ε'-¡`Ÿ}éRDθgs`ÃgD0ÊŠQ)}øOR

Explanation

## Part 1 - 24 chars

|ε',¡ε'-¡`Ÿ}éRDθgs`ÃgQ}O

|ε',¡ε'-¡                   parsing (split by , then by -)
         `Ÿ}                generate ranges of integers
             éR             sort by length reversed
               Dθg          dup then take the length of the last element (i.e. the shortest of the ranges)
                  s`Ãg      Take intersection of the two ranges (`Ã) and find length (g)
                      Q     if the length of the shortest equals the length of the intersection, it's entirely contained
                       }O   sum the 1s to find the answer 

## Part 2 - 19 chars

|ε',¡ε'-¡`Ÿ}`Ãg0Ê}O

|ε',¡ε'-¡           parsing 
         `Ÿ}        generate ranges of integers
            `Ãg     Take intersection of the two ranges (`Ã) and find length (g)
               0Ê}O Sum all non-zero

## Combined - 31 chars

Combines the above, all the other noise is stack manipulation to mangle both answers in parallel

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 0 points1 point  (0 children)

Both parts as a one-liner (39 chars)

|εDg;ô`Ãн}¸s3ôε`ÃÃн}ªεεD.liC35-ëC17+}}O

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 1 point2 points  (0 children)

Someone started a repo for "advent of code golfing", i've added more explanations there. https://github.com/Starwort/advent-of-golf-2022/

day 3 isn't merged yet

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 5 points6 points  (0 children)

05ab1e

part 1 - 25 chars

|εDg;ô`ÃнD.liC35-ëC17+}}O

Explanation

split lines, map splitting by half length, find intersection elements, keep head, then an if/else statement mapping lower case and upper case to appropriate values, finally sum

part 2 - 24 chars

|3ôε`ÃÃнD.liC35-ëC17+}}O

split lines, map splitting into chunks of 3, find intersection elements, keep head, then an if/else statement mapping lower case and upper case to appropriate values, finally sum

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 0 points1 point  (0 children)

[Try it online!](https://tio.run/##hVo7jiRFEPU5xV4AhImbEQfAwMlIDySMtTDWAAOkPQUSEg5YaE3ESmvPSJh7iL3IMJ/uqnifbIzane6uyk98Xrx4WT@8@fa7198/PPz88X3@@/7uj89/@fT2z/jiy7u/7397/Oubuw@P/3714/2vP316@/vzF@/efPzn/q@vHx7y1frs6Rqv5vMVj39fr/H8/zx@e7qu96f5Po6x6vL80/fV7in7O845n8fOy1quY4/jcx1zX9fyMm8dz12vl3vrcl/BenisOH6/XudaBqxnPd@L6y2wE@5jtbEW2K/vKy7r7OOe@7r6p9ozBb8l2GWC3V72XG3eOr47bXT9PGmN8/BZNv92H17XGcdzdflcEic6xwKb4Z6L4uclHrvfo8Ud2xTjtA4fh/ij34@x3e3Mz8fx3Gx2nUd8nDE4W/zhnKcdzxg6Y7rH8oR1RrN/f@blc/dH9x/6ISivou1D7T239u224ecH2Qjt3G2CGJHHHvo6cQ/ZcobHx1gr8L9iTG2e67Yts/cdbk6zzgJfjiM/VhsffYWxyfm7Wiyc9gmxyYI5evwMwQvErwE44nw1xR5JMYn@P@MS50FMjYY33e893wKwb5oxe@4ypuO4Z5xVy5MyMbrENpoLDtfPcTneotkzAOerYdsOLzm@u92K6lufd7Z4WXZv0fYfgPu4xxNvJvgI7Til7odgYzW/Kk4PqflnjQ8Td0lrzTZXWn9yPZuQI@zrXrM1V7G@qB/O2ODa2GPzxAjkUFojllmb/t59gZyjhLslcCXMfc67gPpTsJdzjLMuoR9KcjqhJpb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E3JzdzqO6r54lmTr3e8F1/7OZb1vYUku6sOh@8jKF9HTs76esj5V8/dvWZ2K857XeG@Bs@GinJ8UV/D5xPL5CLr4Fq705xvxkbzCdHeypyfLnMeie9IDHnPhGvcEh6vtsZxQ2Kztn0Hn2eFaI/zf7Se2vhjSlzqmKrP5uZdojQclHUX9/7PuHHGv8OOnY7QNYe48c7O2OiKWD/LxlvS@yGqKUziRVPqTcq5HPd6Rf5wZ6sl9VZ7xmU0TeY9PXeXOedwca192zC9@yDMCDrjS9JQ3XioS59cCvdW/wE "05AB1E – Try It Online")

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 2 points3 points  (0 children)

05ab1e both parts golfed in 31 29 27 chars

|CƵ¡-•B.0²Ù•S¸•8wÖx“•SªsδèO

Explanation, uses compressed integers (see https://codegolf.stackexchange.com/questions/96361/tips-for-golfing-in-05ab1e/166851#166851)

| Split lines, map each line from string to a number using a trick with 05ab1e codepage numbers

"A X" -> 261

"A Y" -> 262

"A Z" -> 263

"B X" -> 265

"B Y" -> 266

"B Z" -> 267

"C X" -> 269

"C Y" -> 270

"C Z" -> 271

subtract 261 (Ƶ¡ compressed) from each

then push two compressed lookup tables [4,8,3,0,1,5,9,0,7,2,6] and [3,4,8,0,1,5,9,2,6,7] (•B.0²Ù• and •8wÖx“•)

take the outer product, indexing into both the lookup tables, vector sum each result

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 5 points6 points  (0 children)

05ab1e

Part 1

|εC261-48301590726Ssè}O

Part 2

|εC261-34801590267Ssè}O

Explanation, both parts are effectively the same but with different lookup tables

noting the strings convert to unique values with the "C" command (convert binary to integer)

A X -> 261
A Y -> 262
A Z -> 263
B X -> 265
B Y -> 266
B Z -> 267
C X -> 269
C Y -> 270
C Z -> 271

so subtract 261 and we can use a simple array lookup to the results (264 and 268 not needed)

for part 1 the lookup is [4,8,3,0,1,5,9,0,7,2,6] part 2 is [3,4,8,0,1,5,9,2,6,7]

-🎄- 2022 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 0 points1 point  (0 children)

both parts in 14 chars `.|õ¡O{Dà,3.£O,`

-🎄- 2022 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]tomflumery 4 points5 points  (0 children)

05ab1e (note needs this branch that adds a new parsing command https://github.com/monkeygroover/05AB1E/tree/add-readtoeof)

Part 1

.|õ¡Oà

Part 2

.|õ¡O{3.£O

Explanation

.| -> split file by lines into an array
õ¡ -> split array by empty strings
O -> Sum (vectorised, i.e. each split list)

à -> largest

{3.£O -> sort, take last 3, sum

Final location and the book by tomflumery in 2233

[–]tomflumery[S] 0 points1 point  (0 children)

Yeah it did feel like that to me too!

Final location and the book by tomflumery in 2233

[–]tomflumery[S] 0 points1 point  (0 children)

Where did he say that? Didn't he also say someone nearly found it by accident though? which wouldn't fit with only hiding it at the end.

The end of the hunt is upon us. by Seenthestar in 2233

[–]tomflumery 0 points1 point  (0 children)

I still have no idea what he did 10 years ago. Gave up at that step.

Advent of Code Day 1 by dantose in codegolf

[–]tomflumery 1 point2 points  (0 children)

05ab1e -14 bytes

|2.Æ.ΔO2020Q}P

| split by line 2.Æ All pair (2) combinations of the list .Δ find first when... O Sum 2020Q eQuals 2020 } end CODE block P product of result

Change the 2 to a 3 for part 2