Maximum Product
CodeChefOpen on judge ↗
CodeMaster has gone for the shopping with M Rupees.He wants to buy the maximum number of products with given M Rupees. After reaching the store,The Shopkeeper gave him $N$ numbers of products list.Each $ith$ product represents the Price of that product. CodeMaster decided that he will buy only those products whose price is the power of two. NOTE- CodeMaster can buy only one product of the sam
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