Rosetta Problems
← yosupo に戻る
Unionfind with Potential
https://judge.yosupo.jp/problem/unionfind_with_potential