library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub rainbou-kpr/library

:heavy_check_mark: test/aoj-dsl-2-b.test.py

Depends on

Code

# verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/problems/DSL_2_B
import sys
input = sys.stdin.buffer.readline

from py.segtree import RSumQ


def main() -> None:
    n, q = map(int, input().split())
    seg = RSumQ(n)
    for _ in range(q):
        com, x, y = map(int, input().split())
        if com == 0:
            seg.apply(x-1, y)
        else:
            print(seg.prod(x-1, y))


if __name__ == "__main__":
    main()
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/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.8.18/x64/lib/python3.8/site-packages/onlinejudge_verify/languages/python.py", line 93, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page