Need help in solving MP3!!

Revision en3, by byee, 2019-08-22 07:34:54

Hi all, I am trying to solve this question,I got some logic and implemented it but getting WA on test case 11. Here is my code.

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 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)