For this Question: You are given a tree rooted at 1 (root is at level 1). The entire tree can be created in the following fashion:-
<li> Nodes at odd level have 2 children. So node 1 has two children, nodes 2 and 3.
<li> Nodes at even level have 4 children. So node 2 has 4 children, nodes 4, 5, 6, and 7. Similarly node 3 has 4 children, nodes 8, 9, 10, and 11.
<li> This process goes on infinitely. Node 4 has 2 children, nodes 12 and 13, node 5 has 2 children, nodes 14 and 15,... , and so on.

Now you are given an integer N, you need to report the path from the root to the node.The first and the only line of input contains an integer N.

Constraints
1 <= N <= 10<sup>16</sup>Output the path from the root to the node N in the form of space separated integers.Sample Input
14

Sample Output
1 2 5 14

Explanation: The path to node 14  from root is 1 -> 2 -> 5 -> 14 (Explained in problem text)

Sample Input
999

Sample Output
1 2 6 16 44 125 353 999 
, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define sd(x) scanf("%d", &x)
#define sz(v) (int) v.size()
#define pr(v) For(i, 0, sz(v)) {cout<<v[i]<<" ";} cout<<endl;
#define slld(x) scanf("%lld", &x)
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(int i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define ll long long
#define ld long double
#define int long long
#define double long double
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pii;
typedef vector<int> vi;
#define pi 3.141592653589793238
const int MOD = 1e9+7;
const int INF = 1LL<<60;


const int N = 2e5+5;

// it's swapnil07 ;)
 
#ifdef SWAPNIL07
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
int begtime = clock();
#define end_routine() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif


void solve(){
    int n; cin>>n;
    int s[50], e[50];
    s[1]=1, e[1]=1;

    For(i, 2, 50){
        int m = 2;
        if(i%2){
            m = 4;
        }
        s[i]=e[i-1]+1;
        e[i]=e[i-1]+(e[i-1]-s[i-1]+1)*m;
        if(s[i] > n){
            break;
        }
    }

    int j;
    vector<int> vect;

    for(int i=1; i<50; i++){
        if(s[i] > n){
            j = i-1;
            break;
        }
    }

    int cur = n;
    while(j > 1){
        vect.pb(cur);
        int cl = e[j]-s[j]+1;
        int pl = e[j-1]-s[j-1]+1;
        int par = cl/pl;
        int pos = cur-s[j];
        pos = pos/par;
        cur = s[j-1]+pos;
        j--;
    }
    vect.pb(1);
    reverse(all(vect));
    for(int i: vect){
        cout<<i<<" ";
    }
}


signed main()
{
    fast
    #ifdef SWAPNIL07
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    int t=1; 
    // cin>>t;
    while(t--){
        solve();
        cout<<"\n";
    }
    return 0;
}

, In this Programming Language: C++, Now tell me if this Code is compilable or not?