http://codeforces.net/problemset/problem/266/B
I did this problem today. It mentions that person at the front will be served first. So, logically, we should remove him/her from further swap considerations. I got accepted assuming no effect on starting point with time. Have I done it improperly?.