Company: Kickdrum_24sep
Difficulty: medium
Kickdrum Problem Description You are designing a command chain for a robot. The robot understands three basic commands, each written as a string of two characters: LL : a light movement. You have x of these commands available. RR : a rapid movement. You have y of these commands available. LR : a light movement followed by a rapid one. You have z of these commands available. You may choose any number of the available commands (each available command can be used at most once, and you do not have to use all of them) and place them one after another in any order. The chosen commands are joined with nothing between them to form a single command chain. (inferred -- each command is used whole and exactly as written; it cannot be split or reversed, so LR can never be used as RL .) A command chain is valid if it contains neither LLL nor RRR as a substring. This also applies to characters that meet across the boundary between two neighbouring commands. Complete the function solve(x, y, z) , whic