During the contest I used Array of Integer type to avoid TLE, which can occur with array of primitive ints but that led to wrong answer but after I tried with array of primitives and I got AC. Can someone tell me why this is happening?
Submission 1: WA (https://codeforces.me/contest/1592/submission/130698133)
Submission 2: AC (https://codeforces.me/contest/1592/submission/130727745)