思路:排序 计数 有坑点 注意M可以等于0
#include <bits/stdc++.h>
using namespace std;
#define for1(i, n) for (int i = 1; i <= n; i++)
#define forn(i, n) for (int i = 0; i < n; i++)
int a[1000];
int main(){
int n,m,k;
cin >>n>>m>>k;
forn(i,n) cin >>a[i];
sort(a,a+n);
reverse(a,a+n);
int cnt=0;
bool ok=0;
forn(i,n){
if(a[i]>m)cnt++;
if(a[i]==m)ok=1;
}
if(cnt>k||(!k&&!ok))return cout <<"NO"<<endl,0;
else cout <<"YES"<<endl;
return 0;
}