Header Ads Widget

Goki and his breakup using python

 Problem:-

Goki recently had a breakup, so he wants to have some more friends in his life. Goki has N people who he can be friends with, so he decides to choose among them according to their skills set Yi(1<=i<=n). He wants atleast skills in his friends.
Help Goki find his friends.


 INPUT
First line of the input contains an integer N denoting the number of people.

Next line contains a single integer X - denoting the minimum skill required to be Goki's friend. 

Next n lines contain one integer Y - denoting the skill of ith person.


OUTPUT
For each person print if he can be friend with Goki. 'YES' (without quotes) if he can be friends with Goki else 'NO' (without quotes).


CONSTRAINTS

1<=N<=1000000
1<=X,Y<=1000000

Sample Input
5
100
110
130
90
100
45
Sample Output
YES
YES
NO
YES
NO
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

X is 100, so the first query is 110, so as 110 is greater than 100 answer is YES

Code:-


N=int(input())
X=int(input())
for i in range(N):
Y=int(input())
if Y>=X:
print("YES")
else:
print("NO")



Post a Comment

0 Comments