Smaller and Larger
Submissions: 3738   Accuracy:

40.38%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a sorted array and a value x, find the number of array elements less than or equal to x and elements more than or equal to x

Input:
The first line of input contains an integer T denoting the number of test cases. For each test case there will be two lines. The first line contains the two space seperated integers N and x, where N is the size of array. Second line contains the space seperated integers of the array C[i].

Output:
Print the number of Array elements less than or equal to x and array elements greater than or equal to x.

Constraints:
1 ≤ T ≤ 50
1 ≤ N ≤ 100
0 ≤ X ≤ 1000 
1 ≤ C[i] ≤ 200

Example:
Input:

3
7 0
1 2 8 10 11 12 19
7 5
1 2 8 10 11 12 19
7 10
1 2 8 10 11 12 19

Output:
0 7
2 5
4 4

 

** For More Input/Output Examples Use 'Expected Output' option **

Author: rajatjha


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.