Maximise the Minimum
You are given two arrays $A$ and $B$, both of length $N$. You would like to choose **exactly** $K$ **distinct** indices $i_1,i_2, \ldots, i_K$ such that $\min(A_{i_1}+A_{i_2}+ \ldots + A_{i_K}, B_{i_1}+B_{i_2}+\ldots + B_{i_K})$ is **maximized**. Find this maximum value. ### Input - The first line of input contains a single integer $T$, denoting the number of test cases. The description of $T$ t
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