Hi all,↵
I am trying to solve [this question](https://codeforces.com/contest/1199/problem/C),I got some logic and implemented it but getting WA on test case 11. [Here is my code](https://codeforces.com/contest/1199/submission/58928422ideone.com/EXSHX4).↵
↵
Don't know whats wrong with my logic or code as I have tried many cases by myself, for all of them I got the correct output.↵
↵
Also please help me in understanding [this submission](https://codeforces.com/contest/1198/submission/59222773) for the same why he used prefix sum and how it is different from my logic.↵
Please help me.↵
Thanks.
I am trying to solve [this question](https://codeforces.com/contest/1199/problem/C),I got some logic and implemented it but getting WA on test case 11. [Here is my code](https://
↵
Don't know whats wrong with my logic or code as I have tried many cases by myself, for all of them I got the correct output.↵
↵
Also please help me in understanding [this submission](https://codeforces.com/contest/1198/submission/59222773) for the same why he used prefix sum and how it is different from my logic.↵
Please help me.↵
Thanks.