+/AoC

advent of code

git clone https://git.julia.blue/+/AoC

Julia RyanImplicit window sizef39f381

master
359 B9 linesraw
1&fras "input"
2⊜□⊸≠@\n      # split into lines
3L ← ±-@Q⊢    # convert "L"/"R" to -1/1
4≡(×⊓L⋕°⊂°□)  # multiply ^ and the number on each row
5\+⊂50        # prepend 50 and get prefix sums
6Z ← /+=0◿100 # count how many %100 == 0
7&s⊸Z
8R ← ⍜(⌵-)⇡₁ # generate ranges from pairs
9&s/+⧈(Z R)  # slide window of pairs across