Independence Day 101
On the occasion of Independence Day, Chef wants to design a new flag for the country of Chefland. He has some equal-sized strips in three different colors and needs to arrange them in a line so that no two adjacent strips share the same color. Given that Chef has $A$ orange strips, $B$ white strips, and $C$ green strips, determine if it is possible to design such a flag using all the strips.
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