Need help in solving MP3!!
Difference between en2 and en3, changed 44 character(s)
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.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English byee 2019-08-22 07:34:54 44
en2 English byee 2019-08-22 01:55:29 0 (published)
en1 English byee 2019-08-22 01:54:20 607 Initial revision (saved to drafts)