2022 G.W. Coding Contest 1 S2: Imposter Friends:
You have many friends! Of course, you want to visit all your friends, but you have too many friends to keep track of them all. So, each of your \(N\) friends gives you a time in minutes, to get to their house from your house, forming a non-decreasing list of these times.
A while after you've formed your list, \(M\) other "friends" ask you to visit their house as well. Suspicious, you decide to write a program to determine if they are your friend or not.
Output "yes" if friend \(i\) is your friend, and "no" if he is not.
Sample Input:
Sample Output:
Submit Solution