Thông tin
include<bits/stdc++.h>
using namespace std;
long long n,t,x,i,a[100002];
int chat(long long x)
{
int l=1,r=n,luu=-1;
while(l<=r)
{
int mid=(l+r)/2;
if(a[mid]==x)
{
luu=mid;
r=mid-1;
}
else if(a[mid]>x)r=mid-1;
else l=mid+1;
}
return luu;
}
int main()
{
cin>>n>>t;
for(i=1;i<=n;i++)cin>>a[i];
while(t--)
{
long long y;cin>>y;
cout<<chat(y)<