← All problemsSign in

Field Trip

Problem Statement Anne is a teacher at an elementary school, and is organizing a field trip for her class. She has a queue of n children,and has to arrange them into k buses in the following manner: - When the first bus comes, the first c1 children in the queue go into the bus - Then the second bus comes, and the next c2 children in the queue get into the bus - ...And so on Note that each

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