← All problemsSign in

Best Movie

CodeChefRating 660Open on judge ↗

You want to rent a movie. There are $N$ movies and the $i$-th movie has an IMDB score of $A_i$ and costs $B_i$ to rent. Note that IMDB scores can only be **integers** in the range $1$ to $10$ for the sake of this problem. You will only watch movies with an IMDB score of at least $7$. Find the minimum cost of a movie that you are willing to watch. There may be no movies available with an IMDB sc

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