cpl-python3

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub yaumu3/cpl-python3

:heavy_check_mark: test/yosupo/unionfind.test.py

Code

# verify-helper: PROBLEM https://judge.yosupo.jp/problem/unionfind
from cpl.data_structure.dsu import DSU


def main() -> None:
    N, _, *tuv = map(int, open(0).read().split())
    dsu = DSU(N)
    for t, u, v in zip(*[iter(tuv)] * 3):
        if t == 0:
            dsu.merge(u, v)
        else:
            print(int(dsu.same(u, v)))


if __name__ == "__main__":
    main()
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
  File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/onlinejudge_verify/languages/python.py", line 96, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page