College Library
CodeChefOpen on judge ↗
As the semester started ,boys and girls formed a queue of N people in the library to get Book bank.Initially they stood in the order they entered the library.However, after a while the boys started feeling awkward for standing in front of the girls in the queue and they started letting the girls move forward each second. Let's describe the process more precisely. Let's say, if at time x a boy sta
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