This documentation is automatically generated by online-judge-tools/verification-helper
// verification-helper: PROBLEM https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DSL_2_G
use proconio::input;
use lazy_segment_tree::LazySegmentTree;
fn main() {
input! {
n: usize,
q: usize,
}
let mut lst = LazySegmentTree::<(i64, i64), i64>::new(
n,
|a, b| (a.0 + b.0, a.1 + b.1),
(0, 0),
|a, b| (b.0 + a * b.1, b.1),
|a, b| a + b,
0,
);
lst.build(vec![(0, 1); n]);
for _ in 0..q {
input! { query: usize, }
match query {
0 => {
input! { s: usize, t: usize, x: i64, }
lst.apply(s - 1, t, x);
}
1 => {
input! { s: usize, t: usize, }
println!("{}", lst.prod(s - 1, t).0);
}
_ => unreachable!(),
}
}
}
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/onlinejudge_verify/languages/rust.py", line 288, in bundle
raise NotImplementedError
NotImplementedError