Can anyone help me to figure out that why my solution for Atcoder' Problem C is running locally but giving wrong answer on Atcoder remote judge? (I have also not used any global variables).
Link to Problem: "https://atcoder.jp/contests/abc354/tasks/abc354_c"
Link to Solution: "https://cl1p.net/code_c"