← All problemsSign in

Introverts

CodeChefRating 2090Open on judge ↗

There are $N$ empty seats in a row, numbered $1$ to $N$. $N$ introverts arrive one by one in order from $1$ to $N$ and choose a seat for themselves. Being introverts, they have some rules to minimize contact with other people: - **Primary goal:** The person will aim to maximize their chosen seat's distance from the closest occupied seat. - **Secondary goal:** In case there are multiple seats sat

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