蒟蒻求助,只有30;
#include<bits/stdc++.h>
using namespace std;
const int maxn=100005;
int n;
long long n1 = 1;
bool a[105];
int main(){
cin >> n;
if(n%2 != 0){
cout << "-1" << endl;
return 0;
}
int c = 0;
while(n1*2 <= n){
n1*=2;
c++;
}
int b=c;
while(n1>1){
if (n-n1 >= 0){
a[b] = 1;
n -= n1;
}
b--;
n1/=2;
}
for(register int j=b; j>=1; --j){
if(a[j]==0){
continue;
}
long long a1=pow(2,j);
printf("%lld ",a1);
}
return 0;
}