Contest Seats

No attempts yetTime limit1sMemory limit128 MB

Problem

At this ACM-ICPC contest, the participants choose their own seats. On the preliminary meeting day, each participant picks one seat they want to sit in, and on the day of the contest they simply take that pre-chosen seat.

If several participants picked the same seat, only the person who arrives first may sit there. Everyone else who wanted that seat fails to get it and therefore cannot take part in the contest.

Given the seat each participant picked, in order of arrival, write a program that computes how many participants cannot take part in the contest.

Input

The first line contains the number of test cases $K$.

For each test case, the first line contains the number of participants $P$ and the number of seats $M$ ($1 \le P, M \le 500$). Each of the next $P$ lines contains, in arrival order, the seat number chosen by one participant. Seat numbers range from $1$ to $M$.

Output

For each test case, print on its own line the number of participants who cannot take part in the contest.