How to do this question? Please help(c++)

content
The Normandy landings in World War II were fierce, and the Allies won but sacrificed heavily; after the war, the Master Chief began to count the number of soldiers,
Through the soldier ’s registration card number, I hope to know how many soldiers were killed unfortunately, but the number is large, and it is not easy to count.
The military registration number has also been registered repeatedly. Please help to solve this problem.

Enter description
Multi-assessment, two lines for each assessment,
Two integers N and M in the first line, N is the number of soldiers participating in the war, M is the number of registration numbers,
The second line has M integers, which represent the registered military registration number of the returning soldier.
(1 <N, M <10000)

Output description
One line for each capital measurement,
Output the number of soldiers who lost their lives (small to large).
If all soldiers survived, output ‘@’
Format as example
Sample input
7 4
3 1 5 7
6 6
6 1 3 2 5 4
6 8
6 1 1 1 2 5 2 5
Sample output
2 4 6
@
3 4

You posted instructions for how to do it.

If you mean that you don’t know where to start then… Reading the instructions is a great start. Then you could check out the example, do you agree with and understand everything there? After that you’d write code to read input… And so on, whenever you complete a small portion you’d consider what the next thing that needs doing is.