Contest Advancement Open kattis Problem time limit exceeded c++
I am trying to solve the open kattis problem ‘Contest Advancement’ (https://open.kattis.com/problems/contestadvancement?editresubmit=13688908) using a “conditional-Quicksort” algorithm and c++.
The task is to order and show a given set of numbers according to the first line conditions.
I use the conditional quicksort to sort the final array because I have to sort the final array in the order of the initial positions, my code gets a time limit exceeded in the 3rd test case so I think that I just need to optimize my code but I don’t find another way to get a better performance.