We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f50a5f commit e4fabcbCopy full SHA for e4fabcb
1 file changed
library/monotonic_stack/monotonic_stack.hpp
@@ -7,7 +7,7 @@
7
//! a[le[i]] < a[i]
8
//! @time O(n)
9
//! @space O(n)
10
-vi mono_st(const auto& a, auto cmp) {
+vi mono_st(const auto& a, const auto& cmp) {
11
vi l(sz(a));
12
rep(i, 0, sz(a)) for (l[i] = i - 1;
13
l[i] >= 0 && !cmp(a[l[i]], a[i]);) l[i] = l[l[i]];
0 commit comments