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

#include <iostream>
#include <cmath>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <list>
using namespace std;
typedef pair<int, int> point;

int main(void) {
    int n, r=1;
    cin >> n;
    
    list<int> b;
    for(int i=1; i<=n; i++) {
        int a;
        cin >> a;
        if(r)
            b.push_back(a);
        else
            b.push_front(a);
        r=1-r;
    }
    
    if(n%2==0) {
        for(auto x : b) cout << x << " ";
    }else {
        reverse(b.begin(), b.end());
        for(auto x : b) cout << x << " ";
    }
}


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

#include <iostream>
#include <cmath>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <list>
using namespace std;
typedef pair<int, int> point;

int main(void) {
    int n, r=1;
    cin >> n;
    
    list<int> b;
    for(int i=1; i<=n; i++) {
        int a;
        cin >> a;
        if(r)
            b.push_back(a);
        else
            b.push_front(a);
        r=1-r;
    }
    
    if(n%2==0) {
        for(auto x : b) cout << x << " ";
    }else {
        std::reverse(b.begin(), b.end());
        for(auto x : b) cout << x << " ";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:14: error: 'reverse' is not a member of 'std'
   29 |         std::reverse(b.begin(), b.end());
      |              ^~~~~~~
Language: C++

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

int main() {
    int n;
    cin >> n;
    deque<int> dq;
    for(int i = 1; i <= n; i++) {
        int a;
        cin >> a;
        if(i % 2 == 0) dq.push_front(a);
        else dq.push_back(a);
    }

    if(n % 2 != 0) reverse(dq.begin(), dq.end());

    for(auto e : dq) {
        cout << e << " ";
    }
    cout << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'reverse' was not declared in this scope
   16 |     if(n % 2 != 0) reverse(dq.begin(), dq.end());
      |                    ^~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected identifier before 'if'
   10 |         if(i%2==0)cin>>a[(n+i)/2];
      |         ^~
a.cc:10:34: error: expected ']' before ';' token
   10 |         if(i%2==0)cin>>a[(n+i)/2];
      |                                  ^
      |                                  ]
a.cc: In lambda function:
a.cc:10:34: error: expected '{' before ';' token
a.cc: In function 'int main()':
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else cin>>a[(n-i)/2];
      |         ^~~~
a.cc:11:24: error: 'i' was not declared in this scope
   11 |         else cin>>a[(n-i)/2];
      |                        ^
a.cc:12:5: error: expected primary-expression before ']' token
   12 |     ]
      |     ^
Language: C++

#include <iostream>
#include <vector>
#include <deque>
#include <utility>
#include <limits>
#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>

using namespace std;
using namespace boost;
using uint = unsigned int;
using ll = long long int;
using ull = unsigned long long int;

int main() {
    bool direct{true};
    uint n;
    deque<uint> d{};
    cin >> n;
    for (auto &&i: irange(0U, n)){
        uint a;
        cin >> a;
        if (direct)d.emplace_back(a); else d.emplace_front(a);
        direct=!direct;
    }
    if (direct){
        for (auto &&i: irange(0U, d.size())){
            cout << d.at(i);
            if (i != d.size()-1){
                cout << " ";
            }
        }
    } else {
        for (auto &&i: irange(0U, d.size()) | adaptors::reversed) {
            cout << d.at(i);
            if (i != 0){
                cout << " ";
            }
        }
    }
    return 0;
}

Compiler output:
a.cc:6:10: fatal error: boost/range/irange.hpp: No such file or directory
    6 | #include <boost/range/irange.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main(void){
	int n;

	cin >> n;

	vector<int> a(n);

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


	for (int i = n-1; i >= 0; i -= 2){
		cout << a[i] << " ";
	}


	int k;
	if (i % 2 == 0)
		k = 0;
	else
		k = 1;

	for (int i = k; i < n; i += 2){
		cout << a[i] << " ";
	}

}

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

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main(void){
	int n;

	cin >> n;

	vector<int> a(n);

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


	for (int i = n-1; i >= 0; i -= 2){
		cout << a[i] << " ";
	}


	if (i % 2 == 0)
		k = 0;
	else
		k = 1;

	for (int i = k; i < n; i += 2){
		cout << a[i] << " ";
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: 'i' was not declared in this scope
   23 |         if (i % 2 == 0)
      |             ^
a.cc:24:17: error: 'k' was not declared in this scope
   24 |                 k = 0;
      |                 ^
a.cc:26:17: error: 'k' was not declared in this scope
   26 |                 k = 1;
      |                 ^
a.cc:28:22: error: 'k' was not declared in this scope
   28 |         for (int i = k; i < n; i += 2){
      |                      ^
Language: C

#include <stdio.h>

int main(){
    int n,i,j,k,m,w,now;
    int *pn,*pi,*pj,*pk,*pm,*pw,*pnow;
    pn=&n;pi=&i;pj=&j;pk=&k;pm=&m;pw=&w;pnow=&now;

    scanf("%d",pn);

    int a[n],b[n],b2[n];
    int *pa,*pb,*pb2;

    pa=a;pb=b;pb2=b2;

    for(pi=0;pi<pn;pi++){
        scanf("%d",pa[pi]);
    }

    for(pj=0;pj<pn;pj++){
        pnow = pa[pj];
        pb[pj] = pnow;
        pb2[pj] = pnow;
        /*逆向きに並べ替える必要あり。*/
        pk = 0;
        pm = pj;
        while(pk<pj){
            pb[pk] = pb2[pm];
            pk++;
            pm = pm-1;
        }
    }

    for(pw=0;pw<pn;pw++){
        printf("%d ",pb[pw]);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:22: error: array subscript is not an integer
   16 |         scanf("%d",pa[pi]);
      |                      ^
main.c:20:18: error: array subscript is not an integer
   20 |         pnow = pa[pj];
      |                  ^
main.c:21:11: error: array subscript is not an integer
   21 |         pb[pj] = pnow;
      |           ^
main.c:22:12: error: array subscript is not an integer
   22 |         pb2[pj] = pnow;
      |            ^
main.c:27:15: error: array subscript is not an integer
   27 |             pb[pk] = pb2[pm];
      |               ^
main.c:27:25: error: array subscript is not an integer
   27 |             pb[pk] = pb2[pm];
      |                         ^
main.c:34:24: error: array subscript is not an integer
   34 |         printf("%d ",pb[pw]);
      |                        ^
Language: C

#include <stdio.h>

int main(){
    int n,i,j,k,m,w,now;
    int *pn,*pi,*pj,*pk,*pm,*pw,*pnow;
    pn=&n;pi=&i;pj=&j;pk=&k;pm=&m;pw=&w;pnow=&now;

    scanf("%d",&pn);

    int a[n],b[n],b2[n];
    int *pa,*pb,*pb2;

    pa=a;pb=b;pb2=b2;

    for(pi=0;pi<pn;pi++){
        scanf("%d",&pa[pi]);
    }

    for(pj=0;pj<pn;pj++){
        pnow = pa[j];
        pb[j] = pnow;
        pb2[j] = pnow;
        /*逆向きに並べ替える必要あり。*/
        pk = 0;
        pm = j;
        while(pk<pj){
            pb[pk] = pb2[pm];
            pk++;
            pm = pm-1;
        }
    }

    for(pw=0;pw<pn;pw++){
        printf("%d ",pb[pw]);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:23: error: array subscript is not an integer
   16 |         scanf("%d",&pa[pi]);
      |                       ^
main.c:20:14: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   20 |         pnow = pa[j];
      |              ^
main.c:21:15: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   21 |         pb[j] = pnow;
      |               ^
main.c:22:16: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   22 |         pb2[j] = pnow;
      |                ^
main.c:25:12: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   25 |         pm = j;
      |            ^
main.c:27:15: error: array subscript is not an integer
   27 |             pb[pk] = pb2[pm];
      |               ^
main.c:27:25: error: array subscript is not an integer
   27 |             pb[pk] = pb2[pm];
      |                         ^
main.c:34:24: error: array subscript is not an integer
   34 |         printf("%d ",pb[pw]);
      |                        ^
Language: C

#include <stdio.h>

int main(){
    int n,i,j,k,m,w,now;

    scanf("%d",&n);

    int a[n],b[n],b2[n];
    int *pa,*pb,*pb2;

    pa=a;pb=b;pc=b2;

    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }

    for(j=0;j<n;j++){
        now = pa[j];
        pb[j] = now;
        pb2[j] = now;
        /*逆向きに並べ替える必要あり。*/
        k = 0;
        m = j;
        while(k<j){
            pb[k] = pb2[m];
            k++;
            m = m-1;
        }
    }

    for(w=0;w<n;w++){
        printf("%d ",b[w]);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: 'pc' undeclared (first use in this function); did you mean 'pb'?
   11 |     pa=a;pb=b;pc=b2;
      |               ^~
      |               pb
main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
    int n,i,j,k,m,w,now;

    scanf("%d",&n);

    int a[n],b[n],b2[n];
    int *pa,*pb,*pb2;

    pa=a;pb=b;pc=c;

    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }

    for(j=0;j<n;j++){
        now = pa[j];
        pb[j] = now;
        pb2[j] = now;
        /*逆向きに並べ替える必要あり。*/
        k = 0;
        m = j;
        while(k<j){
            pb[k] = pb2[m];
            k++;
            m = m-1;
        }
    }

    for(w=0;w<n;w++){
        printf("%d ",pb[w]);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: 'pc' undeclared (first use in this function); did you mean 'pb'?
   11 |     pa=a;pb=b;pc=c;
      |               ^~
      |               pb
main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:18: error: 'c' undeclared (first use in this function)
   11 |     pa=a;pb=b;pc=c;
      |                  ^
Language: C

#include <stdio.h>

int main(){
    int n,i,j,k,m,w,now;

    scanf("%d",&n);

    int a[n],b[n],b2[n];

    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }

    for(j=0;j<n;j++){
        now = a[j];
        b[j] = now;
        b2[j] = now;
        /*逆向きに並べ替える必要あり。*/
        k = 0;
        m = j;
        while(k<j){
            b[k] = b2[m]
            k++;
            m = m-1;
        }
    }

    for(w=0;w<n;w++){
        printf("%d ",b[w]);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:25: error: expected ';' before 'k'
   22 |             b[k] = b2[m]
      |                         ^
      |                         ;
   23 |             k++;
      |             ~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define all(v) (v).begin(),(v).end()
#define Sort(x) sort((x).begin(),(x).end())
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef std::pair<int,int> pii;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int main(){
    int n;
    cin>>n;
    vector<int> v(n);
    vector<int> ans;
    rep(i,0,n)cin>>v[i];
    
    rep(i,0,n){
        if(i%2==0)ans.insert(ans.begin(),v[i]);
        else ans.pb(v[i]);
    }
    if(i%2==0)reverse(all(ans));
    rep(i,0,n){
        if(i)cout<<" ";
        cout<<ans[i];
    }
    cout<<endl;
    
    
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:39:8: error: 'i' was not declared in this scope
   39 |     if(i%2==0)reverse(all(ans));
      |        ^
Language: C++

#include <iostream>
using namespace std ;
int reverse(int t[] , int m[],int e)
{for (int i=0,j=e-1;j<e;i++,j--)
m[j]=t[i];
}
int main()
{
int N,i,t;
cin>>N;
 int*a= new int [N];
int*b= new int [N];
for(i=0;i<N;i++)
cin>>a[i];
for(i=0;i<N;i++)
{
b[i]=a[i];
reverse(a,b,i+1);
for(t=0;t<i+1;t++) 
b[t]=a[t];

for(i=0;i<N;i++)
cout<<b[i]<<"  ";
delete [] a;
delete[] b;
return 0;
}

Compiler output:
a.cc: In function 'int reverse(int*, int*, int)':
a.cc:6:1: warning: no return statement in function returning non-void [-Wreturn-type]
    6 | }
      | ^
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C

#include"stdio.h"
int main(void)
{
    int a[10],b[10],n,i,t=1;
    scan("%d\n",&n);
    for(i=1;i<=n;i++)
{
    scan("%d",&a[i]);
}
if(n%2==0)
{
    for(i=n;i>=2;i=i-2)
        b[t++]=a[i];
    for(i=1;i<=n-1;i=i+2)
        b[t++]=a[i];
}
else
{
    for(i=n;i>=1;i=i-2)
        b[t++]=a[i];
    for(i=2;i<=n-1;i=i+2)
        b[t++]=a[i];
}
for(i=1;i<=n;i++)
    print("%d ",b[i]);
}


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

#include"stdio.h"
int main(void)
{
    int a[10],b[10],n,i,t=1;
    input(n);
    for(i=1;i<=n;i++)
{
    input(a[i]);
}
if(n%2==0)
{
    for(i=n;i>=2;i=i-2)
        b[t++]=a[i];
    for(i=1;i<=n-1;i=i+2)
        b[t++]=a[i];
}
else
{
    for(i=n;i>=1;i=i-2)
        b[t++]=a[i];
    for(i=2;i<=n-1;i=i+2)
        b[t++]=a[i];
}
for(i=1;i<=n;i++)
   output(b[i]);
}


Compiler output:
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    5 |     input(n);
      |     ^~~~~
main.c:25:4: error: implicit declaration of function 'output' [-Wimplicit-function-declaration]
   25 |    output(b[i]);
      |    ^~~~~~
Language: C

#include "stdio.h" 
#include "conio.h"
#include "string.h"
#include "stdlib.h"
typedef struct _data{
	int num;
	struct _data *next;
}Data;
typedef struct _List{
	Data *head;
	Data *tail;
}List;
void data_input(List *plist);
void linkedlist_back(List *plist,int _idx);
void linkedlist_print(List *plist);
int main()
{
	
	int n=0,cnt=0,idx=0;	    
	List list;           
	Data *po;                         
	list.head=list.tail=NULL;                
	scanf("%d",&n);
	for(idx=0;idx<n;idx++){
		data_input(&list);
		linkedlist_back(&list,idx+1);
	}
	linkedlist_print(&list); 
	return 0;
 } 
void data_input(List *plist){
 	int number=0;
	scanf("%d",&number);
	Data *p;	
	p=(Data *)malloc(sizeof(Data));
	p->num=number;
	if(plist->head)	{
		plist->tail->next=p;
		plist->tail=p;
		p->next=NULL;			
		//free(p);
	}else {
		plist->head=p;
		plist->tail=p;
		p->next=NULL;
		//free(p);
}
 }
void linkedlist_back(List *plist,int _idx){
	int data[_idx];
	int i=0;
	Data *p;
	p=plist->head;
	if(_idx!=1){
		for(i;i<_idx;i++){
			data[i]=p->num;
			p=p->next;	 
		}
		p=plist->head;
		for(i=0;i<_idx;i++){
			p->num=data[_idx-i-1]; 
			p=p->next;
		}
	}
	
}
void linkedlist_print(List *plist){
	Data *p;
	p=plist->head;
	for(;p;p=p->next){
		printf("%d",p->num);
		if(p->next!=NULL)
		printf(" ");
	}
}
 

Compiler output:
main.c:2:10: fatal error: conio.h: No such file or directory
    2 | #include "conio.h"
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int *a, *b, n;
	scanf_s("%d", &n);

	a = (int *)malloc(n * sizeof(int));
	for (int i = 0; i < n; i++)
		scanf_s("%d", &a[i]);

	b = (int *)malloc(n * sizeof(int));

	if (n % 2 == 0)//n为偶数
	{
		for (int i = 0; i < n / 2; i++)
			b[i] = a[n - 1 - 2 * i];
		for (int i = 0; i < n / 2; i++)
			b[n / 2 + i] = a[2 * i];
	}
	else//n为奇数
	{
		for (int i = 0; i < n / 2 + 1; i++)
			b[i] = a[n - 1 - 2 * i];
		for (int i = 0; i < n / 2; i++)
			b[n / 2 + 1 + i] = a[2 * i + 1];
	}

	for (int i = 0; i < n; i++)
		printf("%d ", b[i]);
	printf("\n");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<stack>
#include<queue>
using namespace std;
int main()
{
    stack<int> q;
    queue<int> p;
    int n;
    int x;
    int i;
    int j;
    cin>>n;
    for(i=0;i<n;i++)
        {
            cin>>x;
        q.push(x);
        for(j=0;j<=i;j++)
        {
           p.push(q.top());
           q.pop();
        }
         for(j=0;j<=i;j++)
        {
           q.push(p.front());
           p.pop();
        }
        }
    for(j=0;j<n;j++)
        {
           p.push(q.top());
           q.pop();
        }
    for(j=0;j<n;j++)
        {
           q.push(p.front());
           p.pop();
        }
    for(i=0;i<n;i++)
       {
           cout<<q.top();
           q.pop();

       }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'cin' was not declared in this scope
   12 |     cin>>n;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<queue>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:40:12: error: 'cout' was not declared in this scope
   40 |            cout<<q.top();
      |            ^~~~
a.cc:40:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int *b;
	b = new int[n];
	int Head = 0, End = n-1,flag=1;
	for (int i = 0; i < n; i++)
	{
		if (flag)
		{
			b[Head] = a[i];
			Head++;
			flag = 0;
		}
		else
		{
			b[End] = a[i];
			End--;
			flag = 1;
		}
	}
	if (flag)
	{
		for (int i = 0; i < n; i++)
			cout << b[(Head+i)%n]<<" ";
	}
	else
	{
		for (int i = 0; i < n; i++)
			cout << b[(End - i+n) % n]<<" ";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'n' was not declared in this scope
    7 |         b = new int[n];
      |                     ^
a.cc:11:21: error: 'flag' was not declared in this scope
   11 |                 if (flag)
      |                     ^~~~
a.cc:13:35: error: 'a' was not declared in this scope
   13 |                         b[Head] = a[i];
      |                                   ^
a.cc:19:34: error: 'a' was not declared in this scope
   19 |                         b[End] = a[i];
      |                                  ^
a.cc:24:13: error: 'flag' was not declared in this scope
   24 |         if (flag)
      |             ^~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	//int n=6;
	//int *b, a[6] = {0,6,7,6,7,0};
	int *b;
	b = new int[n];
	int Head = 0, End = n-1,flag=1;
	for (int i = 0; i < n; i++)
	{
		if (flag)
		{
			b[Head] = a[i];
			Head++;
			flag = 0;
		}
		else
		{
			b[End] = a[i];
			End--;
			flag = 1;
		}
	}
	if (flag)
	{
		for (int i = 0; i < n; i++)
			cout << b[(Head+i)%n];
	}
	else
	{
		for (int i = 0; i < n; i++)
			cout << b[(End - i+n) % n];
	}
	//getchar();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'n' was not declared in this scope
    9 |         b = new int[n];
      |                     ^
a.cc:13:21: error: 'flag' was not declared in this scope
   13 |                 if (flag)
      |                     ^~~~
a.cc:15:35: error: 'a' was not declared in this scope
   15 |                         b[Head] = a[i];
      |                                   ^
a.cc:21:34: error: 'a' was not declared in this scope
   21 |                         b[End] = a[i];
      |                                  ^
a.cc:26:13: error: 'flag' was not declared in this scope
   26 |         if (flag)
      |             ^~~~
Language: C++

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

vector<int> a;

int main() {
    int n, num;
    cin >> n;
    while (n--) {
        scanf("%d", &num);
        a.push_back(num);
        reverse(a.begin(), a.end());
    }
    for (int i = 0; i < a.size(); i++) {
        if (i == 0)
            cout << a.at(i);
        else
            cout << " " << a.at(i);
    }
    cout << endl;
    return 0;
}

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

#include<stdio.h>
#include<stdlib.h>
int main()
{
	int n;
	scanf("%d", &n);
	int *a = NULL,*b=NULL;
	b = (int *)malloc(sizeof(int)*n);
	a = (int *)malloc(sizeof(int)*n);
	int i,x,y;
	x = y = n / 2;
	for (i = 0; i < n; i++)
	{
		scanf("%d", &a[i]);
		if (n % 2 == 1)
		
			(i % 2 == 0)?b[x--] = a[i]:b[++y] = a[i];
				 
		else
		
			(i % 2 == 0)? b[x++] = a[i]:b[--y] = a[i];
	}
	for (i = 0; i < n; i++)
		printf("%d ", b[i]);
	free(a);
	free(b);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:59: error: lvalue required as left operand of assignment
   17 |                         (i % 2 == 0)?b[x--] = a[i]:b[++y] = a[i];
      |                                                           ^
main.c:21:60: error: lvalue required as left operand of assignment
   21 |                         (i % 2 == 0)? b[x++] = a[i]:b[--y] = a[i];
      |                                                            ^
Language: C

#include<stdio.h>
int main()
{
	long long int n,i,j;
	scanf("%lld",&n);
	long long int b[n]={0};
	long long int a[n]={0};
	for(i=0;i<n;i++)
	{
		scanf("%lld",&a[i]);
	}
		for(i=n-1,j=0;i>=0;i=i-2,j++)
		{
			b[j]=a[i];
			if(i!=0)
			b[n-j-1]=a[i-1];
		}
		for(i=0;i<n;i++)
		{
			printf("%lld ",b[i]);
		}
		return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:6:28: error: variable-sized object may not be initialized except with an empty initializer
    6 |         long long int b[n]={0};
      |                            ^
main.c:7:28: error: variable-sized object may not be initialized except with an empty initializer
    7 |         long long int a[n]={0};
      |                            ^
Language: C

#include<stdio.h>
int main()
{
	int n,i,j;
	scanf("%d",&n);
	long int b[n]={0};
	long int a[n]={0};
	for(i=0;i<n;i++)
	{
		scanf("%ld",&a[i]);
	}
		for(i=n-1,j=0;i>=0;i=i-2,j++)
		{
			b[j]=a[i];
			if(i!=0)
			b[n-j-1]=a[i-1];
		}
		for(i=0;i<n;i++)
		{
			printf("%ld ",b[i]);
		}
		return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:6:23: error: variable-sized object may not be initialized except with an empty initializer
    6 |         long int b[n]={0};
      |                       ^
main.c:7:23: error: variable-sized object may not be initialized except with an empty initializer
    7 |         long int a[n]={0};
      |                       ^
Language: C

#include<stdio.h>
int main()
{
	long int n,i,j;
	scanf("%ld",&n);
	long int b[n]={0};
	long int a[n]={0};
	for(i=0;i<n;i++)
	{
		scanf("%ld",&a[i]);
	}
		for(i=n-1,j=0;i>=0;i=i-2,j++)
		{
			b[j]=a[i];
			if(i!=0)
			b[n-j-1]=a[i-1];
		}
		for(i=0;i<n;i++)
		{
			printf("%ld ",b[i]);
		}
		return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:6:23: error: variable-sized object may not be initialized except with an empty initializer
    6 |         long int b[n]={0};
      |                       ^
main.c:7:23: error: variable-sized object may not be initialized except with an empty initializer
    7 |         long int a[n]={0};
      |                       ^
Language: C

#include<stdio.h>
int main()
{
	int n,i,j;
	scanf("%d",&n);
	int b[n]={0};
	int a[n]={0};
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
		for(i=n-1,j=0;i>=0;i=i-2,j++)
		{
			b[j]=a[i];
			if(i!=0)
			b[n-j-1]=a[i-1];
		}
		for(i=0;i<n;i++)
		{
			printf("%d ",b[i]);
		}
		return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:6:18: error: variable-sized object may not be initialized except with an empty initializer
    6 |         int b[n]={0};
      |                  ^
main.c:7:18: error: variable-sized object may not be initialized except with an empty initializer
    7 |         int a[n]={0};
      |                  ^
Language: C

#include<stdio.h>
int main()
{
	int n,i,j;
	scanf("%d",&n);
	long int b[n]={0};
	long int a[n]={0};
	for(i=0;i<n;i++)
	{
		scanf("%ld",&a[i]);
	}
		for(i=n-1,j=0;i>=0;i=i-2,j++;)
		{
			b[j]=a[i];
			if(i!=0)
			b[n-j-1]=a[i-1];
			
		}
		for(i=0;i<n;i++)
		{
			printf("%ld ",b[i]);
		}
		return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:6:23: error: variable-sized object may not be initialized except with an empty initializer
    6 |         long int b[n]={0};
      |                       ^
main.c:7:23: error: variable-sized object may not be initialized except with an empty initializer
    7 |         long int a[n]={0};
      |                       ^
main.c:12:45: error: expected ')' before ';' token
   12 |                 for(i=n-1,j=0;i>=0;i=i-2,j++;)
      |                    ~                        ^
      |                                             )
Language: C

#include<stdio.h>
int main()
{
	int n,i,j;
	scanf("%d\n",&n);
	long int b[n]={0};
	long int a[n]={0};
	for(i=0;i<n;i++)
	{
		scanf("%ld",&a[i]);
	}
		for(i=n-1,j=0;i>=0;i=i-2,j++)
		{
			b[j]=a[i];
			if(i!=0)
			b[n-j-1]=a[i-1];
		}
		for(i=0;i<n;i++)
		{
			printf("%ld ",b[i]);
		}
		return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:6:23: error: variable-sized object may not be initialized except with an empty initializer
    6 |         long int b[n]={0};
      |                       ^
main.c:7:23: error: variable-sized object may not be initialized except with an empty initializer
    7 |         long int a[n]={0};
      |                       ^
Language: C++

#include<iostream>
using namespace std;
long int j[200000];
long int k[200000];
void main()
{
	int i;
	cin >> i;
	for (int z=0; z < i; z++)
	{
		cin >> j[z];
		k[z] = j[z];
		for (int x = 0; x <(z + 1)/2; x++)
		{
			int a;
			a = k[x];
			k[x] = k[z-x];
			k[z - x] = a;
		}
	}
	for (int z=0; z < i; z++)
	{
		cout << k[z]<<" ";
	}
}

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main()
      | ^~~~
Language: C++

#include<iosream>

using namespace std;

int main()
{
	long  n,k;
	long long *a;
	int temp=1;
	cin>>n; 
	k=n/2;
	a = new long long int[n];
	if((n-2k)==0)
	{
		for(int i=0;i<n;i++){
			
			if(temp==1)
			{
				cin>>a[k];
				temp++;
			}
			else 
			{
				if(temp%2==0)
					cin>>a[k-temp/2];
				else
					cin>>a[k+temp/2];
				temp++;
			}
		}
 	}
 	else
 	{
 		for(int i=0;i<n;i++){
			
			if(temp==1)
			{
				cin>>a[k];
				temp++;
			}
			else 
			{
				if(temp%2==1)
					cin>>a[k-temp/2];
				else
					cin>>a[k+temp/2];
				temp++;
			}
		}
	 }
	 for(i=0;i<n;i++)
	 	cout<<a[i]<<' ';
	return 0;
 }
  

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

#include <iostream>
#include <cstdio>
#include <cstdlib>

using namespace std;

const int N = 20000；

int n;
int a[N],b[N];

void solve()
{
	int len = 0;
	for (int i = n; i>= 1; i-=2)
		b[++len] = a[i];
	for (int i = n-1,len = n; i >= 1; i-=2)
		b[len--] = a[i];
	for (int i = 1; i <= n; i++)
		printf("%d ", b[i]);
	printf("\n");
}

void init()
{
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
		scanf("%d", &a[i]);
}

int main()
{
	init();
	solve();
	return 0; 
} 

Compiler output:
a.cc:7:15: error: unable to find numeric literal operator 'operator""\U0000ff1b'
    7 | const int N = 20000；
      |               ^~~~~~~
a.cc:10:7: error: size of array 'a' is not an integral constant-expression
   10 | int a[N],b[N];
      |       ^
a.cc:10:12: error: size of array 'b' is not an integral constant-expression
   10 | int a[N],b[N];
      |            ^
a.cc: In function 'void solve()':
a.cc:15:22: error: 'n' was not declared in this scope
   15 |         for (int i = n; i>= 1; i-=2)
      |                      ^
a.cc:17:22: error: 'n' was not declared in this scope
   17 |         for (int i = n-1,len = n; i >= 1; i-=2)
      |                      ^
a.cc:19:30: error: 'n' was not declared in this scope
   19 |         for (int i = 1; i <= n; i++)
      |                              ^
a.cc: In function 'void init()':
a.cc:26:22: error: 'n' was not declared in this scope
   26 |         scanf("%d", &n);
      |                      ^
Language: C

#include<stdio.h>
int main()
{
	int n,i,j;
	scanf("%d",&n);
	long int b[n]={0};
	long int a[n]={0};
	for(i=0;i<n;i++)
	{
		scanf("%ld",&a[i]);
	}
		for(i=n-1,j=0;i>=0;i=i-2,j++)
		{
			b[j]=a[i];
			if(i!=0)
			b[n-j-1]=a[i-1];
			
		}
		for(i=0;i<n;i++)
		{
			printf("%ld ",b[i]);
		}
		return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:6:23: error: variable-sized object may not be initialized except with an empty initializer
    6 |         long int b[n]={0};
      |                       ^
main.c:7:23: error: variable-sized object may not be initialized except with an empty initializer
    7 |         long int a[n]={0};
      |                       ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int a[100], b[100];
	for (int i = 0; i < n; i++)
		cin >> a[i];

	int temp;
    int count = 0;
	for (int k = 0; k < n; k++)
	{
		
		b[count] = a[k];
		for (int x = 0; x <= count/2; x++)
		{
			temp = b[x];
			b[x] = b[count-x];
			b[count - x] = temp;
		}
		count++;
	}
	

	for (int m = 0; m < n; m++)
		cout << b[m] << " " ;
	system("pause");
}#include<iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int a[100], b[100];
	for (int i = 0; i < n; i++)
		cin >> a[i];

	int temp;
    int count = 0;
	for (int k = 0; k < n; k++)
	{
		
		b[count] = a[k];
		for (int x = 0; x <= count/2; x++)
		{
			temp = b[x];
			b[x] = b[count-x];
			b[count - x] = temp;
		}
		count++;
	}
	

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

Compiler output:
a.cc:30:2: error: stray '#' in program
   30 | }#include<iostream>
      |  ^
a.cc:30:3: error: 'include' does not name a type
   30 | }#include<iostream>
      |   ^~~~~~~
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main() {
	int n;
	scanf_s("%d", &n);
	
	int *a, *b, *c;

	a = (int *)malloc(n*sizeof(int));
	b = (int *)malloc(n*sizeof(int));
	c = (int *)malloc(n*sizeof(int));

	for (int i = 0; i < n; i++) {
		int count = 0;

		scanf_s("%d", &a[i]);

		b[i] = a[i];

		for (int j = i; j >= 0; j--) {
			c[count] = b[j];
			count++;
		}
		for (int j = 0; j <= i; j++) {
			b[j] = c[j];
		}
	}

	for (int i = 0; i < n; i++) {
		printf("%d ", b[i]);
	}
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	while (cin >> n)
	{
		for (int i = 1; i <= n; ++i)
		{
			cin >> a[i];
		}
		if (n & 1)
		{
			cout << a[n];
			for (int i = n - 2; i >= 1; i -= 2)
				cout << " " << a[i];
			for (int i = 2; i <= n - 1; i += 2)
				cout << " " << a[i];
			cout << endl;
		}
		else
		{
			cout << a[n];
			for (int i = n - 2; i >= 2; i -= 2)
				cout << " " << a[i];
			for (int i = 1; i <= n - 1; i += 2)
				cout << " " << a[i];
			cout << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: 'a' was not declared in this scope
   10 |                         cin >> a[i];
      |                                ^
a.cc:14:33: error: 'a' was not declared in this scope
   14 |                         cout << a[n];
      |                                 ^
a.cc:23:33: error: 'a' was not declared in this scope
   23 |                         cout << a[n];
      |                                 ^
Language: C++

#include<stdio.h>
int n;
void reverse(int *b, int s)
{
	int t;
	for (int i = 0, j = s; i < j; i++, j--)
	{
		t = b[i]; b[i] = b[j]; b[j] = t;
	}
}
int main()
{
	int *a,*b;
	scanf(" %d", &n);
	a = b = (int*)malloc(n * sizeof(int));
	for (int i = 0; i < n; i++)
		scanf(" %d", &a[i]);
	for (int i = 0; i < n; i++)
	{
		b[i] = a[i];
		reverse(b,i);
	}
	for (int i = 0; i < n; i++)
	{
		printf("%d", b[i]);
		if(i!=n-1) printf(" ");
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'malloc' was not declared in this scope
   15 |         a = b = (int*)malloc(n * sizeof(int));
      |                       ^~~~~~
a.cc:2:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include<stdio.h>
  +++ |+#include <cstdlib>
    2 | int n;
Language: C

#include<stdio.h>
#include<algorithm>
using namespace std;
const int M=2e5+5;
int main()
{
	int n,a[M],b[M],i,j,k=0;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	scanf("%d",&a[i]);
	for(j=n-1;j>=0;j--)
	{
		for(i=j;i!=n;i++)
		b[i-1]=b[i];
		b[n-1]=a[k];
		k++;
		reverse(b+j,b+n);
	}
	for(i=0;i<n-1;i++)
	printf("%d ",b[i]);
	printf("%d",b[n-1]);
	return 0;
	}


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

#include <stdio.h>
int main()
{
	int a[200000], c,x, n, m = 0;
	while (1)
	{
		scanf("%d", &n);
		if (n >= 1 && n <= 200000)
			break;
	}
	int b[20000];
	while (m<n)
	{
		x = 0;
		scanf("%d", &a[m]);
		if (a[m]>1000000000 || a[m]<0)
		{
			continue;
		}
		else {
			m++;
		}
          }
}
if (m / 2 == 1)
			{
				for (c = m - 1; c >= 0; c -= 2)
				{
					b[x] = a[c];
					x++;
				}
				for (c = 1; c <= m; c += 2)
				{
					b[x] = a[c];
					x++;
				}
			}
			else
			{
				for (c = m - 1; c >= 1; c -= 2)
				{
					b[x] = a[c];
					x++;
				}
				for (c = 0; c <= m; c += 2)
				{
					b[x] = a[c];
					x++;
				}
	for (m = 0; m<n - 1; m++)
	{
		printf("%d ", b[m]);
	}
	printf("%d", b[n - 1]);
	return 0;
}

Compiler output:
main.c:25:1: error: expected identifier or '(' before 'if'
   25 | if (m / 2 == 1)
      | ^~
main.c:38:25: error: expected identifier or '(' before 'else'
   38 |                         else
      |                         ^~~~
Language: C

#include <stdio.h>
int main()
{
	int a[200000], c,x, n, m = 0;
	while (1)
	{
		scanf("%d", &n);
		if (n >= 1 && n <= 200000)
			break;
	}
	int b[20000];
	while (m<n)
	{
		x = 0;
		scanf("%d", &a[m]);
		if (a[m]>1000000000 || a[m]<0)
		{
			continue;
		}
		else {
			m++;
			if (m / 2 == 1)
			{
				for (c = m - 1; c >= 0; c -= 2)
				{
					b[x] = a[c];
					x++;
				}
				for (c = 1; c <= m; c += 2)
				{
					b[x] = a[c];
					x++;
				}
			}
			else
			{
				for (c = m - 1; c >= 1; c -= 2)
				{
					b[x] = a[c];
					x++;
				}
				for (c = 0; c <= m; c += 2)
				{
					b[x] = a[c];
					x++;
				}
		}
          }
	for (m = 0; m<n - 1; m++)
	{
		printf("%d ", b[m]);
	}
	printf("%d", b[n - 1]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:55:1: error: expected declaration or statement at end of input
   55 | }
      | ^
Language: C

#include <stdio.h>
int main()
{
	int a[200000], c,x, n, m = 0;
	while (1)
	{
		scanf("%d", &n);
		if (n >= 1 && n <= 200000)
			break;
	}
	int b[20000];
	while (m<n)
	{
		x = 0;
		scanf("%d", &a[m]);
		if (a[m]>1000000000 || a[m]<0)
		{
			continue;
		}
		else {
			m++;
			if (m / 2 == 1)
			{
				for (c = m - 1; c >= 0; c -= 2)
				{
					b[x] = a[c];
					x++;
				}
				for (c = 1; c <= m; c += 2)
				{
					b[x] = a[c];
					x++;
				}
			}
			else
			{
				for (c = m - 1; c >= 1; c -= 2)
				{
					b[x] = a[c];
					x++;
				}
				for (c = 0; c <= m; c += 2)
				{
					b[x] = a[c];
					x++;
				}
		}
	for (m = 0; m<n - 1; m++)
	{
		printf("%d ", b[m]);
	}
	printf("%d", b[n - 1]);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:54:1: error: expected declaration or statement at end of input
   54 | }
      | ^
main.c:54:1: error: expected declaration or statement at end of input
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
	int n;
	scanf_s("%d", &n);
	int *a = new int[n];
	for (int i = 0; i<n; i++)
	{
		scanf_s("%d", a + i);
	}
	int nn = n / 2;
	if (n % 2 == 0)
	{
		for (int i = 0; i<nn; i++)
		{
			printf("%d ", a[n - 2 * i - 1]);
		}
		for (int i = 0; i<nn; i++)
		{
			printf("%d ", a[2 * i]);
		}
	}
	else
	{
		for (int i = 0; i<nn; i++)
		{
			printf("%d ", a[n - 2 * i - 1]);
		}
		printf("%d ", a[0]);
		for (int i = 0; i<nn; i++)
		{
			printf("%d ", a[2 * i + 1]);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int count = input.nextInt();
		ArrayList<Integer> list = new ArrayList<>();
		boolean flag = count%2==0?false:true;
		for(int i = 0; i < count; i++)
		{
			if(flag)
			{
				list.add(input.nextInt());
				flag = !flag;
			} else {
				list.add(0,input.nextInt());
				flag = !flag;
			}
		}
		if(flag)
		{
			for(int i=0; i < list.size(); i++)
			{
				System.out.print(list.get(i)+" ");
			}
		}
		else
		{
			for(int i=list.size()-1; i >= 0; i--)
			{
				System.out.print(list.get(i)+" ");
			}
		}
	}

}


Compiler output:
Main.java:4: error: cannot find symbol
		Scanner input = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner input = new Scanner(System.in);
		                    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		ArrayList<Integer> list = new ArrayList<>();
		^
  symbol:   class ArrayList
  location: class Main
Main.java:6: error: cannot find symbol
		ArrayList<Integer> list = new ArrayList<>();
		                              ^
  symbol:   class ArrayList
  location: class Main
4 errors
Language: C

#include<stdio.h>
int main()
{
    int a[200000],c,t,n,m=0;
   while(1)
{
scanf("%d",&n);
if(n>=1&&n<=200000)
break;
}
int b[n];
   while(m<n)
    {
         scanf("%d",&a[m]);
          if(a[m]>1000000000||a[m]<0)
               {
                continue;
                }
           else{
b[n-b-1]=a[m];
m++;
            }
    }
    printf("%d/n",n);
for(b=n-1;b>=0;b--)
    {printf("%d ",a[b]);}
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:4: error: invalid operands to binary - (have 'int' and 'int *')
   20 | b[n-b-1]=a[m];
      |    ^
      |    |
      |    int *
main.c:25:6: error: assignment to expression with array type
   25 | for(b=n-1;b>=0;b--)
      |      ^
main.c:25:17: error: lvalue required as decrement operand
   25 | for(b=n-1;b>=0;b--)
      |                 ^~
main.c:26:20: error: array subscript is not an integer
   26 |     {printf("%d ",a[b]);}
      |                    ^
Language: C

#include<stdio.h>
int main()
{
    int a[200000],c,t,n,m=0;
   while(1)
{
scanf("%d",&n);
if(n>=1&&n<=200000)
break;
}
int b[n];
   while(m<n)
    {
         scanf("%d",&a[m]);
          if(a[m]>1000000000||a[m]<0)
               {
                continue;
                }
           else{
b[n-b-1]=a[b];
b++;
            }
    }
    printf("%d/n",n);
for(m=n-1;m>=0;m--)
    {printf("%d ",b[m]);}
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:4: error: invalid operands to binary - (have 'int' and 'int *')
   20 | b[n-b-1]=a[b];
      |    ^
      |    |
      |    int *
main.c:20:11: error: array subscript is not an integer
   20 | b[n-b-1]=a[b];
      |           ^
main.c:21:2: error: lvalue required as increment operand
   21 | b++;
      |  ^~
Language: C

#include<stdio.h>
int main()
{
    int a[200000],c,t,n,m=0;
   while(1)
{
scanf("%d",&n);
if(n>=1&&n<=200000)
break;
}
int b[n];
   while(m<n)
    {
         scanf("%d",&a[m]);
          if(a[m]>1000000000||a[m]<0)
               {
                continue;
                }
           else{
b[n-b-1]=a[b];
b++;
            }
    }
    printf("%d/n",n);
for(b=n-1;b>=0;b--)
    {printf("%d ",a[b]);}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:4: error: invalid operands to binary - (have 'int' and 'int *')
   20 | b[n-b-1]=a[b];
      |    ^
      |    |
      |    int *
main.c:20:11: error: array subscript is not an integer
   20 | b[n-b-1]=a[b];
      |           ^
main.c:21:2: error: lvalue required as increment operand
   21 | b++;
      |  ^~
main.c:25:6: error: assignment to expression with array type
   25 | for(b=n-1;b>=0;b--)
      |      ^
main.c:25:17: error: lvalue required as decrement operand
   25 | for(b=n-1;b>=0;b--)
      |                 ^~
main.c:26:20: error: array subscript is not an integer
   26 |     {printf("%d ",a[b]);}
      |                    ^
Language: C

#include<stdio.h>
int main()
{
    int a[200000],c,t,n,b=0;
   while(1)
{
scanf("%d",&n);
if(n>=1&&n<=200000)
break;
}
   while(b<n)
    {
         scanf("%d",&a[b]);
          if(a[b]>1000000000||a[b]<0)
               {
                continue;
                }
           else{
for(c=b;c>=0;c--)
{
   t=a[c];
   a[c]=a[b-c];
   a[b-c]=t;
}
b++;
            }
    }
    printf("%d/n",n);
for(b=0;b<n;b++)
    {printf("%d",a[b]);}
    renturn 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:5: error: 'renturn' undeclared (first use in this function)
   31 |     renturn 0;
      |     ^~~~~~~
main.c:31:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:12: error: expected ';' before numeric constant
   31 |     renturn 0;
      |            ^~
      |            ;
Language: C

#include<stdio,h>
int main()
{
    int a[200000],c,t,n,b=0;
   while(1)
{
scanf("%d",&n);
if(n>=1&&n<=200000)
break;
}
   while(b<n)
    {
         scanf("%d",&a[b]);
          if(a[b]>1000000000||a[b]<0)
               {
                continue;
                }
           else{
for(c=b;c>=0;c--)
{
   t=a[c];
   a[c]=a[b-c];
   a[b-c]=t;
}
b++;
            }
    }
    printf("%d/n",n);
for(b=0;b<n;b++)
    {printf("%d",a[b]);}
    renturn 0;
}

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

#include <iostream>
#include <vector>
#include <queue>
using namespace std;
int main()
{
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i=0; i<n; ++i)
        cin >> a[i];
    
    deque<int> b;
    for(int i=0; i<n; ++i){
        if(i % 2 == 0)
            b.push_back(a[i]);
        else
            b.push_front(a[i]);
    }
    if(n % 2 != 0)
        reverse(b.begin(), b.end());
    
    cout << b[0];
    for(int i=1; i<n; ++i)
        cout << ' ' << b[i];
    cout << endl;
    
    return 0;
}


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

#include<stdio.h>

int main()
{
	int n,i,q;long a[200001];
	while(~scanf("%d",&n))
	{
		for(i=1;i<=n;i++)
		{
			scanf("%ld",&a[i]);
		}
			for(q=n;q>=1;q-=2)
				printf(q==1||q==2?"%ld":"%ld ",a[q]);
			for(n%2==0?q=1:q=2;q<n;q+=2)
				printf(q==n-1?" %ld\n":" %ld",a[q]);
			if(n==1) printf("\n");
	}
}


Compiler output:
main.c: In function 'main':
main.c:14:41: error: lvalue required as left operand of assignment
   14 |                         for(n%2==0?q=1:q=2;q<n;q+=2)
      |                                         ^
Language: Java

class Pushpush {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int count = input.nextInt();
		int[] num = new int[count];
		for(int i = 0; i < count; i++)
		{
			num[i] = input.nextInt();
		}
		Stack<Integer> stack = new Stack<Integer>();
		int[] res =  new int[count];
		
		res[0] = num[0];
		for(int i = 1; i < count; i++)
		{
			stack.clear();
			for(int j = 0; j < i; j++)
			{
				stack.push(res[j]);
			}	
			stack.push(num[i]);
			
			for(int k = 0; k <= i; k++)
			{
				res[k] = stack.pop();
			}			
		}
		
		for(int i = 0; i < count; i++)
		{
			System.out.print(res[i] + " ");
		}
		
		
	}
}


Compiler output:
Main.java:4: error: cannot find symbol
		Scanner input = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Pushpush
Main.java:4: error: cannot find symbol
		Scanner input = new Scanner(System.in);
		                    ^
  symbol:   class Scanner
  location: class Pushpush
Main.java:11: error: cannot find symbol
		Stack<Integer> stack = new Stack<Integer>();
		^
  symbol:   class Stack
  location: class Pushpush
Main.java:11: error: cannot find symbol
		Stack<Integer> stack = new Stack<Integer>();
		                           ^
  symbol:   class Stack
  location: class Pushpush
4 errors
Language: Java

import java.util.Scanner;
import java.util.Stack;

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int count = input.nextInt();
		int[] num = new int[count];
		for(int i = 0; i < count; i++)
		{
			num[i] = input.nextInt();
		}
		Stack<Integer> stack = new Stack<Integer>();
		int[] res =  new int[count];
		
		res[0] = num[0];
		for(int i = 1; i < count; i++)
		{
			stack.clear();
			for(int j = 0; j < i; j++)
			{
				stack.push(res[j]);
			}	
			stack.push(num[i]);
			
			for(int k = 0; k <= i; k++)
			{
				res[k] = stack.pop();
			}			
		}
		
		for(int i = 0; i < count; i++)
		{
			System.out.print(res[i] + " ");
		}
		
		
	}


Compiler output:
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;
import java.util.Stack;

public class Pushpush {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int count = input.nextInt();
		int[] num = new int[count];
		for(int i = 0; i < count; i++)
		{
			num[i] = input.nextInt();
		}
		Stack<Integer> stack = new Stack<Integer>();
		int[] res =  new int[count];
		
		res[0] = num[0];
		for(int i = 1; i < count; i++)
		{
			stack.clear();
			for(int j = 0; j < i; j++)
			{
				stack.push(res[j]);
			}	
			stack.push(num[i]);
			
			for(int k = 0; k <= i; k++)
			{
				res[k] = stack.pop();
			}			
		}
		
		for(int i = 0; i < count; i++)
		{
			System.out.print(res[i] + " ");
		}
		
		
	}
}

Compiler output:
Main.java:4: error: class Pushpush is public, should be declared in a file named Pushpush.java
public class Pushpush {
       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.Stack;

public class Pushpush {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int count = input.nextInt();
		int[] num = new int[count];
		for(int i = 0; i < count; i++)
		{
			num[i] = input.nextInt();
		}
		Stack<Integer> stack = new Stack<Integer>();
		int[] res =  new int[count];
		
		res[0] = num[0];
		for(int i = 1; i < count; i++)
		{
			stack.clear();
			for(int j = 0; j < i; j++)
			{
				stack.push(res[j]);
			}	
			stack.push(num[i]);
			
			for(int k = 0; k <= i; k++)
			{
				res[k] = stack.pop();
			}			
		}
		
		for(int i = 0; i < count; i++)
		{
			System.out.print(res[i] + " ");
		}
		
		
	}

Compiler output:
Main.java:39: error: reached end of file while parsing
	}
	 ^
1 error