Bookseller and his books
CodeChefOpen on judge ↗
Ram is a book seller. His shop is in Raipur. He must handle requests which come in the following forms: (1) a b : Insert a book with b pages at the end of the ath shelf. (2) a b : Print the number of pages in the bth book on the ath shelf. (3) a : Print the number of books on the ath shelf. Raam has got an assistant, Priya. She is neighbour of Ram. Although inexperienced, Priya can handle all
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