OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c993748
)
fix: gcc warning
author
abc1763613206
<abc1763613206@163.com>
Sun, 8 Sep 2019 12:20:33 +0000
(20:20 +0800)
committer
GitHub
<noreply@github.com>
Sun, 8 Sep 2019 12:20:33 +0000
(20:20 +0800)
docs/ds/sparse-table.md
patch
|
blob
|
history
diff --git
a/docs/ds/sparse-table.md
b/docs/ds/sparse-table.md
index
5436d8b
..
b245b99
100644
(file)
--- a/
docs/ds/sparse-table.md
+++ b/
docs/ds/sparse-table.md
@@
-72,7
+72,7
@@
inline int read() {
void pre() {
Logn[1] = 0;
Logn[2] = 1;
- for (int i = 3; i <
=
maxn; i++) {
+ for (int i = 3; i < maxn; i++) {
Logn[i] = Logn[i / 2] + 1;
}
}
@@
-86,7
+86,7
@@
int main() {
for (int i = 1; i <= m; i++) {
int x = read(), y = read();
int s = Logn[y - x + 1];
- printf("%d\n", max(f[x][s], f[y - (1 << s) + 1][s]));
+ printf("%
ll
d\n", max(f[x][s], f[y - (1 << s) + 1][s]));
}
return 0;
}