This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM "https://judge.yosupo.jp/problem/dynamic_sequence_range_affine_range_sum"
#include "../../bbst/lazy_red_black_tree.hpp"
#include "../../modint/mont.hpp"
#include "../../math/action/affine_sumwithsize.hpp"
#include "../../template/template.hpp"
using namespace std;
using mint = kk2::mont998;
using A = kk2::action::AffineSumWithSize<mint, mint>;
int main() {
int n, q;
kin >> n >> q;
vc<A::S> a(n);
kin >> a;
kk2::LazyRedBlackTree<A> rbt(2 * (n + q));
auto t = rbt.build(a);
rep (i, q) {
int type;
kin >> type;
if (type == 0) {
int p, x;
kin >> p >> x;
rbt.insert(t, p, mint(x), mint(1));
}
if (type == 1) {
int p;
kin >> p;
rbt.erase(t, p);
}
if (type == 2) {
int l, r;
kin >> l >> r;
rbt.reverse(t, l, r);
}
if (type == 3) {
int l, r;
mint b, c;
kin >> l >> r >> b >> c;
rbt.apply(t, l, r, b, c);
}
if (type == 4) {
int l, r;
kin >> l >> r;
kout << rbt.prod(t, l, r).a << "\n";
}
}
return 0;
}
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 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 312, in update
raise BundleErrorAt(path, i + 1, "#pragma once found in a non-first line")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: type_traits/io.hpp: line 4: #pragma once found in a non-first line