Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Advent of Code, Day 15, golfed!

by Jasper (Chaplain)
on Dec 19, 2021 at 04:39 UTC ( [id://11139715]=note: print w/replies, xml ) Need Help??


in reply to Re: Advent of Code, Day 15, golfed!
in thread Advent of Code, Day 15, golfed!

Combining that with another stroke saved by replacing the stupid ++$g, $g-1 stuff
push@a,/./g}{print$s{-1+map{$u{$_}||=$a[$_]+$s{$g}for grep$a[$_]*!$s{$_},$g+$.,$g-($g%$.>0),$g-$.*($g>=$.),$g+($g%$. <$.-1);($g)=sort{$u{$a}-$u{$b}}keys%u;$s{$g}=delete$u{$g}}@a}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139715]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-24 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found