Sadness value
CodeChefOpen on judge ↗
Satyanand is at a medical shop. He is diagnosed with a disease. There is a rack of medicines in the shop. Let there be $N$ medicines on the rack. Let the value associated with $ith$ medicine be $a$i The doctor told him that three medicines available in the medical shop will cure his disease. But Satyanand wants to select only those medicines $i$, $j$, $k$ from the rack such that $i$ $i $j $k where
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