← All problemsSign in

Plant The Plants

Chef’s has been asked to find the no of ways he can arrange the n(n>= 3) plants in a line left to right, so that he cannot find any three plants that are arranged tallest to shortest (in left to right order). The plant’s height triples do not have to be adjacent. The height of the n plants are in order {1, 2, 3, …, n-1, n} ###Input: The first line contains a single integer n which denotes 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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start