/tmp/solutions/build/static_range_sum-main.cpp:
1| |#include <common.h>
2| |prelude;
3| |
4| |namespace {
5| |
6| |u64 a[500001];
7| |
8| |} // namespace
9| |
10| 1|int main() {
11| 1| rd rd;
12| 1| wt wt;
13| 1| int n = rd.uh();
14| 1| int q = rd.uh();
15| 6| for (int i = 1; i <= n; ++i) a[i] = a[i - 1] + rd.uw();
^5 ^5
------------------
| Branch (15:19): [True: 83.33%, False: 16.67%]
------------------
16| 6| while (q--) {
------------------
| Branch (16:10): [True: 83.33%, False: 16.67%]
------------------
17| 5| let l = rd.uh();
18| 5| let r = rd.uh();
19| 5| let sum = a[r] - a[l];
20| 5| wt.ud(sum);
21| 5| }
22| 1| return 0;
23| 1|}