mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-28 07:56:27 +00:00
20 lines
304 B
C++
20 lines
304 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
if (n & 1) {
|
|
cout << -1 << endl;
|
|
}
|
|
else {
|
|
for (int i = 24; i > 0; i--) {
|
|
if (n >> i & 1) {
|
|
cout << (1 << i) << ' ';
|
|
}
|
|
}
|
|
}
|
|
return 0;
|
|
}
|