Rube Goldberg machine
CodeChefOpen on judge ↗
Chef has recently been designing a Rube Goldberg machine (Wikipedia link). A Rube Goldberg machine consists of multiple devices connected to each other in a single path, where one device triggers another device, one at a time. Chef has labelled each device with a string consisting of lowercase letters. Unfortunately, Chef has lost the file which had the overall path to be followed by the machine.
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