1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
using namespace std;
int tab[20]={2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576};
int tab2[1500000];
int main() {
    ios_base::sync_with_stdio(0);
    int t,n,a;
    cin>>n>>t;
    n=tab[n-1];
    if((t%2)==0){
    for(int i=0;i<n;i++)
        {
            cin>>a;
            cout<<a<<" ";
        }

return 0;
    }
    for(int i=0;i<n;i++)
        {
            cin>>tab2[i];

        }
    for(n--;n>=0;n--)
        {
            cout<<tab2[n]<<" ";

        }
            return 0;
}