0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-18 04:32:00 +00:00
OI-codes/Luogu/P7071/P7071.cpp

19 lines
300 B
C++
Raw Normal View History

2020-11-13 10:29:30 +00:00
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n & 1) {
cout << -1 << endl;
2021-11-19 09:01:13 +00:00
} else {
2020-11-13 10:29:30 +00:00
for (int i = 24; i > 0; i--) {
if (n >> i & 1) {
cout << (1 << i) << ' ';
}
}
}
return 0;
}