BETA

Difficulty Level: Basic

Submissions: 1330 Accuracy:

35.56%

Elements in the Range
       

An array containing positive elements is given. ‘A’ and ‘B’ are two numbers defining a range. Write a function to check if the array contains all elements in the given range.

Input:
The first line of input contains an integer T denoting the number of test cases. Each test case contains space separated integers n, A and B which denotes the number of elements in the array a[] and the range [A, B]. Next line contains space separated n elements in the array a[].

Output:
Print "Yes" if all the elements in the range are present else print "No".

Constraints:
1<=T<=100
1<=n<=1000
1<= A < B<=1000
1<=a[i]<=1000‚Äč

Example:
Input:

1
7 2 5
1 4 5 2 7 8 3

Output:
Yes

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

Contributor: Shashwat Jain

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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