Skip to content

Commit 63996c4

Browse files
committed
update
1 parent 98039c0 commit 63996c4

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

tests/library_checker_aizu_tests/data_structures/deque_op.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int main() {
5252
assert(stl_dq.front() == dq.front());
5353
assert(stl_dq.back() == dq.back());
5454
for (int index_tests = 10; index_tests--;) {
55-
int idx = rnd<int>(0, dq.siz() - 1);
55+
int idx = rnd(0, dq.siz() - 1);
5656
assert(stl_dq[idx] == dq[idx]);
5757
}
5858
}

tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ int main() {
1616
adj_edge_id[u].emplace_back(v, i);
1717
}
1818
scc_asserts(adj);
19-
sccs scc(adj);
19+
auto [num_sccs, scc_id] = sccs(adj);
2020
vector<int> color(n);
2121
vector<
2222
pair<int /*edge id*/, int /*node closer to root*/>>
@@ -35,7 +35,7 @@ int main() {
3535
auto [curr_edge_id, curr_node] =
3636
edge_stack.back();
3737
edge_stack.pop_back();
38-
assert(scc.scc_id[curr_node] == scc.scc_id[u]);
38+
assert(scc_id[curr_node] == scc_id[u]);
3939
res.push_back(curr_edge_id);
4040
if (curr_node == v) break;
4141
}
@@ -53,7 +53,7 @@ int main() {
5353
color[i] = 2;
5454
}
5555
}
56-
assert(scc.num_sccs == n);
56+
assert(num_sccs == n);
5757
cout << -1 << '\n';
5858
return 0;
5959
}

tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int main() {
3131
assert(fib(5)[0] == 5);
3232
for (int i = 0; i < 500; i++) check(i);
3333
for (int tests = 1000; tests--;)
34-
check(rnd<int64_t>(0, LLONG_MAX));
34+
check(rnd(0LL, LLONG_MAX));
3535
cout << "Hello World\n";
3636
return 0;
3737
}

tests/library_checker_aizu_tests/handmade_tests/mod_int.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ int main() {
1616
for (int i = 0; i < 1'000'000; i++) {
1717
int type = rnd(0, 5);
1818
if (type == 0) {
19-
mod = mods[rnd<int>(0, sz(mods) - 1)];
19+
mod = mods[rnd(0, int(sz(mods)) - 1)];
2020
val = rnd(-mod + 1, mod - 1);
2121
assert(0 <= val.x && val.x < mod);
2222
} else if (type == 1) {

tests/library_checker_aizu_tests/mono_st_asserts.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ void mono_st_asserts(const vector<int>& a) {
6969
assert(iterations == n);
7070
}
7171
{
72-
vector old_way_ri =
73-
mono_st<int>({rbegin(a), rend(a)},
74-
[&](int x, int y) { return !cmp(y, x); });
72+
vector old_way_ri = mono_st(vi{rbegin(a), rend(a)},
73+
[&](int x, int y) { return !cmp(y, x); });
7574
reverse(begin(old_way_ri), end(old_way_ri));
7675
transform(begin(old_way_ri), end(old_way_ri),
7776
begin(old_way_ri),

tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ int main() {
1212
// test `*_cmp` functions
1313
{
1414
for (int num_tests = 50; num_tests--;) {
15-
auto l = rnd<int>(0, sz(s) - 1);
16-
auto r = rnd<int>(0, sz(s) - 1);
15+
auto l = rnd(0, int(sz(s)) - 1);
16+
auto r = rnd(0, int(sz(s)) - 1);
1717
int cmp_val = lq.cmp_sufs(l, r);
1818
if (cmp_val < 0) assert(s.substr(l) < s.substr(r));
1919
if (cmp_val == 0) assert(s.substr(l) == s.substr(r));
2020
if (cmp_val > 0) assert(s.substr(l) > s.substr(r));
2121
}
2222
for (int num_tests = 50; num_tests--;) {
23-
auto l1 = rnd<int>(0, sz(s));
24-
auto r1 = rnd<int>(0, sz(s));
23+
auto l1 = rnd(0, int(sz(s)));
24+
auto r1 = rnd(0, int(sz(s)));
2525
if (l1 > r1) swap(l1, r1);
2626
if (l1 == sz(s)) l1--;
2727
int l2, r2;
2828
if (rnd(0, 20) == 0) {
2929
l2 = l1;
3030
r2 = r1;
3131
} else {
32-
l2 = rnd<int>(0, sz(s));
33-
r2 = rnd<int>(0, sz(s));
32+
l2 = rnd(0, int(sz(s)));
33+
r2 = rnd(0, int(sz(s)));
3434
if (l2 > r2) swap(l2, r2);
3535
if (l2 == sz(s)) l2--;
3636
}

tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int main() {
4949
for (int num_tests = 10; num_tests--;) {
5050
vector<int> splits = {0, int(sz(t))};
5151
for (int num_splits = rnd(0, 4); num_splits--;)
52-
splits.push_back(rnd<int>(0, sz(t) - 1));
52+
splits.push_back(rnd(0, int(sz(t)) - 1));
5353
sort(begin(splits), end(splits));
5454
vector<pair<int, int>> subs;
5555
for (int i = 1; i < sz(splits); i++)

0 commit comments

Comments
 (0)