I am getting WA in the solution of the problem D.Phoenix and Socks .https://mirror.codeforces.com/problemset/problem/1515/D. I am unable to find the error in my approach.Any help will be appreciated.Here is the link to my submission. https://mirror.codeforces.com/contest/1515/submission/117860685. Thanks in advance