Array Operation
CodeChefOpen on judge ↗
Problem is very simple, you're given an array a, consisting of integers . There are m integers For each integer Find number of distinct elements among Input First line contains two integers n and m. Second line contains n integers, the array elements Next m lines contains integer Output Print m lines, on the i-th lines print answer to the number Constraints - 1 ≤ n,m ≤ 105 - 1 ≤ ai ≤
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