← All problemsSign in

Shops in Mirzapur

CodeChefRating 3218Open on judge ↗

Problem description. There are $N$ shops in a straight line some where in Mirzapur each of them selling same type of chocolate. Each shops have their own price of chocolate . Formally , $i$-th shop sells $A[i]$ number of chocolates in exchange of $1$ coin . Also each shop will give $B[i]$ number of chocolates for free to any customer that buys chocolates from their shop . Chef likes chocolates

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