Language: C++

#include <cctype>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for(LL i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define LL long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<LL, LL> LP;
typedef pair<int, P> PP;
typedef pair<LL, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

int main(){
	LL n;
	cin >> n;
	
	deque b;
	REP(i, n){
		LL x;
		cin >> x;

		if(i % 2 == 0) push_back(x);
		else push_front(x);
	}

	if(n % 2 == 1){
		reverse(b.begin(), b.end());
	}

	REP(i, n){
		cout << b[i];
		if(i != n - 1){
			cout << " ";
		}
	}
	cout << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:15: error: class template argument deduction failed:
   39 |         deque b;
      |               ^
a.cc:39:15: error: no matching function for call to 'deque()'
In file included from /usr/include/c++/14/deque:66,
                 from a.cc:6:
/usr/include/c++/14/bits/stl_deque.h:1003:9: note: candidate: 'template<class _Tp, class _Alloc, class _InputIterator, class> deque(_InputIterator, _InputIterator, const _Alloc&)-> std::deque<_Tp, _Alloc>'
 1003 |         deque(_InputIterator __first, _InputIterator __last,
      |         ^~~~~
/usr/include/c++/14/bits/stl_deque.h:1003:9: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_deque.h:976:7: note: candidate: 'template<class _Tp, class _Alloc> deque(std::initializer_list<_Tp>, const _Alloc&)-> std::deque<_Tp, _Alloc>'
  976 |       deque(initializer_list<value_type> __l,
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:976:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_deque.h:952:7: note: candidate: 'template<class _Tp, class _Alloc> deque(std::deque<_Tp, _Alloc>&&, const _Alloc&, std::false_type)-> std::deque<_Tp, _Alloc>'
  952 |       deque(deque&& __x, const allocator_type& __a, false_type)
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:952:7: note:   candidate expects 3 arguments, 0 provided
/usr/include/c++/14/bits/stl_deque.h:948:7: note: candidate: 'template<class _Tp, class _Alloc> deque(std::deque<_Tp, _Alloc>&&, const _Alloc&, std::true_type)-> std::deque<_Tp, _Alloc>'
  948 |       deque(deque&& __x, const allocator_type& __a, true_type)
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:948:7: note:   candidate expects 3 arguments, 0 provided
/usr/include/c++/14/bits/stl_deque.h:943:7: note: candidate: 'template<class _Tp, class _Alloc> deque(std::deque<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&)-> std::deque<_Tp, _Alloc>'
  943 |       deque(deque&& __x, const __type_identity_t<allocator_type>& __a)
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:943:7: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_deque.h:936:7: note: candidate: 'template<class _Tp, class _Alloc> deque(const std::deque<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&)-> std::deque<_Tp, _Alloc>'
  936 |       deque(const deque& __x, const __type_identity_t<allocator_type>& __a)
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:936:7: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_deque.h:933:7: note: candidate: 'template<class _Tp, class _Alloc> deque(std::deque<_Tp, _Alloc>&&)-> std::deque<_Tp, _Alloc>'
  933 |       deque(deque&&) = default;
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:933:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_deque.h:917:7: note: candidate: 'template<class _Tp, class _Alloc> deque(const std::deque<_Tp, _Alloc>&)-> std::deque<_Tp, _Alloc>'
  917 |       deque(const deque& __x)
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:917:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_deque.h:890:7: note: candidate: 'template<class _Tp, class _Alloc> deque(std::size_t, const _Tp&, const _Alloc&)-> std::deque<_Tp, _Alloc>'
  890 |       deque(size_type __n, const value_type& __value,
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:890:7: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_deque.h:878:7: note: candidate: 'template<class _Tp, class _Alloc> deque(std::size_t, const _Alloc&)-> std::deque<_Tp, _Alloc>'
  878 |       deque(size_type __n, const allocator_type& __a = allocator_type())
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:878:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_deque.h:865:7: note: candidate: 'template<class _Tp, class _Alloc> deque(const _Alloc&)-> std::deque<_Tp, _Alloc>'
  865 |       deque(const allocator_type& __a)
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:865:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_deque.h:855:7: note: candidate: 'template<class _Tp, class _Alloc> deque()-> std::deque<_Tp, _Alloc>'
  855 |       deque() = default;
      |       ^~~~~
/usr/include/c++/14/bits/stl_deque.h:855:7: note:   template argument deduction/substitution failed:
a.cc:39:15: note:   couldn't deduce template parameter '_Tp'
   39 |         deque b;
      |               ^
/usr/include/c++/14/bits/stl_deque.h:788:11: note: candidate: 'template<class _Tp, class _Alloc> deque(std::deque<_Tp, _Alloc>)-> std::deque<_Tp, _Alloc>'
  788 |     class deque : protected _Deque_base<_Tp, _Alloc>
      |           ^~~~~
/usr/include/c++/14/bits/stl_deque.h:788:11: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_deque.h:2277:5: note: candidate: 'template<class _InputIterator, class _ValT, class _Allocator, class, class> std::deque(_InputIterator, _InputIterator, _Allocator)-> deque<_ValT, _Allocator>'
 2277 |     deque(_InputIterator, _InputIterator, _Allocator = _Allocator())
      |     ^~~~~
/usr/include/c++/14/bits/stl_deque.h:2277:5: note:   candidate expects 2 arguments, 0 provided
a.cc:44:32: error: 'push_back' was not declared in this scope
   44 |                 if(i % 2 == 0) push_back(x);
      |                                ^~~~~~~~~
a.cc:45:22: error: 'push_front' was not declared in this scope
   45 |                 else push_front(x);
      |                      ^~~~~~~~~~