/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| 11|int main() {
11| 11| rd rd;
12| 11| wt wt;
13| 11| int n = rd.uh();
14| 11| int q = rd.uh();
15| 4.11M| for (int i = 1; i <= n; ++i) a[i] = a[i - 1] + rd.uw();
^4.11M^4.11M
------------------
| Branch (15:19): [True: 100.00%, False: 0.00%]
------------------
16| 3.83M| while (q--) {
------------------
| Branch (16:10): [True: 100.00%, False: 0.00%]
------------------
17| 3.83M| let l = rd.uh();
18| 3.83M| let r = rd.uh();
19| 3.83M| let sum = a[r] - a[l];
20| 3.83M| wt.ud(sum);
21| 3.83M| }
22| 11| return 0;
23| 11|}