Can someone please help me in debugging this code
Разница между en1 и en2, 39 символ(ов) изменены
I was trying to solve this problem (http://codeforces.com/contest/56/[problem/E:56E]). I am stuck on Test Case 30.(Link to my submission [submission:58845497]). I tried for hours but not been able to find my mistake. My algorithm is same as the editorial given, but it is giving wrong answer verdict on test case 30. Please help me in debugging the code, and also share some debugging technique, what you use during a contest.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский sourabh_jangid 2019-08-15 08:53:48 39 Tiny change: 'problem ([submission:56E]). I ' -> 'problem ([problem:56E]). I '
en1 Английский sourabh_jangid 2019-08-15 08:51:30 469 Initial revision (published)