Stock Trading
CodeChefOpen on judge ↗
Arpa is a stock trader. On a trading day, he had stocks of $n$ companies. He can only sell the stock with the minimum price. He had $v$ magic operations. Each operation can be applied to anyone of the n stocks. Each of the v operations increases the stock price by one. Arpa wants to maximize the revenue for the day. Help him out!!! Here, revenue is the price at which the stock is sold. ###In
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