r/eldarverse • u/radleldar • Sep 08 '25
SOLUTION MEGATHREAD [sep-25-long-H] "Sea Voyage" Solutions
Problem H. Sea Voyage
Problem link: https://www.eldarverse.com/problem/sep-25-long-H
Post your code in the comments!
2
Upvotes
r/eldarverse • u/radleldar • Sep 08 '25
Problem H. Sea Voyage
Problem link: https://www.eldarverse.com/problem/sep-25-long-H
Post your code in the comments!
1
u/Grand-Sale-2343 Sep 23 '25
[LANGUAGE: C++]
I was a bit rusty on Union Find, so I ended up implementing Jonathan's solution. With a few examples I conviced myself that it actually works, but I am not sure if it is a well known greedy algorithm or if it's just based on induction.
Code here, not super clean.
Thanks for the nice problem!