This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM \
"https://judge.yosupo.jp/problem/range_chmin_chmax_add_range_sum"
#include "segment_tree/segment_tree_beats_sum.hpp"
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int nn, Q;
cin >> nn >> Q;
vector<ll> a(nn);
for (int i = 0; i < nn; i++) {
cin >> a[i];
}
SegmentTreeBeatsSum segb(a);
while (Q--) {
int ty, l, r;
cin >> ty >> l >> r;
switch (ty) {
case 0: {
ll b;
cin >> b;
segb.chmin(l, r, b);
break;
}
case 1: {
ll b;
cin >> b;
segb.chmax(l, r, b);
break;
}
case 2: {
ll b;
cin >> b;
segb.add_val(l, r, b);
break;
}
case 3: {
cout << segb.calc_sum(l, r) << '\n';
break;
}
}
}
}Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/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.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus.py", line 187, in bundle
bundler.update(path)
File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 401, in update
self.update(self._resolve(pathlib.Path(included), included_from=path))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 260, in _resolve
raise BundleErrorAt(path, -1, "no such header")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: segment_tree/segment_tree_beats_sum.hpp: line -1: no such header