Table Strength
You have $N$ table legs, of different strengths. Pillar $i$ can bear a weight of $W_i$, and will break if it has to bear a larger weight. You'd like to construct a table using some non-empty [subset](https://en.wikipedia.org/wiki/Subset) of these table legs. When you place a weight on a table, its load is **equally distributed** to each of its legs. For example, if you build a table with $4$
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