Skip to content

Commit b13b49c

Browse files
committed
fix
1 parent 7b69b73 commit b13b49c

3 files changed

Lines changed: 7 additions & 44 deletions

File tree

library/math/count_paths/count_paths_triangle.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
vl divide_and_conquer(vl h, vl bottom) {
77
{
88
int start =
9-
find_if(all(h), [](ll x) { return x; }) - begin(h);
9+
ranges::find_if(h, [](ll x) { return x; }) - begin(h);
1010
h.erase(begin(h), begin(h) + start);
1111
bottom.erase(begin(bottom), begin(bottom) + start);
1212
}
@@ -15,10 +15,10 @@ vl divide_and_conquer(vl h, vl bottom) {
1515
if (n == 1) return vl(h[0], bottom[0]);
1616
int mid = n / 2;
1717
auto rect_left =
18-
divide_and_conquer(vl(begin(h), begin(h) + mid),
19-
vl(begin(bottom), begin(bottom) + mid));
18+
divide_and_conquer(vl(begin(h), begin(h) + mid),
19+
vl(begin(bottom), begin(bottom) + mid));
2020
auto [rect_right, rect_top] =
21-
get_right_and_top(rect_left, vl(mid + all(bottom)));
21+
get_right_and_top(rect_left, vl(mid + all(bottom)));
2222
vl h_right(mid + all(h));
2323
for (ll& hh : h_right) hh -= h[mid - 1];
2424
auto upper_right = divide_and_conquer(h_right, rect_top);

tests/library_checker_aizu_tests/data_structures/range_parallel_dsu.test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#define PROBLEM \
22
"https://judge.yosupo.jp/problem/range_parallel_unionfind"
3+
#undef _GLIBCXX_DEBUG
34
#include "../template.hpp"
45
#include "../../../library/data_structures/dsu/range_parallel_dsu.hpp"
56
#include "../../../library/data_structures/dsu/range_parallel_equivalence_classes.hpp"
@@ -22,13 +23,14 @@ int main() {
2223
x[u] = x[u] + x[v];
2324
};
2425
vector<array<int, 3>> queries;
26+
queries.reserve(q);
2527
for (int qq = 0; qq < q; qq++) {
2628
int k, a, b;
2729
cin >> k >> a >> b;
2830
dsu.join(a, b, k, f);
2931
queries.push_back({a, b, k});
3032
cout << ans.x << '\n';
31-
if (qq < 3 || abs(q - qq) <= 3 || qq % 100'000 == 0) {
33+
if (qq == 0 || qq == 1 || qq == 10 || qq == 1000 || qq == 100'000 || qq == q - 1) {
3234
auto uf = get_rp_dsu(queries, n);
3335
vector<mint> sums(n);
3436
mint offline_ans = 0;

tests/library_checker_aizu_tests/flow/dinic_lib_checker.test.cpp

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

0 commit comments

Comments
 (0)