{ll@n,a[3d5],c[2d5];rd(a(2n));rep(i,n)c[a[i]]=i;a[0..n-1]=c[a[n..]];wt(inversion(n,a));}