#include #include #include #include using namespace std; struct emt{int x,y;}e[100005]; bool cmp(emt a,emt b) {return(a.xe[i-1].x) j++;a[e[i].y]=j;} for (i=1;i<=n;i++) b[i]=0; for (i=1;i<=n;i++) { f[i]=query(a[i]-1)+1; modify(a[i],f[i],n); printf("%d",f[i]);if (i