Why my code gives wrong ans in codeforces and correct on local ide?

Правка en1, от fazer02, 2022-05-11 17:51:39

So I was giving Codeforces Round #790 Div 4. I solved B (not efficiently) however my code gave wrong ans. After the contest was over I looked for the test case and ran in my personal ide. It worked fine there. It was also running on onliegdb.com

Link to my solution: https://codeforces.com/contest/1676/submission/156648104

I want to know why isn't my code running as intended? Thanks for any help!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский fazer02 2022-05-11 17:51:39 473 Initial revision (published)