#include #include #include #include #include #include #include using namespace std; #define mem(a,t) memset(a,t,sizeof(a)) #define LL long long const int inf=0x1f1f1f1f; const int mod=1000000007; #define N 100005 struct node { int x,id; }a[N],b[N]; int ans[N]; bool cmp1(node a,node b) { if(a.x!=b.x) return a.x