Tactical Removal
The final score of an array $A$ is calculated by repeatedly performing the following operation until the array is empty (initially, score is zero): - Add the median$^{\dagger}$ of the array to the score. - Remove any element from the array. Bob is given a permutation $P$ of length $N$. Bob wants to minimise the final score of the permutation, while Alice wants to maximise Bob's final score. To ac
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start