← All problemsSign in

Photoshoot

The byteland fest is over and now is the time for photoshoot. There is an insanely long bench in the insanely long city of Byteland, which can accomodate **N** people. The mayor has to allocate each position on the bench either for a boy or for a girl. He creates an arrangement like "BBGBGBG..", where B means seat allocated for boy and G means seat allocated for girl. Formally, an arrangement A i

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