← All problemsSign in

Profit at small bazaar

You have data of $1$ item from small bazaar for next $n$ days. You are given $2$ arrays of $n$ length. - $p$ array represents price of the product for next $n$ days. - $q$ array represents quantity of the product sold on $i$th day. You have to tell maximum profit which you can make and on which day you made that much profit. If there are multiple days with maximum profit then print

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