In the problem https://www.codechef.com/problems/CHEFQUE,
submission : https://ideone.com/l2LPvy got TLE. It used comp().
However, when I didn't use comp() and just used sort( vc.begin(), vc.end() ) it got accepted. Submission link https://ideone.com/NgbwUO.
Even though both are doing same thing, why comp() is giving TLE and how can we improve on it. Please somebody guide me on this.