#include using namespace std; #define int long long templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> n; set st; for(int i = n;i >= 1;i--){ if(st.find(i*2) == st.end()){ st.insert(i); }else{ break; } } int cnt = 0; for(auto e : st){ cout << e; if(cnt < st.size()-1){ cout << " "; } } cout << endl; return 0; }