Potion Potency
CodeChefOpen on judge ↗
Severus Snape has a grudge on Gryffindor students. He has given them a hard question for their potions exam. You have to help the Gryffindors to pass the test. You are given N potions. Let Pi denote the potency of the ith potion. You have to mix two potions such that the sum of their potencies is exactly equal to a given number M. You have to tell whether it is possible to create the required po
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