|@Rahul Jadhav 1||466|
Bheem promised all his friends that if he won the tournament so he will give ladoos. But he knew that he can afford only one ladoo per day. If he is unable to give ladoo to any of his friend he will loose his friendship with them (if more than one his friend demanded for ladoo on same day). As he has won the tournament now he has to give ladoos to his friends. Now your task is to tell how many friends he will be able to save.
First line consists of T test case.
First line of every test case 'N', represents how many friends he has.
Second line of every test case Ai, represents which friend asked for ladoo on which day.
For each test case, Single line output denoting how many friends he is able to save.
3 3 1 2 4
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?Yes