I am getting WA in the solution of the problem D.Phoenix and Socks .https://codeforces.net/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://codeforces.net/contest/1515/submission/117860685. Thanks in advance