Both Ends Of The Range
Following the Competitive Programmer's Handbook convention, p[k] holds , and with defined as 0.
| index | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
a[i] |
5 | 2 | 9 | 1 | 7 | 3 | 8 | 4 |
p[i] |
5 | 7 | 16 | 17 | 24 | 27 | 35 | 39 |
Evaluate and , in that order.
Sign in to answer questions and track your progress
Sign In