Unable to spot logical error in my code for a problem.

Revision en1, by ronith1, 2021-08-31 21:52:57

Can anyone please have a look at my solution for problem D of AtCoder ABC 216 and tell me where did I go wrong? I have compared my solution to a correct solution by comparing multiple test cases but every one of them gives the same answer on both the solutions. The logic was also a lot similar to the successful submission but I'm not able to spot the error in my code. I have commented the code to explain my logic as well as I can.

Problem link: https://atcoder.jp/contests/abc216/tasks/abc216_d

My solution link: https://atcoder.jp/contests/abc216/submissions/25492717

Tags #contest, #atcoder

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ronith1 2021-08-31 21:53:43 24
en1 English ronith1 2021-08-31 21:52:57 632 Initial revision (published)