Today Oz is playing a new game. He has an array arr[] of N distinct integers . In each turn he is will follow two actions -
1) He select a random number from arr[]. Say value of this element is X.
2) He will remove X from arr[]. if X-1 is present in arr[] then he will remove it. if X+1 is present in arr[] then he will remove it.
Oz will make turns until arr[] becomes empty. Oz loves this game so he wants to make maximum number of possible turns. Help Oz to make maximum number of possible turns.
Input :
The first line contains the number of test cases - T . Each test case consist of two lines. First line will contain a integer N - number of elements in arr[]. Second line will contain N space separated integers.
Output :
For each test case output maximum number of possible turns that Oz can make.
Constraints :
1 ≤ T ≤ 100
1 ≤ N ≤ 100
1 ≤ each element of arr[] ≤ 1000
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial