Skip to content

Commit 3b6a3ef

Browse files
committed
speed up test
1 parent 530291c commit 3b6a3ef

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#define PROBLEM \
22
"https://judge.yosupo.jp/problem/incremental_scc"
3+
// to speed up test
4+
#undef _GLIBCXX_DEBUG
35
#include "../template.hpp"
46
#include "../../../kactl/content/data-structures/UnionFind.h"
5-
#include "../../../library/contest/random.hpp"
67
#include "../../../library/graphs/strongly_connected_components/offline_incremental_scc.hpp"
7-
#include "../../../library/graphs/strongly_connected_components/scc.hpp"
88
#include "../../../library/math/mod_int.hpp"
99
int main() {
1010
cin.tie(0)->sync_with_stdio(0);
@@ -17,11 +17,10 @@ int main() {
1717
auto joins = offline_incremental_scc(eds, n);
1818
// assert joins[i] == -1 for self-edges
1919
for (int t = 0; t < m; t++)
20-
if (eds[t][0] == eds[t][1]) assert(joins[t] == -1);
20+
assert((eds[t][0] == eds[t][1]) == (joins[t] == -1));
2121
vector<int> order(m);
2222
iota(all(order), 0);
23-
sort(all(order),
24-
[&](int i, int j) { return joins[i] < joins[j]; });
23+
ranges::sort(all(order), {}, [&](int i) { return joins[i]; });
2524
UF uf(n);
2625
mint sum = 0;
2726
for (int t = 0, it = 0; t < m; t++) {

0 commit comments

Comments
 (0)