I stucked in this question for long now I tried in almost all possible cases but still it kept showing wrong answer on test#2 please help, whats wrong in my code or you can give some strong test cases.
https://mirror.codeforces.com/contest/1400/submission/91015416