After watching the segment tree video i tried to solve the GSS1 spoj problem.
For the test case
4
-2 1 1 -2
1
1 4
the output must be 2 but my code for some reason prints 0. I cannot figure out the problem with my code. Any help is appreciated.
After watching the segment tree video i tried to solve the GSS1 spoj problem.
For the test case
4
-2 1 1 -2
1
1 4
the output must be 2 but my code for some reason prints 0. I cannot figure out the problem with my code. Any help is appreciated.