This documentation is automatically generated by online-judge-tools/verification-helper modified by bayashi_cl
# verification-helper: PROBLEM https://judge.yosupo.jp/problem/point_add_range_sum
import sys
from operator import add
from byslib.core.const import IINF, MOD
from byslib.core.fastio import debug, readline, sinput
from byslib.data.segment_tree import SegmentTree
def main() -> None:
_, q = map(int, readline().split())
a = list(map(int, readline().split()))
seg = SegmentTree(add, 0, a)
for _ in range(q):
c, s, t = map(int, sinput().split())
if c == 0:
ap = seg[s]
seg.set(s, ap + t)
else:
print(seg.fold(s, t))
if __name__ == "__main__":
sys.setrecursionlimit(10**6)
main()
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/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], 'release': True}).decode()
File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/onlinejudge_verify/languages/python.py", line 80, in bundle
raise NotImplementedError
NotImplementedError