We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d282ec7 commit d090096Copy full SHA for d090096
library/strings/suffix_array/suffix_array_short.hpp
@@ -23,8 +23,9 @@ auto sa_short(const auto& s) {
23
int a = i1 + j * k < n ? x[i1 + j * k] : -1;
24
int b = i2 + j * k < n ? x[i2 + j * k] : -1;
25
if (a != b) {
26
- if (a != -1) assert(a<n-1),val += y[a];
27
- else val = n - i1;
+ if (a != -1) {
+ if(a<n-1)val += y[a];
28
+ } else val = n - i1;
29
return a < b;
30
}
31
val += j;
0 commit comments