Smaller and Larger
Submissions: 3053   Accuracy:

39.1%

  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


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

to report an issue on this page.