Photoshoot
CodeChefOpen on judge ↗
College is having farewell party and students are preparing for group photoshoot! For the group picture, the students form a horizontal line. A group picture is considered $beautiful$ if for every contiguous segment of at least $2$ students, the number of males does not exceed the number of females (obviously). Currently, the line has $n$ students which can be described by a binary string s. Th
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