Skip to content

Commit 78c3c5f

Browse files
lrvideckisweb-flow
andauthored
Remove dsu rollback (#187)
* remove dsu restorable - kactls is just better * [auto-verifier] verify commit 5245312 * update tests * [auto-verifier] verify commit 90480fa * remove --------- Co-authored-by: GitHub <noreply@github.com>
1 parent 78ebb2d commit 78c3c5f

File tree

8 files changed

+73
-348
lines changed

8 files changed

+73
-348
lines changed

.verify-helper/timestamps.remote.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
"tests/library_checker_aizu_tests/data_structures/distinct_query.test.cpp": "2026-01-18 11:15:41 +0000",
2121
"tests/library_checker_aizu_tests/data_structures/dsu.test.cpp": "2026-01-22 10:08:22 -0700",
2222
"tests/library_checker_aizu_tests/data_structures/dsu_bipartite.test.cpp": "2026-01-18 02:20:40 +0000",
23-
"tests/library_checker_aizu_tests/data_structures/dsu_restorable.test.cpp": "2026-01-18 02:20:40 +0000",
24-
"tests/library_checker_aizu_tests/data_structures/dsu_segtree_undo_trick.test.cpp": "2026-01-23 04:31:29 +0000",
2523
"tests/library_checker_aizu_tests/data_structures/implicit_seg_tree.test.cpp": "2026-01-18 11:15:41 +0000",
2624
"tests/library_checker_aizu_tests/data_structures/kd_bit_1d.test.cpp": "2026-02-19 18:06:52 -0700",
2725
"tests/library_checker_aizu_tests/data_structures/kruskal_tree_aizu.test.cpp": "2026-01-18 02:20:40 +0000",
@@ -39,7 +37,6 @@
3937
"tests/library_checker_aizu_tests/data_structures/persistent_queue_tree.test.cpp": "2026-01-18 11:15:41 +0000",
4038
"tests/library_checker_aizu_tests/data_structures/persistent_seg_tree.test.cpp": "2026-01-18 11:15:41 +0000",
4139
"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_sliding_window.test.cpp": "2026-01-18 02:20:40 +0000",
42-
"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_with_dsu.test.cpp": "2026-01-18 02:20:40 +0000",
4340
"tests/library_checker_aizu_tests/data_structures/range_parallel_dsu.test.cpp": "2026-01-22 10:08:22 -0700",
4441
"tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2026-01-18 11:15:41 +0000",
4542
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-01-18 11:15:41 +0000",
@@ -71,10 +68,9 @@
7168
"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2026-01-22 10:08:22 -0700",
7269
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-01-17 13:05:42 -0700",
7370
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-01-17 13:05:42 -0700",
74-
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-01-18 02:20:40 +0000",
71+
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-02-27 11:11:58 -0700",
7572
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-01-18 11:15:41 +0000",
7673
"tests/library_checker_aizu_tests/handmade_tests/dsu.test.cpp": "2026-01-22 10:08:22 -0700",
77-
"tests/library_checker_aizu_tests/handmade_tests/dsu_size.test.cpp": "2026-01-18 02:20:40 +0000",
7874
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2025-09-07 15:50:55 -0600",
7975
"tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2026-01-28 21:48:16 -0700",
8076
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2025-08-06 16:18:37 -0600",
@@ -90,6 +86,7 @@
9086
"tests/library_checker_aizu_tests/handmade_tests/sa_find_subarray.test.cpp": "2026-01-27 18:11:48 +0000",
9187
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp": "2026-01-23 04:31:29 +0000",
9288
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find_small.test.cpp": "2026-01-23 04:31:29 +0000",
89+
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_midpoint.test.cpp": "2026-02-27 11:11:58 -0700",
9390
"tests/library_checker_aizu_tests/loops/chooses.test.cpp": "2025-02-10 14:50:36 -0700",
9491
"tests/library_checker_aizu_tests/loops/quotients.test.cpp": "2024-11-17 14:04:03 -0600",
9592
"tests/library_checker_aizu_tests/loops/submasks.test.cpp": "2025-02-10 14:50:36 -0700",

library/dsu/dsu_restorable.hpp

Lines changed: 0 additions & 41 deletions
This file was deleted.

tests/library_checker_aizu_tests/data_structures/dsu_restorable.test.cpp

Lines changed: 0 additions & 39 deletions
This file was deleted.

tests/library_checker_aizu_tests/data_structures/dsu_segtree_undo_trick.test.cpp

Lines changed: 0 additions & 127 deletions
This file was deleted.

tests/library_checker_aizu_tests/data_structures/pq_ds_undo_with_dsu.test.cpp

Lines changed: 0 additions & 77 deletions
This file was deleted.

tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"https://judge.yosupo.jp/problem/two_edge_connected_components"
33
#include "../template.hpp"
44
#include "../../../library/graphs/uncommon/bridge_tree.hpp"
5-
#include "../../../library/dsu/dsu_restorable.hpp"
5+
#include "../../../library/dsu/dsu.hpp"
66
int main() {
77
cin.tie(0)->sync_with_stdio(0);
88
int n, m;
@@ -33,7 +33,7 @@ int main() {
3333
accumulate(begin(is_br), end(is_br), 0);
3434
assert(sum_deg % 2 == 0 && sum_deg / 2 == cnt_bridges);
3535
}
36-
dsu_restorable dsu(n);
36+
DSU dsu(n);
3737
int num_sets_dsu = n;
3838
for (int i = 0; i < m; i++) {
3939
if (!is_br[i]) {
@@ -45,12 +45,11 @@ int main() {
4545
for (int i = 0; i < m; i++) {
4646
if (is_br[i]) {
4747
auto [u, v] = edges[i];
48-
bool same_set = dsu.same_set(u, v);
49-
assert(!same_set);
48+
assert(dsu.f(u) != dsu.f(v));
5049
}
5150
}
5251
for (int i = 0; i < n; i++) {
53-
int par_of_cc = dsu.find(i);
52+
int par_of_cc = dsu.f(i);
5453
assert(br_id[i] == br_id[par_of_cc]);
5554
}
5655
for (int i = 0; i < m; i++) {

0 commit comments

Comments
 (0)