#include<bits/stdc++.h>
using namespace std;
int binary(int *a, int size,int k){
int l=0,r=size-1;
while(l<=r){
int mid=(l+r)/2;
if(a[mid]==k){
return 1;
}
else if(a[mid] > k){
r=mid-1;
}
else{
l=mid+1;
}
}
return 0;
}
int main(){
int n;
cin>>n;
int key;
cin>>key;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
int ans=binary(a,n,key);
if(ans==1){
cout<<"it is found the key";
}
else{
cout<<"Key not found the array";
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IGJpbmFyeShpbnQgKmEsIGludCBzaXplLGludCBrKXsKCWludCBsPTAscj1zaXplLTE7Cgl3aGlsZShsPD1yKXsKCQlpbnQgbWlkPShsK3IpLzI7CgkJaWYoYVttaWRdPT1rKXsKCQkJcmV0dXJuIDE7CgkJfQoJCWVsc2UgaWYoYVttaWRdID4gayl7CgkJCXI9bWlkLTE7CgkJfQoJCWVsc2V7CgkJCWw9bWlkKzE7CgkJfQoJfQoJcmV0dXJuIDA7Cn0KCmludCBtYWluKCl7CglpbnQgbjsKCWNpbj4+bjsKCWludCBrZXk7CgljaW4+PmtleTsKCWludCBhW25dOwoJZm9yKGludCBpPTA7aTxuO2krKyl7CgkJY2luPj5hW2ldOwoJfQoJaW50IGFucz1iaW5hcnkoYSxuLGtleSk7CglpZihhbnM9PTEpewoJCWNvdXQ8PCJpdCBpcyBmb3VuZCB0aGUga2V5IjsKCX0KCWVsc2V7CgkJY291dDw8IktleSBub3QgZm91bmQgdGhlIGFycmF5IjsKCX0KCXJldHVybiAwOwp9