We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 276ab0b commit fb08780Copy full SHA for fb08780
content/data-structures/RMQ.h
@@ -19,7 +19,7 @@ struct RMQ {
19
20
RMQ(const vector<T>& V) {
21
int N = sz(V), on = 1, depth = 1;
22
- while (on < sz(V)) on *= 2, depth++;
+ while (on < N) on *= 2, depth++;
23
jmp.assign(depth, V);
24
rep(i,0,depth-1) rep(j,0,N)
25
jmp[i+1][j] = min(jmp[i][j],
0 commit comments