This documentation is automatically generated by competitive-verifier/competitive-verifier
// competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/persistent_unionfind
#include "persistent_ds/persistent_union_find.hpp"
#include <iostream>
#include <vector>
int main(void) {
int n, q;
std::cin >> n >> q;
std::vector<persistent_union_find> ufs;
ufs.emplace_back(n);
while (q--) {
int t, k, u, v;
std::cin >> t >> k >> u >> v;
if (t == 0) {
ufs.emplace_back(ufs[k + 1].unite(u, v));
} else {
std::cout << ufs[k + 1].same(u, v) << '\n';
ufs.emplace_back();
}
}
return 0;
}
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/resolver.py", line 291, in resolve
bundled_code = language.bundle(path, basedir=basedir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 242, in bundle
bundler.update(path)
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 479, in update
self._resolve(pathlib.Path(included), included_from=path)
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 286, in _resolve
raise BundleErrorAt(path, -1, "no such header")
competitive_verifier.oj.verify.languages.cplusplus_bundle.BundleErrorAt: persistent_ds/persistent_union_find.hpp: line -1: no such header
| Env | Name | Status | Elapsed | Memory |
|---|---|---|---|---|
| g++ | conchon_filliatre_tle_00 |
|
509 ms | 261 MB |
| g++ | conchon_filliatre_tle_01 |
|
540 ms | 261 MB |
| g++ | example_00 |
|
2 ms | 4 MB |
| g++ | hand_00 |
|
2 ms | 4 MB |
| g++ | max_random_00 |
|
664 ms | 321 MB |
| g++ | max_random_01 |
|
621 ms | 322 MB |
| g++ | max_random_02 |
|
647 ms | 322 MB |
| g++ | max_random_03 |
|
639 ms | 322 MB |
| g++ | max_random_04 |
|
647 ms | 321 MB |
| g++ | random_00 |
|
460 ms | 214 MB |
| g++ | random_01 |
|
470 ms | 237 MB |
| g++ | random_02 |
|
315 ms | 106 MB |
| g++ | random_03 |
|
175 ms | 154 MB |
| g++ | random_04 |
|
174 ms | 34 MB |