Bench Press
In the gym, Chef prefers to lift at least $W$ grams during a bench press and if that's impossible, Chef considers his workout to be incomplete and feels bad. The rod weighs $W_r$ grams and there are $N$ other weights lying on the floor that weigh $w_1, w_2, ..., w_N$ grams. To maintain balance and to ensure that there is no unnecessary load due to torque, it's important that the weights added to
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