Segment tree or Fenwick?
1302C2.5s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
26 52 1 61 3 22 2 41 6 32 1 65 31 3 71 1 42 1 5
Output
02511
58%
1302C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
26 52 1 61 3 22 2 41 6 32 1 65 31 3 71 1 42 1 5
02511