Rent Books
CodeChefOpen on judge ↗
Kritika likes to read books. She decides to buy $N$ books from the store on rent. You are given an array $A$ of length $N$ containing the prices for renting each of the books for one day. You are also given the budget of Kritika which is $B$. She wants to buy all of the $N$ books at the same time and return all of them together when due. Your task is to find out the maximum number of days (in inte
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