Skip to content

Commit f7a6ac2

Browse files
committed
also use std::midpoint
1 parent 3b6a3ef commit f7a6ac2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/graphs/strongly_connected_components/offline_incremental_scc.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
//! @time O((n + m) log m)
1212
//! @space O(n + m)
1313
vi offline_incremental_scc(vector<array<int, 2>> eds,
14-
int n) {
14+
int n) {
1515
int m = sz(eds);
1616
vi ids(n, -1), joins(m, m), idx(m);
1717
iota(all(idx), 0);
1818
auto divide_and_conquer = [&](auto&& self, auto el,
19-
auto er, int tl, int tr) {
20-
int mid = tl + (tr - tl) / 2;
19+
auto er, int tl, int tr) {
20+
int mid = midpoint(tl, tr);
2121
vi vs;
2222
vector<vi> adj;
2323
for (auto it = el; it != er; it++) {

0 commit comments

Comments
 (0)