WA on today's contest — problem B

Revision en1, by kowalsk1, 2018-07-09 21:03:03

I submitted the following solution for today's B during the contest: https://pastebin.com/VPrGHv3F But even later when i saw the test case, i couldn´t figure out what i did wrong, cause i think my logic is correct. Can someone explain why is my algorithm failing? Are there any corner cases in this problem?

Thanks in advance, have a great day.

Tags #contest, #problem b, #wronganswer

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English kowalsk1 2018-07-09 21:05:25 6 Tiny change: 'ission/40132469\nBut even' -> 'ission/40123027\nBut even'
en2 English kowalsk1 2018-07-09 21:04:22 55
en1 English kowalsk1 2018-07-09 21:03:03 381 Initial revision (published)