Balanced Lighting
Chef is getting his house ready for a party! In an effort to improve illumination in the room, Chef has placed $N$ lights on his wall. Each light must be given a color: either red or blue. Some of the lights have colors that are already decided, while others aren't decided yet. Specifically, you are given an array $C$ of length $N$, where: - $C_i = 1$ means the color of the $i$-th light is r
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