← All problemsSign in

Book Worm

Sam has decided to buy $N$ books from a store in $N$ days, one book per day. Each book has a rating from $1$ to $100$. The price of a book is $Base$ $Price$ $+$ $Quality$ $Price$. $Base$ $Price$ will be common for all the books in $N$ days. $Quality$ $Price$ for each book is the number of consecutive days starting just before the current day to the previous days which had a rating greater than or

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