criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include<string>
#include<vector>
#include <algorithm>
using namespace std;

int main()
{
	int n;
	cin >> n;
	vector<long long int>vec_a,vec_b;
	for (int i = 0; i < n; i++)
	{
		int num;
		cin >> num;
		vec_a.push_back(num);
	}

	for (int i = 0; i < n; i++)
	{
		vec_b.push_back(vec_a[i]);
		reverse(vec_b.begin(), vec_b.end());
	}

	for (int i = 0; i < n ; i++)
	{
		cout << vec_b[i] << endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: expected '}' at end of input
   28 |         }
      |          ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<long> a(n),b(n);
  for(int i=0; i<n; i++){
    cin >> a.at(i);
  }
  
  if(n%2){
    for(int i=0; i<n; i++){
      if(i<(n+1)/2){cout << a.at(n-1-2*i) << ' ';}
      else if(i!=n-1){cout << a.at(2*i-n) << ' ';}
      else{cout << a.at(n-2) << endl;}
    }
  }
  else{
    if(i<n/2){cout << a.at(n-1-2*i) << ' ';}
    else if(i!=n-1){cout << a.at(2*i-n) << ' ';}
    else{cout << a.at(n-2) << endl;}
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: 'i' was not declared in this scope
   20 |     if(i<n/2){cout << a.at(n-1-2*i) << ' ';}
      |        ^
Language: C++

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	int n; cin>>n;
	deque<int> Q;
	rep(i,n){
		int a; cin>>a;
		if(i%2==0) Q.emplace_back(a);
		else       Q.emplace_front(a);
	}

	if(i%2==0){
		rep(i,n) cout<<Q[i]<<endl;
	}
	else{
		rep(i,n) cout<<Q[n-i-1]<<endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'i' was not declared in this scope
   16 |         if(i%2==0){
      |            ^
Language: C

#include<cstdio>
int n,a[200010];
inline int read(){ 
    register int ret=0;char c=getchar();
    while(c<'0'||c>'9')c=getchar();
    while(c>='0'&&c<='9')ret=(ret<<1)+(ret<<3)+(c^48),c=getchar();
    return ret;
}
int main()
{
    n=read();
    for(register int i=1;i<=n;++i)a[i]=read();
    for(register int i=n;i>0;i-=2)printf("%d ",a[i]);//first 
    for(register int i=(n&1)+1;i<=n;i+=2)printf("%d ",a[i]);//second 
    return 0;
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); i++)
int main()
{
    int n;
    cin >> n;
    vector<int> a;
    vector<int> b;
    int j = 0;
    rep(i, n){
        cin >> a[i];
        b.push_back(a[i]);
        reverse(b.begin, b.end);
    }
    reverse(b.begin, b.end);
    rep(i, n){
         cout << b[i] << ' ';
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   14 |         reverse(b.begin, b.end);
      |         ~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:14:16: note:   couldn't deduce template parameter '_BIter'
   14 |         reverse(b.begin, b.end);
      |         ~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
a.cc:16:12: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   16 |     reverse(b.begin, b.end);
      |     ~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:16:12: note:   couldn't deduce template parameter '_BIter'
   16 |     reverse(b.begin, b.end);
      |     ~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
#include <vector>
#include <list>
using namespace std;

int main(){
    int n;cin>>n;
    vector<long long> sequence(n);for (int i=0;i<n;i++){cin>>sequence[i];}
    list<long long> output;
    for(int i=0;i<n;i++){
        if (i%2==0){
            if (n%2==0){
                output.push_back(sequence[i]);
            } else {
                output.push_front(sequence[i]);
            }
        } else {
            if (n%2==0){
                output.push_front(sequence[i]);
            } else {
                output.push_back(sequence[i]);
            }
        }
    }
    for (auto it=output.begin();it!=output.end();++it){
        if (it == output.end() - 1){
            cout << *it << endl;
        } else {
            cout << *it << " ";
        }
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:32: error: no match for 'operator-' (operand types are 'std::__cxx11::list<long long int>::iterator' and 'int')
   26 |         if (it == output.end() - 1){
      |                   ~~~~~~~~~~~~ ^ ~
      |                             |    |
      |                             |    int
      |                             std::__cxx11::list<long long int>::iterator
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:26:34: note:   'std::__cxx11::list<long long int>::iterator' is not derived from 'const std::reverse_iterator<_Iterator>'
   26 |         if (it == output.end() - 1){
      |                                  ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:26:34: note:   'std::__cxx11::list<long long int>::iterator' is not derived from 'const std::move_iterator<_IteratorL>'
   26 |         if (it == output.end() - 1){
      |                                  ^
Language: C++

#include<iostream>
#include<vecor>
using namespace std;

int main(){
	int n;
	int i;
	cin >> n;
	vector<int> a(n+1);
	for(i=1; i <= n; i++){
		int tmp;
		cin >> tmp;
		a[i] = tmp;
	}
	if(n%2){
		for(i=n; i>0; i-=2){
			cout << a[i];
		}
		for(i=2; i<n; i+=2){
			cout << a[i];
		}
	} else {
		for(i=n; i>1; i-=2){
			cout << a[i];
		}
		for(i=1; i<n; i+=2){
			cout << a[i];
		}
	}
	return 0;
}



Compiler output:
a.cc:2:9: fatal error: vecor: No such file or directory
    2 | #include<vecor>
      |         ^~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const ll mod = 1000000007;
const ll INF = mod * mod;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
typedef vector<int> vec;
typedef vector<string> svec;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
//#define int long long

void solve() {
    int n; cin >> n;
    int a[200200];
    rep(i, N) {
        cin >> a[i];
    }
    int b[200200];
    if(n % 2 == 0) {
        int j = n - 1, i = 0;
        while(j > 0) {
            b[i] = a[j];
            j -= 2; i++;
        }
        j = 1;
        while(j < n) {
            b[i] = a[j];
            j += 2; i++;
        }
    }
    rep(i, n) {
        cout << b[i];
    }
    cout << endl;
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//init();
	solve();
	//cout << "finish" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:52:12: error: 'N' was not declared in this scope
   52 |     rep(i, N) {
      |            ^
a.cc:29:32: note: in definition of macro 'rep'
   29 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

bool check(string tmp) {
    // cout << tmp << endl;
    if(tmp.length() % 2 == 1) {
        cout << "nope" << endl;
        return false;
    } else {
        int len = tmp.length();
        string before = tmp.substr(0, len / 2);
        string after = tmp.substr(len / 2);
        // cout << before << ":" << after << endl;
        return before == after;
    }
}
int main() {
    int n;
    cin >> n;
    vector<long long> a(n);
    REP(i, n) { cin >> a[i]; }
    deque<long long> b;
    REP(i, n) {
        if(i % 2 == 1) {
            b.push_back(a[i]);
        } else {
            b.push_front(a[i])
        }
    }
    if(n % 2 == 1) {
        reverse(b.begin(), b.end());
    }
    REP(i, n) { cout << b[i] << " "; }
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:31: error: expected ';' before '}' token
   55 |             b.push_front(a[i])
      |                               ^
      |                               ;
   56 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

bool check(string tmp) {
    // cout << tmp << endl;
    if(tmp.length() % 2 == 1) {
        cout << "nope" << endl;
        return false;
    } else {
        int len = tmp.length();
        string before = tmp.substr(0, len / 2);
        string after = tmp.substr(len / 2);
        // cout << before << ":" << after << endl;
        return before == after;
    }
}
int main() {
    int n;
    cin >> n;
    vector<long long> a(n);
    REP(i, n) { cin >> a[i]; }
    vector<long long> b;
    REP(i, n) {
        b.push_back(a[i]);
        b.reserve();
    }
    REP(i, n) { cout << b[i] << endl; }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:18: error: no matching function for call to 'std::vector<long long int>::reserve()'
   53 |         b.reserve();
      |         ~~~~~~~~~^~
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:67:5: note: candidate: 'void std::vector<_Tp, _Alloc>::reserve(size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; size_type = long unsigned int]'
   67 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:67:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <iostream>
#include <vector>

int main()
{
  int n;
  std::cin >> n;

  std::vector<int> as;
  for(int i=0; i<n; i++)
  {
    int a;
    std::cin >> a;
    as.push_back(a);
  }

  std::vector<int> bs;
  for(int i=((as.size()-1)/2)*2; 0<=i; i-=2)
  {
    bs.push_back(as[i]);
  }
  for(int i=1; i<as.size(); i+=2)
  {
    bs.push_back(as[i]);
  }
  
  bool evenFirst = as.size() % 2 == 1;
  if( ! evenFirst ) { std::reverse(bs.begin(), bs.end()); }

  for(const auto& e : bs) { std::cout << e << " "; }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:28: error: 'reverse' is not a member of 'std'
   28 |   if( ! evenFirst ) { std::reverse(bs.begin(), bs.end()); }
      |                            ^~~~~~~
Language: C++

#include <iostream>
#include <fstream>
#include <string>
#include <cstring>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <utility>
#include <numeric>
#include <stack>
#include <queue>
using namespace std;
#define INF 1000000007
using P = pair<int, int>;
using ll = long long;
int main(){
    int n;
    cin>>n;
    int a[114514];
    for(int i=0;i<n;i++)cin>>a[i];
    vector<int> k;
    for(int i=0;i<n;i++){
        k.push_back(a[i]);
        reverse(k.begin(), k.end());
    }
    for(int i=0;i<k.size();k++)cout<<k[i]<<" ";
    cout<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:29: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   28 |     for(int i=0;i<k.size();k++)cout<<k[i]<<" ";
      |                            ~^~
Language: C++

#include<stdio.h>
#include<vector>
#include<iostream>
#include<deque>
using namespace std;

int main() {
  int n; cin >> n;
  deque<int> b;

  for(int i = 0; i < n; i++){
    int tmp; cin >> tmp;
    if(i % 2 == 0){
      b.push_back(tmp);
    }else{
      b.push_front(tmp);
    }
  }
  if(n % 2 != 0){
    reverse(b.begin(), b.end());
  }

  for(int x: b){
    cout << x << " ";
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'reverse' was not declared in this scope
   20 |     reverse(b.begin(), b.end());
      |     ^~~~~~~
Language: C++

#include<stdio.h>
#include<vector>
#include<iostream>
using namespace std;

int main() {
  int n; cin >> n;
  vector<int> b;

  for(int i = 0; i < n; i++){
    int tmp;
    cin >> tmp;
    b.push_back(tmp);
      
    reverse(b.begin(), b.end());
  }

  for(int x: b){
    cout << x << " ";
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'reverse' was not declared in this scope
   15 |     reverse(b.begin(), b.end());
      |     ^~~~~~~
Language: C++

#include<bits.stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int>a(n);
  for(int i=0; i<n; ++i){
    cin >> a[i];
    reverse(a.begin(), a.end());
  }
  for(int i=0; i<n; ++i){
    cout << a[i] << endl;
  }
  

Compiler output:
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
    1 | #include<bits.stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(){
  int i,j,k,n,left,right;
  left=249999;
  right=250001;
  int A[500000];
  scanf("%d",&n);
  
  for(i=0;i<n;i++){
    scanf("%d ",&k);
    if(i==0){
      A[250000]=k;
    }
    else{
      if(n%2 == (i+1)%2){
        A[left--]=k;
      }
      else
        A[right++]=k;
    }
  }
  
  for(i=left+1;i<right;i++)
    pritnf("%d ",&A[i]);
  puts("");
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:25:5: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   25 |     pritnf("%d ",&A[i]);
      |     ^~~~~~
      |     printf
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for(int i=0;i<n;i++){
    cin >> a.ats(i);
  }
  if(n == 1){
    cout << a.at(0) << endl;
  }
  else if(n%2 == 0){
    vector<int> b(n/2);
    vector<int> c(n/2);
    for(int i=0;i<n;i++){
      if(i%2 == 0){
        c.at(i/2) = a.at(i);
      }
      else {
        b.at(i/2) = a.at(i);
      }
    }
    reverse(b.begin(), b.end());
    for(int i=0;i<n/2;i++){
      cout << b.at(i);
    }
    for(int i=0;i<n/2;i++){
      cout << c.at(i);
    }
    cout << endl;
  }
  else {
    vector<int> b(n/2);
    vector<int> c(n/2 +1);
    for(int i=0;i<n;i++){
      if(i%2 == 0){
        c.at(i/2) = a.at(i);
      }
      else {
        b.at(i/2) = a.at(i);
      }
    }
    reverse(c.begin(), c.end());
    for(int i=0;i< n/2 +1;i++){
      cout << c.at(i);
    }
    for(int i=0;i<n/2;i++){
      cout << b.at(i);
    }
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'class std::vector<int>' has no member named 'ats'; did you mean 'at'?
    9 |     cin >> a.ats(i);
      |              ^~~
      |              at
Language: C++

#include<iostream>
#include<string>
#include<typeinfo>
#include<vector>
#include<algorithm>
#include<map>
#include<iomanip>
typedef long long int ll;
using namespace std;
int main()
{
	int n;
	cin >> n;
	vector<ll> b(n);
	vector<ll> a(n);
	for(int i=0; i<n; i++){
		cin >> a.at(i);
	}

	if(n%2==0){
		for(int i=n-1; i>=0; i-=2){
			cout << a.at(i) << " ";
		}
		for(int i=0; i<=n-1; i+=2){
			cout << a.at(i) << " ";
		}
	}else{
		for(int i=n-1; i>=0; i-=2){
			cout << a.at(i)<< " ";
		}
		for(int i=1; i<=n-2; i+=2){
			cout << a.at(i) << " ";
		}
	}
	cout << endl;
	return 0;
}
pro

Compiler output:
a.cc:38:1: error: 'pro' does not name a type
   38 | pro
      | ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
using namespace std;
int main() {
 　int n,a[200000];
  cin >> n;
  for(int i=0; i<n; i++) {
    cin >> a[i];
  }
  for(int i=n-1; i>=0; i-=2) {
    cout << a[i] << " ";
  }
  for(int i=n%2; i<n; i+=2) {
    cout << a[i] << " ";
  }
}

Compiler output:
a.cc:8:2: error: extended character 　 is not valid in an identifier
    8 |  　int n,a[200000];
      |  ^
a.cc: In function 'int main()':
a.cc:8:2: error: '\U00003000int' was not declared in this scope
    8 |  　int n,a[200000];
      |  ^~~~~
a.cc:9:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |   cin >> n;
      |          ^
      |          yn
a.cc:11:12: error: 'a' was not declared in this scope
   11 |     cin >> a[i];
      |            ^
a.cc:14:13: error: 'a' was not declared in this scope
   14 |     cout << a[i] << " ";
      |             ^
a.cc:17:13: error: 'a' was not declared in this scope
   17 |     cout << a[i] << " ";
      |             ^
Language: C++

#include"bits/stdc++.h"
using namespace std;
int n,a[200005];
vector<int> p;
main(){
  cin>>n;
  for(int i=0;i<n;i++){
	cin>>a[i];
    p.push_back(a[i]);
    reverse(p.begin(),p.end());
  }
  
  for(int i=0;i<n;i++){
    if(i==0){
      cout<<a[i];
      continue;
    }
    cout<<<<" "<<a[i];
  }
  cout<<endl;
}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:11: error: expected primary-expression before '<<' token
   18 |     cout<<<<" "<<a[i];
      |           ^~
Language: C++

#include"bits/stdc++.h"
using namespace std;
int n,a[200005];
vector<int> p;
main(){
  cin>>n;
  for(int i=0;i<n;i++){
	cin>>a[i];
    p.push_back(a[i]);
    reverse(p.begin(),p.end());
  }
  
  for(int i=0;i<n;i++){
    if(i==0){
      cout<<a[i];
      continue;
    }
    cout<<<<" "<<a[i];
  }
  cout<<endl;
    

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:11: error: expected primary-expression before '<<' token
   18 |     cout<<<<" "<<a[i];
      |           ^~
a.cc:20:14: error: expected '}' at end of input
   20 |   cout<<endl;
      |              ^
a.cc:5:7: note: to match this '{'
    5 | main(){
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> a(n), b;
  b.reverve(n);
  
  for(int i=0; i<n; i++)
    cin >> a.at(i);
  
  b.push_back(a.at(0));
  for(int i=1; i<n; i++){
    b.push_back(a.at(i));
    reverse(b.begin(), b.end());
  }
  
  for(int i=0; i<n; i++){
    cout << b.at(i) << " ";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'class std::vector<int>' has no member named 'reverve'; did you mean 'reserve'?
    8 |   b.reverve(n);
      |     ^~~~~~~
      |     reserve
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        
        List<Integer> b = new ArrayList<Integer>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b.add(a[i]);
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            int s = b.get(i);
            System.out.print(s);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:17: error: method reverse in class Collections cannot be applied to given types;
            Collections.reverse();
                       ^
  required: List<?>
  found:    no arguments
  reason: actual and formal argument lists differ in length
1 error
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        
        List<int> b = new ArrayList<int>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b.add(a[i]);
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            int s = b.get(i);
            System.out.print(s);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:9: error: unexpected type
        List<int> b = new ArrayList<int>();
             ^
  required: reference
  found:    int
Main.java:9: error: unexpected type
        List<int> b = new ArrayList<int>();
                                    ^
  required: reference
  found:    int
Main.java:17: error: method reverse in class Collections cannot be applied to given types;
            Collections.reverse();
                       ^
  required: List<?>
  found:    no arguments
  reason: actual and formal argument lists differ in length
3 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        
        List<int> b = new ArrayList<int>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b.add(a[i]);
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            int s = new int(b.get(i));
            System.out.print(s);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:21: error: '[' expected
            int s = new int(b.get(i));
                           ^
Main.java:21: error: ']' expected
            int s = new int(b.get(i));
                                     ^
2 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        
        List<int> b = new ArrayList<int>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b.add(a[i]);
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            inr s = new int(b.get(i));
            System.out.print(s);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:21: error: '[' expected
            inr s = new int(b.get(i));
                           ^
Main.java:21: error: ']' expected
            inr s = new int(b.get(i));
                                     ^
2 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        
        List<String> b = new ArrayList<String>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b.add(a[i]);
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            String s = new String(get(i));
            System.out.print(s);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:16: error: incompatible types: int cannot be converted to String
            b.add(a[i]);
                   ^
Main.java:17: error: method reverse in class Collections cannot be applied to given types;
            Collections.reverse();
                       ^
  required: List<?>
  found:    no arguments
  reason: actual and formal argument lists differ in length
Main.java:21: error: cannot find symbol
            String s = new String(get(i));
                                  ^
  symbol:   method get(int)
  location: class Main
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        
        List<String> b = new ArrayList<String>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b.add(a[i]);
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            int s = new int(b.get(i));
            System.out.print(s);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:21: error: '[' expected
            int s = new int(b.get(i));
                           ^
Main.java:21: error: ']' expected
            int s = new int(b.get(i));
                                     ^
2 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        List<String> b = new ArrayList<String>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b[i] =  a[i];
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            System.out.print(i[0]);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:15: error: array required, but List<String> found
            b[i] =  a[i];
             ^
Main.java:16: error: method reverse in class Collections cannot be applied to given types;
            Collections.reverse();
                       ^
  required: List<?>
  found:    no arguments
  reason: actual and formal argument lists differ in length
Main.java:20: error: array required, but int found
            System.out.print(i[0]);
                              ^
3 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        List<String> b = new ArrayList<String>();
        
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b[0] =  a[i];
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            System.out.print(i[0]);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:15: error: array required, but List<String> found
            b[0] =  a[i];
             ^
Main.java:16: error: method reverse in class Collections cannot be applied to given types;
            Collections.reverse();
                       ^
  required: List<?>
  found:    no arguments
  reason: actual and formal argument lists differ in length
Main.java:20: error: array required, but int found
            System.out.print(i[0]);
                              ^
3 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        List<String> b = new ArrayList<String>();
        
        for(int i=0; i<n; i++){
            a[] = sc.nextInt();
        }
        
        for(int i=0; i<n; i++){
            b[0] =  a[i];
            Collections.reverse();
        }
        
        for(int i=0; i<n; i++){
            System.out.print(i[0]);
        }
        System.out.println("");
    }
}

Compiler output:
Main.java:11: error: not a statement
            a[] = sc.nextInt();
             ^
Main.java:11: error: ';' expected
            a[] = sc.nextInt();
               ^
2 errors
Language: C++

#include<utility>
#include<vector>
using namespace std;

int main(void){
  int n;
  scanf("%d",&n);
  int a[n];
  vector<int> b;
  for(int i = 0;i < n;i++){
    int p;
    scanf("%d",&p);
    a[i] = p;
  }
  for(int i = 0;i < n;i++){
    int I = i;
    b.push_back(a[i]);
    for(int z = 0;z <= I;z++){
      swap(b[z],b[I]);
      I--;
    }
  }
  for(int i = 0;i < n;i++){
    int p = b[i];
    printf("%d ",p);

  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'scanf' was not declared in this scope
    7 |   scanf("%d",&n);
      |   ^~~~~
a.cc:25:5: error: 'printf' was not declared in this scope
   25 |     printf("%d ",p);
      |     ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include<vector>
  +++ |+#include <cstdio>
    3 | using namespace std;
Language: C

#include <stdio.h>
#include <stdlib.h>
typedef struct
{
    long weight;
    long parent,rchild,lchild;
} HTNode, *HuffmanTree;
HTNode HT[100001];
typedef long **HuffmanCode;
typedef struct temp_result
{
    long s1;
    long s2;
} temp_re;
temp_re select(HuffmanTree HT,long n)
{
    long i,s,flag=0;
    HuffmanTree p;
    temp_re answer;
    answer.s1=answer.s2=0;
    for(p=HT,i=1; i<=n-1; i++)
    {
        if(HT[i].parent==0)
        {
            if(flag==0)
            {
                s=(HT[i].weight+HT[i+1].weight);
                answer.s1=i;
                answer.s2=i+1;
                flag=1;
            }else{
                if(HT[i].weight+HT[i+1].weight<s)
                {
                    answer.s1=i;
                    answer.s2=i+1;
                    s=HT[i].weight+HT[i+1].weight;
                }
            }
        }
    }
    return answer;
}
long HuffmanCoding(long *w,long n)
{

    long m=2*n-1;
    long i,sum=0;
    HuffmanTree p;
    temp_re t_r;
    for(p=HT,i=1; i<=n; i++,p++,w++)
    {
        HT[i].weight=*w;
        (p+i)->lchild=(p+i)->rchild=(p+i)->parent=0;
    }
    for(; i<=m; i++,p++)
    {
        HT[i].lchild=HT[i].parent=HT[i].rchild=HT[i].weight=0;
    }
    for(i=n+1; i<=m; i++)
    {
        t_r=select(HT,i-1);
        HT[t_r.s1].parent=i;
        HT[t_r.s2].parent=i;
        HT[i].lchild=t_r.s1;
        HT[i].rchild=t_r.s2;
        HT[i].weight=HT[t_r.s1].weight+HT[t_r.s2].weight;
        sum+=HT[i].weight;
    }
    return sum;
}
void deal()
{
    long t,n,j,i,*p,result;
    scanf("%ld",&t);
    for(i=0;i<t;i++)
    {
        scanf("%ld",&n);
        p=(long*)malloc(n*sizeof(long));
        for(j=0;j<n;j++)
        {
            scanf("%ld",&(*(p+j)));
        }
        result=HuffmanCoding(p,n);
        printf("%ld\n",result);
    }
}
int main()
{
    deal();
    return 0;
}


Compiler output:
main.c:15:9: error: conflicting types for 'select'; have 'temp_re(struct <anonymous> *, long int)' {aka 'struct temp_result(struct <anonymous> *, long int)'}
   15 | temp_re select(HuffmanTree HT,long n)
      |         ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:514,
                 from main.c:2:
/usr/include/x86_64-linux-gnu/sys/select.h:102:12: note: previous declaration of 'select' with type 'int(int,  fd_set * restrict,  fd_set * restrict,  fd_set * restrict,  struct timeval * restrict)'
  102 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
Language: C

#include<stdio.h>
#include<stack>
#include<queue>
using namespace std;
int main()
{
	int n,i,j;
	long long x;
	stack<long long>s;
	queue<long long>q;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lld",&x);
		q.push(x);
		for(j=0;j<=i;j++)
		{
			s.push(q.front());
			q.pop();
		}
		for(j=0;j<=i;j++)
		{
			q.push(s.top());
			s.pop();
		}		
	}
	for(i=0;i<n-1;i++)
	{
		printf("%lld ",q.front());
		q.pop();
	}
	printf("%lld ",q.front());
}

Compiler output:
main.c:2:9: fatal error: stack: No such file or directory
    2 | #include<stack>
      |         ^~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<queue>
#include<cstdio>
using namespace std;



int main()
{
    deque<int> ans;
    int n;
    scanf("%d",&n);
    for(int i = 1; i<=n; i++)
    {
        int num;
        scanf("%d",&num);
        if(i&1)
            ans.push_front(num);
        else
            ans.push_back(num);
    }
    int i = 0;
    if(n&1)
    {
        while(i<n-1)
        {
            printf("%d ",ans.front());
            ans.pop_front();
            i++;
        }
        printf("%d\n",ans.front());
    }
    else
    {
        while(i<n-1)
        {
            printf("%d ",ans.back());
            ans.pop_back();
            i++;
        }
        printf("%d\n",ans.back());
    }
    return 0;
}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main() {
    int n; cin >> n;
    string s;
    for (int i = 0; i < n; ++i) {
        char ch; cin >> ch;
        s += ch;
        reverse(s.begin(), s.end());
    }
    for (int i = 0; i < s.size(); ++i) {
        cout << s[i] << " ";
    }
    cout << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'reverse' was not declared in this scope
    9 |         reverse(s.begin(), s.end());
      |         ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

   typedef long long ll;
   typedef pair<ll, ll> Pii;
   typedef vector<ll> Vi;
   typedef vector<Vi> VVi;

   const double EPS = (1e-7);
   const ll INF =(1e13);
   const double PI = (acos(-1));
   const ll MOD = ll(1e9) + 7;

   #define REP(i, n) for(ll i = 0; i < (ll)(n); i++)
   #define REPR(i, n) for(ll i = n; i > -1; i--)
   #define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
   #define ALL(x) (x).begin(),(x).end()
   #define SORT(x) sort((x).begin(), (x).end())
   #define RSORT(x) sort((x).rbegin(), (x).rend())
   #define REVERSE(x) reverse((x).begin(), (x).end())
   #define SZ(x) ((ll)(x).size())
   #define pb push_back
   #define mp make_pair

   //chmax(a, b): a>bならaをbで更新　更新したときにtrueを返す
   //chmin(a, b): a<bならaをbで更新　更新したときにtrueを返す
   template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
   template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

   #define dump(x) cerr<< #x << "= " << (x) << endl;

   ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
   ll pow(ll a, ll b){if (b == 0) return 1; else if (b % 2 == 0) return pow(a * a, b / 2); else return pow(a * a, b / 2) * a;}
   ll pow(ll a, ll b, ll m){if (b == 0) return 1; else if (b % 2 == 0) return (pow(a * a, b / 2, m) % m); else return (pow(a * a, b / 2) * a) % m;}
   ll residue(ll a, ll m){return ((a % m) + m) % m;};

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

int main(){
  ll N; cin >> N;
  Vi a(N);
  REP(i, N) cin >> a[i];
  for(ll i = N - 1; i >= 0; i = i - 2){
    cout << a[i] << ' ';
  }
  for(ll i = N % 2; i < N; i = i + 2){
    cout << a[i] << ((i == N - 2) ? endl : ' ') ;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:44: error: overloaded function with no contextual type information
   48 |     cout << a[i] << ((i == N - 2) ? endl : ' ') ;
      |                                            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n; cin>>n;
  vector<int> a(n);
  for(int i=0; i<n; i++) cin>>a.at(i);
  vector<int> b(0);
  for(int i=0; i<n; i++){
    b.push_back(a.at(i));
    reverse(b.begin(),b.end());
  }
  for(int i=0; i<n; i++){
    if(i==n-1;) cout<<b.at(i)<<endl;
    else cout<<b.at(i)<<' ';
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: expected primary-expression before ')' token
   13 |     if(i==n-1;) cout<<b.at(i)<<endl;
      |               ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main() {
	vector<int>b;
	int n, a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		b.push_back(a);
		reverse(b.begin(), b.end());
	}
	for (int i = 0; i < n; i++) {
		cout << b[i];
		if (i != n - 1) {
			cout << ' ';
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'reverse' was not declared in this scope
   12 |                 reverse(b.begin(), b.end());
      |                 ^~~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
 
vector<int>b;

void swap() {
	reverse(b.begin(), b.end());
}
 
int main() {
	int n, a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		b.push_back(a);
		swap();
	}
	for (int i = 0; i < n; i++) {
		cout << b[i];
		if (not i != n - 1) {
			cout << ' ';
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void swap()':
a.cc:8:9: error: 'reverse' was not declared in this scope
    8 |         reverse(b.begin(), b.end());
      |         ^~~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
 
vector<int>b;

void swap() {
	reverse(b.begin(), b.end());
}
 
int main() {
	int n, a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		b.push_back(a);
		swap();
	}
	for (int i = 0; i < n; i++) {
		cout << b[i] << ' ';
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void swap()':
a.cc:8:9: error: 'reverse' was not declared in this scope
    8 |         reverse(b.begin(), b.end());
      |         ^~~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;

vector<int> swap(vector<int>b) {
	reverse(b.begin(), b.end());
	return b;
}

int main() {
	vector<int>b;
	int n, a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		b.push_back(a);
		b = swap(b);
	}
	for (int i = 0; i < b.size(); i++) {
		cout << b[i] << ' ';
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'std::vector<int> swap(std::vector<int>)':
a.cc:6:9: error: 'reverse' was not declared in this scope
    6 |         reverse(b.begin(), b.end());
      |         ^~~~~~~
Language: Java

import java.util.Scanner;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Collections;

public class Main {
	public static void main(String args[]) throws InterruptedException {
		    Scanner sc = new Scanner(System.in);	
			
			int n = sc.nextInt();
			List<Integer> list = new LinkedList<Integer>(n);
			for (int i = 1; i <= n; i++) {
				if(isEven(i)){
					list.add(0,sc.nextInt());
				}else{
					list.add(sc.nextInt());
				}
			}

			if(isEven(n)){
				for (int i = 0; i < n; i++) {
					System.out.print(list.get(i)+ " ");
				}
			}else{
				for (int i = 0; i < n; i++) {
					System.out.print(list.get(list.size()-1-i)+" ");
				}
			}

		    sc.close(); }

	public static boolean isEven(int n ) {
		if (n % 2 == 0) {
			return true;
		}else{
			return false;
		}
	}
}


Compiler output:
Main.java:12: error: incompatible types: int cannot be converted to Collection<? extends Integer>
			List<Integer> list = new LinkedList<Integer>(n);
			                                             ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.*;public class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);int n=s.nextInt();int[]m=new int[n];for(int i=0;i<n;i++)m[i]=sc.nextInt();for(int i=n-1;i>=0;i-=2)System.out.print(m[i]+" ");for(int i=n%2;i<n;i+=2)System.out.print(m[i]+" ");}}

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.*;public class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);int n=s.nextInt();int[]m=new int[n];for(int i=0;i<n;i++)m[i]=sc.nextInt();for(int i=n-1;i>=0;i-=2)System.out.print(m[i]+" ");for(int i=n%2;i<n;i+=2)System.out.print(m[i]+" ");}}
                                                                                                                                                                      ^
  symbol:   variable sc
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
    vector<int>a;
    int n;
    cin >> n;
    for(int i=0;i<n;i++){
        int k;
        cin >> k;
        if (i&1){
            a.insert(a.begin(),k);
            }
        else{
            a.puch_back(k);
        }
        if (a.size()&1){
            reverse(a.begin(),a.end())
        }
        for(int i=0;i<n-1;i++){
            cout << a[i] << "";
        }
        cout << a[n-1] << endl;
        return 0;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: 'class std::vector<int>' has no member named 'puch_back'; did you mean 'push_back'?
   16 |             a.puch_back(k);
      |               ^~~~~~~~~
      |               push_back
a.cc:19:39: error: expected ';' before '}' token
   19 |             reverse(a.begin(),a.end())
      |                                       ^
      |                                       ;
   20 |         }
      |         ~
Language: C++

/**
 *      ABc 66 C
 *      author  : kyomukyomupurin
 *      created : 2018-09-08 08:56:37
**/

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int n; cin >> n;
    int a[n];
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    int start = n / 2;
    int b[n] = {};
    b[start] = a[0];

    if (n % 2 == 0){
        for (int i = start + 1; i < n - 1; ++i) {
            b[i] = a[2 * (i - start)];
        }
        for (int i = start - 1; i >= 0; --i) {
            b[i] = a[2 * (start - i) - 1]
        }
    }
    else {
        for (int i = start + 1; i < n - 1; ++i) {
            b[i] = a[2 * (i - start) - 1];
            
        }
        for (int i = start - 1; i >= 0; --i) {
             b[i] = a[2 * (start - i)];           
        }
    }

    for (int i = 0; i < n; ++i) {
        cout << b[i] << " ";        
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:42: error: expected ';' before '}' token
   28 |             b[i] = a[2 * (start - i) - 1]
      |                                          ^
      |                                          ;
   29 |         }
      |         ~
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>

using namespace std;

int main(){

	int n, p;
	vector<int> b;
	b.clear();
	cin >> n;
	vector<int> a;
	for(int i=0;i<n;i++){
		cin >> p;
		a.push_back(p);
	}


	for(int i=0;i<n;i++){
		b.push_back(a[i]);
		reverse(b.begin(), b.end());
	}

	for(int i=0;i<n;i++) cout << b[i] << " ";
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 'reverse' was not declared in this scope
   22 |                 reverse(b.begin(), b.end());
      |                 ^~~~~~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>

using namespace std;

int main(){

	int n;
	cin >> n;

	int a[n];
	for(int i=0;i<n-1;i++) cin >> a[i];


	vector<int> b;
	b.clear();

	for(int i=0;i<n;i++){
		b.push_back(a[i]);
		reverse(b.begin(), b.end());
	}

	for(int i=0;i<n;i++) cout << b[i] << " ";
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 'reverse' was not declared in this scope
   21 |                 reverse(b.begin(), b.end());
      |                 ^~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
#include <deque>
using namespace std;
using ll = long long;
map <int ,int> mpa,mpb;
typedef pair<ll, ll> P;
priority_queue<P, vector<P>, greater<P>> pque;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ll N;
  cin >> N;
  deque<int> deq;
  int t;
  for(int i=0;i<N;i++){
    cin >> t;
    if(i%2==0){
      deq.push_front(t);
    }else{
      deq.push_back(t);
    }
  }
  *auto itr = deq.begin();
  while(itr!=deq.end()){
    if(itr!=deq.begin()){
      cout << " ";
    }
    cout << *itr;
    itr++;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:4: error: expected primary-expression before 'auto'
   35 |   *auto itr = deq.begin();
      |    ^~~~
a.cc:36:9: error: 'itr' was not declared in this scope
   36 |   while(itr!=deq.end()){
      |         ^~~