Hello Codeforces!
Can anybody please explain why this code is giving run-time error on codeforces? This solution is accepted in the actual OJ where the contest took place.
Here is the contest link- https://codeforces.me/gym/102141 Problem no is G.
Here is my code- https://ideone.com/xEqXuc




