Skip to content

Commit 293713a

Browse files
Update examples due to API changes
1 parent 3fdff08 commit 293713a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/practice2_k_range_affine_range_sum.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ fn main() {
5050
for _ in 0..q {
5151
match input.next().unwrap().parse().unwrap() {
5252
0 => {
53-
let l = input.next().unwrap().parse().unwrap();
53+
let l: usize = input.next().unwrap().parse().unwrap();
5454
let r = input.next().unwrap().parse().unwrap();
5555
let b = input.next().unwrap().parse().unwrap();
5656
let c = input.next().unwrap().parse().unwrap();
57-
segtree.apply_range(l, r, (b, c));
57+
segtree.apply_range(l..r, (b, c));
5858
}
5959
1 => {
6060
let l: usize = input.next().unwrap().parse().unwrap();

examples/practice2_l_lazy_segment_tree.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ fn main() {
5555
let l = input.next().unwrap().parse().unwrap();
5656
let r: usize = input.next().unwrap().parse().unwrap();
5757
match t {
58-
1 => segtree.apply_range(l, r + 1, true),
59-
2 => println!("{}", segtree.prod(l, r + 1).2),
58+
1 => segtree.apply_range(l..=r, true),
59+
2 => println!("{}", segtree.prod(l..=r).2),
6060
_ => {}
6161
}
6262
}

0 commit comments

Comments
 (0)