Trying to solve 295A - Greg and Array using segment tree. Don't have any idea why I am getting WA on case 11.
Here is my code: 295A
Trying to solve 295A - Greg and Array using segment tree. Don't have any idea why I am getting WA on case 11.
Here is my code: 295A
Next k lines contain the queries, the query number i is written as two integers: xi, yi, (1 ≤ xi ≤ yi ≤ m).
Good luck, I hope it will help you :)
Thanks a lot. It helped.