#include<bits/stdc++.h>
using namespace std;
int a[1145140];
int bs(int l,int r,int x){
while(l<r){
int mid=(l+r)/2;
if(a[mid]==x) return mid;
if(a[mid]<x) l=mid;
else r=mid;
}
return -1;
}
int main(){
int n,m,s; cin>>n>>m;
for(int i=1;i<=n;i++) cin>>a[i];
for(int i=1;i<=m;i++){
cin>>s;
cout<<bs(1,n,s)<<" ";
}
return 0;
}
蒟蒻想打个二分板来着结果发现自己连二分都不会打了