Cure It!
CodeChefOpen on judge ↗
*Yes, the contest theme is COVID-19. No, we're not uncreative. We're just lazy.* Shriram has begun his journey to find a cure for COVID-19. He has $n$ different medicines with him numbered $a_1$, $a_2$, .. , $a_n$. He encounters infinitely many viruses numbered $1$, $2$,… covering all the positive integers. He can kill a virus numbered $x$ $(x > 0)$, if he has at least one medicine $a_j$ $(1 \l
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