Minimization Game
Alice and Bob, once again, play a game on an array. Alice has an array $A$ containing $N$ positive integers. The game proceeds for $N-1$ turns. On the $i$-th turn, the following occurs: - First, Alice sorts the array $A$ in non-decreasing order. - Then, she tells Bob two integers $P_i$ and $Q_i$ ($1 \leq P_i \lt Q_i \leq N+1-i$). - Bob then has to choose **exactly one** of $(A_{P_i}+A_{Q_i})$ o
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