Please help me debugging runtime error in my code

Revision en2, by vishudon, 2021-08-04 18:07:22

Hello,

I am solving below problem, and I wrote a solution for the same. I can't understand on which test case or why/where it is giving runtime error. I tried very hard to debug this, but could not understand. I checked other's accepted solution for getting a test case on which my solution could fail, but still couldn't get such test case. Can someone please help me with this ? Any help will be appreciated. Thanks in advance.

Problem Link: https://mirror.codeforces.com/problemset/problem/1551/C

My solution: https://mirror.codeforces.com/contest/1551/submission/124854239 ( giving run time error on test case #2 )

Note: Also, please don't downvote if you can't help, I really tried very hard to debug my code.

UPD: I caught the issue, it is inside my comparator function. Never mind. Thanks

Tags #runtime error

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English vishudon 2021-08-04 18:07:22 90
en1 English vishudon 2021-08-04 15:00:38 766 Initial revision (published)