This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM "https://judge.yosupo.jp/problem/point_add_range_sum"
#include "bits/stdc++.h"
using namespace std;
using i64 = long long;
#include "../lib/classes/memorypool.cpp"
#include "../lib/classes/redblacktree.cpp"
signed main(){
RedBlackTree<i64> rb;
int n, q;
cin >> n >> q;
auto root = rb.nil;
vector<i64> a(n);
for(int i = 0; i < n; ++i)
cin >> a[i];
root = rb.build(a);
for(int i = 0; i < q; ++i){
int t, k, x;
cin >> t >> k >> x;
if(t == 0){
rb.set(root, k, x, [](auto x, auto y){return x + y;});
}
else{
auto res = rb.range_get(root, k, x);
root = res.second;
printf("%lld\n", res.first);
}
}
}
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.0/x64/lib/python3.9/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.9.0/x64/lib/python3.9/site-packages/onlinejudge_verify/languages/cplusplus.py", line 193, in bundle
bundler.update(path)
File "/opt/hostedtoolcache/Python/3.9.0/x64/lib/python3.9/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 399, in update
self.update(self._resolve(pathlib.Path(included), included_from=path))
File "/opt/hostedtoolcache/Python/3.9.0/x64/lib/python3.9/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 258, in _resolve
raise BundleErrorAt(path, -1, "no such header")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: bits/stdc++.h: line -1: no such header