Chef and War Tanks
CodeChefOpen on judge ↗
Chef is the King of Chef Town. Chef is preparing for a war. Since he is using war tanks, he wants to know all the possible ways he can arrange tanks in a row. Let total length of a row be $N$. Let each tank take one unit, and because of its big size he cannot arrange two tanks consecutively there must be a gap of $1$ unit at least. For example if $N=3$ then possible arrangements ('$*$' shows t
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