#include #include typedef long long int int64; int cmp(const void *a,const void *b){ int64 p=*(int64 *)a; int64 q=*(int64 *)b; return p==q?0:p>q?-1:1; } void run(void){ int n; scanf("%d",&n); int64 *a=(int64 *)calloc(n,sizeof(int64)); int i; for(i=0;i0;i++){ int b=0; while(((int64)1<<(b+1))<=a[i]) b++; for(int j=i+1;j=((int64)1<