Skip to content

Commit 7f8d560

Browse files
committed
fix <
1 parent 6866990 commit 7f8d560

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/segtree.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class SegTreeBase {
6565
* @return S 値
6666
*/
6767
S get(int k) const {
68-
assert(0 <= k < n);
68+
assert(0 <= k && k < n);
6969
return data[sz + k];
7070
}
7171
/**
@@ -108,7 +108,7 @@ class SegTreeBase {
108108
* @param x 新しい値
109109
*/
110110
void set(int k, const S& x) {
111-
assert(0 <= k < n);
111+
assert(0 <= k && k < n);
112112
k += sz;
113113
data[k] = x;
114114
for (int i = 1; i <= height; i++) update(k >> i);

0 commit comments

Comments
 (0)