Language: C++

#include <iostream>
#include<vector>
using namespace std;
#define int long long int
#include<deque>
#include<algorithm>
//Compiler version g++ 6.3.0

deque<int> d;
signed main()
{
  int n,t;cin>>n;
  for(int i=1;i<=n;i++){
    cin>>t;
    if(i&1){
      d.push_back(t);
    }
    else {
      d.push_front(t);
    }
  }
  vector<int> v;
  for(auto x: d){
    v.push_back(x);
  }
  if((n&1)){
    reverse(v.begin(),v.end());
  }
  for(auto x:v){
    cout<<x<<" ";
  }
}

Compiler output:
/usr/include/c++/14/bits/uniform_int_dist.h: In member function 'std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomBitGenerator&, const param_type&)':
a.cc:4:18: error: 'long long long' is too long for GCC
    4 | #define int long long int
      |                  ^~~~
a.cc:4:18: error: 'long long long' is too long for GCC
    4 | #define int long long int
      |                  ^~~~
/usr/include/c++/14/bits/stl_algo.h: In function 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare)':
a.cc:4:13: error: expected primary-expression before 'long'
    4 | #define int long long int
      |             ^~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:6:
/usr/include/c++/14/bits/stl_algo.h:1815:29: error: expected ')' before 'long'
 1815 |       if (__last - __first > int(_S_threshold))
      |          ~                  ^
      |                             )
a.cc:4:13: error: expected primary-expression before 'long'
    4 | #define int long long int
      |             ^~~~
/usr/include/c++/14/bits/stl_algo.h:1817:51: error: expected ')' before 'long'
 1817 |           std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
      |                                ~                  ^
      |                                                   )
a.cc:4:13: error: expected primary-expression before 'long'
    4 | #define int long long int
      |             ^~~~
/usr/include/c++/14/bits/stl_algo.h:1818:52: error: expected ')' before 'long'
 1818 |           std::__unguarded_insertion_sort(__first + int(_S_threshold), __last,
      |                                          ~         ^
      |                                                    )
/usr/include/c++/14/bits/stl_algo.h: In function 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare)':
a.cc:4:13: error: expected primary-expression before 'long'
    4 | #define int long long int
      |             ^~~~
/usr/include/c++/14/bits/stl_algo.h:1880:32: error: expected ')' before 'long'
 1880 |       while (__last - __first > int(_S_threshold))
      |             ~                  ^
      |                                )
a.cc:4:13: error: expected primary-expression before 'long'
    4 | #define int long long int
      |             ^~~~
In file included from /usr/include/c++/14/deque:66,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_deque.h: In instantiation of 'struct std::_Deque_iterator<long long int, long long int&, long long int*>':
/usr/include/c++/14/bits/stl_deque.h:507:47:   required from 'class std::_Deque_base<long long int, std::allocator<long long int> >'
  507 |       typedef typename iterator::_Map_pointer _Map_pointer;
      |                                               ^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_deque.h:788:11:   required from 'class std::deque<long long int>'
  788 |     class deque : protected _Deque_base<_Tp, _Alloc>
      |           ^~~~~
a.cc:9:12:   required from here
    9 | deque<int> d;
      |            ^
/usr/include/c++/14/bits/stl_deque.h:202:7: error: postfix 'std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Self std::_Deque_iterator<_Tp, _Ref, _Ptr>::operator++(long long int) [with _Tp = long long int; _Ref = long long int&; _Ptr = long long int*; _Self = std::_Deque_iterator<long long int, long long int&, long long int*>::_Self]' must have 'int' as its argument
  202 |       operator++(int) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_deque.h:222:7: error: postfix 'std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Self std::_Deque_iterator<_Tp, _Ref, _Ptr>::operator--(long long int) [with _Tp = long long int; _Ref = long long int&; _Ptr = long long int*; _Self = std::_Deque_iterator<long long int, long long int&, long long int*>::_Self]' must have 'int' as its argument
  222 |       operator--(int) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~