m,a[1<<17],s,n;c(const void*a,const void*b){return*(int*)a-*(int*)b;}main(){for(scanf("%d",&m);s