ll@n,x[n],y[],z[]; rd((x,y)(n)); sortA_index(n,x,y,z); wt(n/2); rep(i,0,n-1,2){ wt(z[i]+1,z[i+1]+1); }