Second Year Pains
CodeChefOpen on judge ↗
Sri's M friends are in their second year and they've gotten horrible marks in the COA mid term. They are about to enter the classroom which already has N students sitting inside. The ith student got Ai grades. To avoid humiliation, the M friends want to sit with people who have the exact same grades as them. They want to know if they can find a partner with the same grades. You know the scores of
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