ICPC Notebook

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

View the Project on GitHub hayatroid/ICPC_notebook

:heavy_check_mark: test/data_structure/DSU.test.py

Depends on

Code

# verification-helper: PROBLEM https://judge.yosupo.jp/problem/unionfind
from src.data_structure.DSU import DSU


N, Q = map(int, input().split())
dsu = DSU(N)
for _ in range(Q):
    t, u, v = map(int, input().split())
    if t == 0:
        dsu.unite(u, v)
    else:
        print(int(dsu.same(u, v)))
Traceback (most recent call last):
  File "/home/runner/work/ICPC_notebook/ICPC_notebook/.venv/lib/pypy3.11/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 "/home/runner/work/ICPC_notebook/ICPC_notebook/.venv/lib/pypy3.11/site-packages/onlinejudge_verify/languages/python.py", line 96, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page