Saleh127

CF 764b

Jul 26th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9. ll n,c,d,e,f,i,j,k,l;
  10. cin>>n;
  11. vector<ll>a(n+5);
  12. for(i=0;i<n;i++)
  13. {
  14. cin>>a[i];
  15. }
  16. for(i=0;i<n/2;i+=2)
  17. {
  18. swap(a[i],a[n-i-1]);
  19. }
  20. for(i=0;i<n;i++)
  21. {
  22. cout<<a[i]<<" ";
  23. }
  24. return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment