Cutting Wire
CodeChefOpen on judge ↗
Mohammed has a wire, its length is $n$. He wants to cut the wire in a way that fulfils the following two conditions: - After the cutting each wire piece should have length $a$, $b$ or $c$. - After the cutting the number of wire pieces should be maximum. Help Mohammed and find the number of wire pieces after the required cutting. ###Input - The first and the only line contains four space-s
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