Quest 3: The Deepest Fit

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

Link to participate: https://everybody.codes/

Also, don’t wait for me to make these posts, feel free to post yourself :)

  • Quant
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    Uiua

    I’m currently going through the 2025 Quests to learn Rust, committing great sins along the way.
    Decided to take a shot at the third one with Uiua because it looked nice and simple, and it was. This may have been the fastest I’ve ever finished a complete quest :P

    Run with example input

    Code
    I₁   ← "10,5,1,10,3,8,5,2,2"
    I₂   ← "4,51,13,64,57,51,82,57,16,88,89,48,32,49,49,2,84,65,49,43,9,13,2,3,75,72,63,48,61,14,40,77"
    I₃   ← "4,51,13,64,57,51,82,57,16,88,89,48,32,49,49,2,84,65,49,43,9,13,2,3,75,72,63,48,61,14,40,77"
    Prep ← ⊏⊸⍖⊜⋕⊸≠@,
    P₁   ← /+◴ Prep
    P₂   ← /+↙₋₂₀◴ Prep
    P₃   ← +₁/↥⧆ Prep
    ⍚$"Part _: _" 1_2_3 [P₁I₁ P₂I₂ P₃I₃]
    &pf /$$ _
         $$ _