Bob and His Friends
Alice just invited Bob to come over for dinner at her place. Bob is not dressed properly and he does not wish to take any chances, so he wants to rush to an apartment of one of his $N$ friends, change there and meet Alice for the dinner. Alice and Bob's friends live in a skyscraper with many floors. Alice lives on the $a$-th floor, the apartments of Bob's friends are located on the floors $F_1,
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