verify/AI/persistent_unionfind_test.nim

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

:heavy_check_mark: verify/AI/persistent_unionfind_test.nim

Depends on

Code

# verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/problems/ITP1_1_A
echo "Hello World"

import cplib/collections/persistent_unionfind

let uf0 = initPersistentUnionFind(4)
let uf1 = uf0.unite(0, 1)
let uf2 = uf1.unite(2, 3)
let uf3 = uf2.unite(1, 2)

assert uf0.count == 4
assert not uf0.issame(0, 1)
assert uf1.issame(0, 1)
assert not uf1.issame(0, 2)
assert uf2.siz(2) == 2
assert uf3.issame(0, 3)
assert uf3.siz(0) == 4
assert uf2.count == 2
assert uf3.count == 1
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.12/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/.local/lib/python3.12/site-packages/onlinejudge_verify/languages/nim.py", line 86, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page