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

#include <iostream>
using namespace std;
 
int main(){
	int N, cur;
  	cin >> N;
  	int arr[N+1];
  	for(int i=1; i<=N; i++) {
		cin >> cur;
      	arr[i] = N - cur + 1;
    }
  	for(int i=1; i<=N; i++){
    	for(int j=1; j<=N: j++){
        	if(arr[j]==i)
          		cout << j << " ";
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   13 |         for(int j=1; j<=N: j++){
      |                      ^
a.cc:13:26: error: found ':' in nested-name-specifier, expected '::'
   13 |         for(int j=1; j<=N: j++){
      |                          ^
      |                          ::
a.cc:13:25: error: 'N' is not a class, namespace, or enumeration
   13 |         for(int j=1; j<=N: j++){
      |                         ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:10: error: expected ';' before '}' token
   16 |         }
      |          ^
      |          ;
   17 |     }
      |     ~     
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:10: error: expected ')' before '}' token
   16 |         }
      |          ^
      |          )
   17 |     }
      |     ~     
a.cc:13:12: note: to match this '('
   13 |         for(int j=1; j<=N: j++){
      |            ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int N, cur;
  	cin >> N;
  	int arr[N+1];
  	for(int i=1; i<=N; i++) {
		cin >> cur;
      	arr[i] = N - cur + 1;
    }
  	for(int i=1; i<=N; i++){
    	for(int j=1; j<=N: j++){
        	if(arr[j]==i);
          		cout << j << " ";
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   13 |         for(int j=1; j<=N: j++){
      |                      ^
a.cc:13:26: error: found ':' in nested-name-specifier, expected '::'
   13 |         for(int j=1; j<=N: j++){
      |                          ^
      |                          ::
a.cc:13:25: error: 'N' is not a class, namespace, or enumeration
   13 |         for(int j=1; j<=N: j++){
      |                         ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:10: error: expected ';' before '}' token
   16 |         }
      |          ^
      |          ;
   17 |     }
      |     ~     
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:10: error: expected ')' before '}' token
   16 |         }
      |          ^
      |          )
   17 |     }
      |     ~     
a.cc:13:12: note: to match this '('
   13 |         for(int j=1; j<=N: j++){
      |            ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct{
    int num;
    int elvbefor;
}eleve;
static int compare (eleve const *a, eleve const *b)
{
   return a->elvbefor - b->elvbefor;
}
int main() {
  int N;
  eleve tab[100000];
  memset(tab,100001,sizeof(eleve));
  scanf("%d",&N);
  for (int i = 0; i < N; i++) {
    scanf("%d",&tab[i].elvbefor);
    tab[i].num=i+1;
  }
  qsort(tab,N, sizeof(eleve),compare);
  for (int i = 0; i < N; i++) {
    printf("%d ",tab[i].num);
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:30: error: invalid conversion from 'int (*)(const eleve*, const eleve*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive]
   21 |   qsort(tab,N, sizeof(eleve),compare);
      |                              ^~~~~~~
      |                              |
      |                              int (*)(const eleve*, const eleve*)
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/stdlib.h:36,
                 from a.cc:2:
/usr/include/stdlib.h:971:34: note:   initializing argument 4 of 'void qsort(void*, size_t, size_t, __compar_fn_t)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct{
    int num;
    int elvbefor;
}eleve;
static int compare (void const *a, void const *b)
{
   eleve const *pa = a;
   eleve const *pb = b;
   return pa->elvbefor - pb->elvbefor;
}
int main() {
  int N;
  eleve tab[100000];
  memset(tab,100001,sizeof(eleve));
  scanf("%d",&N);
  for (int i = 0; i < N; i++) {
    scanf("%d",&tab[i].elvbefor);
    tab[i].num=i+1;
  }
  qsort(tab,N, sizeof(eleve),compare);
  for (int i = 0; i < N; i++) {
    printf("%d ",tab[i].num);
  }
  return 0;
}


Compiler output:
a.cc: In function 'int compare(const void*, const void*)':
a.cc:10:22: error: invalid conversion from 'const void*' to 'const eleve*' [-fpermissive]
   10 |    eleve const *pa = a;
      |                      ^
      |                      |
      |                      const void*
a.cc:11:22: error: invalid conversion from 'const void*' to 'const eleve*' [-fpermissive]
   11 |    eleve const *pb = b;
      |                      ^
      |                      |
      |                      const void*
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> ans(N);
  for(int i=0; i<N; i++){
    ans.at(a.at(i)-1) = i+1;
  }
  for(int i=0; i<N; i++){
    cout << ans.at(i) << " ";
  }
  cout << endl;
  return 0

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: expected ';' at end of input
   19 |   return 0
      |           ^
      |           ;
a.cc:19:11: error: expected '}' at end of input
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>#include <vector>using namespace std;int main(){ int N;cin>>N; vector<int> A(N);for(int i=0;i<N;i++) cin>>A[i];vector<int> rev(N);for(int i=0;i<N;i++) rev[A[i]-1]=i+1; for(int i=0;i<N;i++)
  cout<<rev[i]<<endl; return 0;}


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <iostream>#include <vector>using namespace std;int main(){ int N;cin>>N; vector<int> A(N);for(int i=0;i<N;i++) cin>>A[i];vector<int> rev(N);for(int i=0;i<N;i++) rev[A[i]-1]=i+1; for(int i=0;i<N;i++)
      |                    ^
a.cc:2:3: error: 'cout' does not name a type
    2 |   cout<<rev[i]<<endl; return 0;}
      |   ^~~~
a.cc:2:23: error: expected unqualified-id before 'return'
    2 |   cout<<rev[i]<<endl; return 0;}
      |                       ^~~~~~
a.cc:2:32: error: expected declaration before '}' token
    2 |   cout<<rev[i]<<endl; return 0;}
      |                                ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define ll long long 
#define lf long double
#define F first
#define S second
typedef vector <ll> vi;
typedef vector <pair <ll,ll> > vii;
int main() 
{
	ll n,k;
	cin>>n;
	vii a(n);
	for(ll i=0;i<n;i++)
	{
		cin>>a[i].F;
		a[i].S=i+1;
	}
	sort(a.begin(),a.end());
	for(ll i=0;i<n;i++)
	{
		cout<<a[i].S<<" ";
	}
	cout<<endl;
	}
}

Compiler output:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C

#include <stdio.h>

int main()
{
  int i;
  int in;
  int N;

  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&in);
    bango[in] = i+1;
  }

  for(i=0;i<N;i++){
    printf("%d ",bango[i]);
  }
  printf("\n");

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:5: error: 'bango' undeclared (first use in this function)
   13 |     bango[in] = i+1;
      |     ^~~~~
main.c:13:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define ll long long 
#define lf long double
#define F first
#define S second
typedef vector <ll> vi;
typedef vector <pair <ll,ll> > vii;
int main() 
{
	ll n,k;
	cin>>n;
	vii a(n);
	for(ll i=0;i<n;i++)
	{
		cin>>a[i].F;
		a[i].S=i+1;
	}
	sort(a.begin(),a.end());
	for(ll =i0;i<n;i++)
	{
		cout<<a[i].S<<" ";
	}
	cout<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: expected unqualified-id before '=' token
   21 |         for(ll =i0;i<n;i++)
      |                ^
a.cc:21:16: error: expected ';' before '=' token
a.cc:21:16: error: expected primary-expression before '=' token
a.cc:21:17: error: 'i0' was not declared in this scope; did you mean 'y0'?
   21 |         for(ll =i0;i<n;i++)
      |                 ^~
      |                 y0
a.cc:21:20: error: 'i' was not declared in this scope
   21 |         for(ll =i0;i<n;i++)
      |                    ^
a.cc:21:23: error: expected ')' before ';' token
   21 |         for(ll =i0;i<n;i++)
      |            ~          ^
      |                       )
a.cc:21:24: error: 'i' was not declared in this scope
   21 |         for(ll =i0;i<n;i++)
      |                        ^
a.cc: At global scope:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <iostream>
#include <string>
typedef long long ll;
//#include <algorithm>
using namespace std;

int main() {
  int N;
  cin >> N;

  int student[N];

  for(int i = 0; i < N; i++){
      int a;
      cin >> a;

      student[a] = i;
  }

  for(int i = 0; i < N; i++){
      cout << student[a] << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: 'a' was not declared in this scope
   21 |       cout << student[a] << endl;
      |                       ^
Language: C++

#include <iostream>
#include <queue>
#include <vector>

using namespace std;

#define MAX(a, b)	(((a) < (b)) ? (b) : (a))

struct Seito {
	int no;
	int	num;
};

bool comp(const Seito &a, const Seito &b)
{
	return a.num < b.num;
}

int main()
{
	int N;
	cin >> N;

	vector<Seito> A(N);
	for (int i = 0; i < N; i++) {
		A[i].no = i;
		cin >> A[i].num;
	}

	sort(A.begin(), A.end(), comp);
	
	for (int i = 0; i < N; i++) {
		cout << A[i].no + 1 << '\n';
	}

	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   30 |         sort(A.begin(), A.end(), comp);
      |         ^~~~
      |         short
Language: C++

#include <iostream>
#include <queue>

using namespace std;

#define MAX(a, b)	(((a) < (b)) ? (b) : (a))

struct Seito {
	int no;
	int	num;
};

bool comp(const Seito &a, const Seito &b)
{
	return a.num < b.num;
}

int main()
{
	int N;
	cin >> N;

	vector<Seito> A(N);
	for (int i = 0; i < N; i++) {
		A[i].no = i;
		cin >> A[i].num;
	}

	sort(A.begin(), A.end(), comp);
	
	for (int i = 0; i < N; i++) {
		cout << A[i].no + 1 << '\n';
	}

	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   29 |         sort(A.begin(), A.end(), comp);
      |         ^~~~
      |         short
Language: C++

#include <bits/stdc++.h>
#include "debug.hpp"
using namespace std; 
#define FAST_IO std::ios::sync_with_stdio(false);std::cin.tie(0);  

struct st
{
  int num, id;
  st(int a, int b) : num(a), id(b) { }
  st() {  }
};


int main(int argc, char** argv) { FAST_IO
  int n; cin >> n;
  vector<st> v(n);
  for (int i = 1; i <= n; ++i) {
    int num; cin >> num; v[i-1] = st(num, i);
  }
  sort(v.begin(), v.end(), [&](st a, st b) {
    return a.num < b.num;
  });
  for (auto& x : v) cout << x.id << " ";


  return 0; 
}


Compiler output:
a.cc:2:10: fatal error: debug.hpp: No such file or directory
    2 | #include "debug.hpp"
      |          ^~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;

class Main{

    public static void main(String[] args){

	Scanner sc = new Scanner(System.in);

	int N = sc.nextInt();

	int[] A = new int[N];

	for(int i=0; i<N; i++){

	A[i] = sc.nextInt();	

	B[A[i]-1] = i+1;

  }

	for(int i=0; i<N; i++){

	System.out.pritnln(B[i]);	

  }
	  
 }
}

Compiler output:
Main.java:17: error: cannot find symbol
	B[A[i]-1] = i+1;
	^
  symbol:   variable B
  location: class Main
Main.java:23: error: cannot find symbol
	System.out.pritnln(B[i]);	
	                   ^
  symbol:   variable B
  location: class Main
2 errors
Language: C

#Include<stdio.h>

int main()
{
  int n,a[100001],b[100001];
  scanf("%d",&n);
  for(int i=0;i<n;i++)
    {
      scanf("%d",&a[i]);
    }
  for(int i=0;i<n;i++)
    b[a[i]-1]=i+1;//配列は０からはじまるので、a[i]-1であり、i+1である
  for(int i=0;i<n;i++){
    printf("%d",b[i]);
  }
  return 0;
  
  
}


Compiler output:
main.c:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #Include<stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d",&n);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |     printf("%d",b[i]);
      |     ^~~~~~
main.c:14:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <iostream>
#include <vector>

int main()
{
        int n;
        vector<int> a(n);

        std::cin >> n;

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

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

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

        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
    7 |         vector<int> a(n);
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:7:16: error: expected primary-expression before 'int'
    7 |         vector<int> a(n);
      |                ^~~
a.cc:12:29: error: 'a' was not declared in this scope
   12 |                 std::cin >> a[i];
      |                             ^
a.cc:15:16: error: expected primary-expression before 'int'
   15 |         vector<int> b(n);
      |                ^~~
a.cc:16:36: error: 'b' was not declared in this scope
   16 |         for (int i = 0; i < n;i++) b[a[i]-1]=i+1;
      |                                    ^
a.cc:16:38: error: 'a' was not declared in this scope
   16 |         for (int i = 0; i < n;i++) b[a[i]-1]=i+1;
      |                                      ^
a.cc:18:50: error: 'b' was not declared in this scope
   18 |         for (int i = 0; i < n; i++) std::cout << b[i] << std::endl;
      |                                                  ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<int>A(N);
  for (int i=0;i<N;++i){
    cin A[i];
  }
  vector<int>rev(N);
  for (int i=0;i<N;++i){
    rev[A[i]]-1=i+1;
  }
  for (int i=0;i<N;++i){
    cout<<rev[i]<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before 'A'
    9 |     cin A[i];
      |        ^~
      |        ;
a.cc:13:14: error: lvalue required as left operand of assignment
   13 |     rev[A[i]]-1=i+1;
Language: C++

#include<iostream>
using namespace std;
int n, ;
pair<int, int> a[100000];
int main()
{
	cin>>n;
	for(i=0; i<n; i++)
	{
		cin>>a[i].first;
		a[i].second=i;
	}
	sort(a, a+n);
	for(i=0; i<n; i++)
	{
		cout<<a[i].second<<" ";
	}
	cout<<endl;
	return 0;
}


Compiler output:
a.cc:3:8: error: expected unqualified-id before ';' token
    3 | int n, ;
      |        ^
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         for(i=0; i<n; i++)
      |             ^
a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |         sort(a, a+n);
      |         ^~~~
      |         short
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         for(i=0; i<n; i++)
      |             ^
Language: C++

#include<iostream>
#indlude<vector>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a[i] = x - 1;
  }
  for (int x : a) cout << x << " ";
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #indlude; did you mean #include?
    2 | #indlude<vector>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> a(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #indlude<vector>
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> a(n);
      |          ^~~
a.cc:11:5: error: 'a' was not declared in this scope
   11 |     a[i] = x - 1;
      |     ^
a.cc:13:16: error: 'a' was not declared in this scope
   13 |   for (int x : a) cout << x << " ";
      |                ^
Language: C++

#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n);++i)
using namespace std;

int main(){
    int N;
    cin >> N;
    vector<int> a(n);
    rep(i, n) cin >> a[i];
    vector<int> ans(n);
    rep(i, n) ans[a[i] - 1] = i + 1;
    rep(i, n) cout << ans[i] << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'n' was not declared in this scope
    9 |     vector<int> a(n);
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b);
int main(){
    long long a,b;
    cin>>a>>b;
    long long n=gcd(a,b);
    //cout<<n<<endl;
    vector<int> prime(1000001,0);
    int ans=1;
    for(int i=2;i*i<=n);i++){
        //cout<<i<<" "<<n<<endl;
        while(n%i==0){
            n/=i;
        }
        ans++;
    }
    if(n!=1)ans++;
    cout<<ans<<endl;
    return 0;
}

long long gcd(long long a, long long b){
    if(b==0)return a;
    else return gcd(b,a%b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before ')' token
   11 |     for(int i=2;i*i<=n);i++){
      |                       ^
      |                       ;
a.cc:11:25: error: 'i' was not declared in this scope
   11 |     for(int i=2;i*i<=n);i++){
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main()
{
    int N;
    cin >> N;
    vector<int> A(N),B(N,0);
    rep(i,N){cin >> A.at(i);}

    rep(i,N)B.at(A(i)) = i;
    
    rep(i,N)cout << B.at(i) << " ";
    cout << endl;
}

/*
    int order=0;
    while(order<N){
        rep(i,N){
            if(A.at(i)==order+1){
                B.at(order) = i+1;
                order++;
            }
        }
    }
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: no match for call to '(std::vector<int>) (int&)'
   12 |     rep(i,N)B.at(A(i)) = i;
      |                  ~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool sec(const pair<int, int>& a, const pair<int, int>& b {
	return a.second < b.second;
}
#define all(c) c.begin(), c.end()
int main() {
	int n;
  cin >> n;
  vector<pair<int, int>> v(n);
  for (int i=0; i<n; i++) {
  	v[i].first = i+1;
    cin >> v[i].second;
  }
  sort(all(v), sec);
  for (int i=0; i<n; i++)
    cout << v[i].first << ' ';
  
	return 0;
}

Compiler output:
a.cc:3:58: error: expected ')' before '{' token
    3 | bool sec(const pair<int, int>& a, const pair<int, int>& b {
      |         ~                                                ^~
      |                                                          )
Language: C++

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

int main(){
	int n;
  	cin >> n;
  	vector<int> a(n);
  	for(int i=0;i<n;i++) cin >> a[i];
  
  	vector<int> rev(n);
  	for(int i=0;i<n;i++) rev[a(i)-1] = i+1;
  	for(int i=0;i<n;i++) cout << rev[i]<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:35: error: no match for call to '(std::vector<int>) (int&)'
   12 |         for(int i=0;i<n;i++) rev[a(i)-1] = i+1;
      |                                  ~^~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> A(N);
  vector<int> B(N);
  for(int i=0;i<N;i++){
    cin >> A[i];
    b[i] = i;
  }
  for(int j=0;j<N;j++){
    if(j!=N-1){
    cout << B[A[j]];
    }else if(j==N-1){
      cout << B[A[j]]<<endl;
    }
  }
  
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'b' was not declared in this scope
   11 |     b[i] = i;
      |     ^
Language: Java

import java.util.*;
class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int[] ret = new int[a];
        int wk;
        for(int i =0;i<a;i++){
            wk =Integer.parseInt(sc.next())
            ret[wk-1] = i;
        }
        String retstr = "";
        for(int x : ret){
            retstr = String.valueOf(x);
        }
        System.out.println(retstr.trim());
        sc.close();
    }
}



Compiler output:
Main.java:9: error: ';' expected
            wk =Integer.parseInt(sc.next())
                                           ^
1 error
Language: C++

include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int N, A;
  cin >> N;
  pair<int, int> P[N];
  rep(i, N){
    cin >> A;
    P[i]=make_pair(A, i+1);
  }
  sort(P, P+N);
  rep(i, N){
    cout << P[i].second;
    if(i!=N-1) cout << " ";
    else cout << endl;
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:8:3: error: 'pair' was not declared in this scope
    8 |   pair<int, int> P[N];
      |   ^~~~
a.cc:8:8: error: expected primary-expression before 'int'
    8 |   pair<int, int> P[N];
      |        ^~~
a.cc:11:5: error: 'P' was not declared in this scope
   11 |     P[i]=make_pair(A, i+1);
      |     ^
a.cc:11:10: error: 'make_pair' was not declared in this scope
   11 |     P[i]=make_pair(A, i+1);
      |          ^~~~~~~~~
a.cc:13:8: error: 'P' was not declared in this scope
   13 |   sort(P, P+N);
      |        ^
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(P, P+N);
      |   ^~~~
      |   short
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << P[i].second;
      |     ^~~~
a.cc:17:18: error: 'endl' was not declared in this scope
   17 |     else cout << endl;
      |                  ^~~~
Language: C++

#include <vector>
#include <list>
#include <string>
#include <iostream>
#define FOR(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define FORUL(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#define FORULE(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define FOREACH(it, X) for(__typeof((X).begin()) it = (X).begin(); it != (X).end(); it++)
#if defined(_MSC_VER) || __cplusplus > 199711L
#define AUTOVAR(newvar,v) auto newvar = (v)
#else
#define AUTOVAR(newvar,v) __typeof(newvar) r = (v)
#endif
#define PB(x) push_back(x)
#define MP(x,y) make_pair((x),(y))
#define MEMSET(m,v) memset(m,v,sizeof(m))

typedef long long				 ll;
typedef unsigned long long		ull;

#define DEBUG 1

#if DEBUG
#define DOUT cout<<"["<<__LINE__<<"]:"
#else
#define DOUT 0 && cout
#endif

using namespace std;

#define MAXN (1000*100)
int N;
// int A[MAXN+5];

typedef struct A {
	int id;
	int num;
} A;

A a[MAXN+5];

bool Acomp(const A &lhs, const A &rhs)
{
	if (lhs.num<rhs.num) {
		return true;
	}
	return false;
}

int main(int argc, char *argv[])
{
	ios::sync_with_stdio(false);
	
	cin >> N;
	FOR(n,N) {
		cin >> a[n].num;
		a[n].id = n;
	}

	sort(&a[0], &a[N], Acomp);

	FOR(n,N) {
		cout << a[n].id+1 << " ";
	}
	cout << endl;

	return 0;
}




Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:60:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   60 |         sort(&a[0], &a[N], Acomp);
      |         ^~~~
      |         short
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> A(N);
  rep(i,N) cin >> A[i];
  vector<int> rev(N);
  rep(i,N) rev[A[i] - 1] = i + 1;
  rep(i,N) cout<<rev[i]<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   rep(i,N) cin >> A[i];
      |       ^
a.cc:8:3: error: 'rep' was not declared in this scope
    8 |   rep(i,N) cin >> A[i];
      |   ^~~
Language: C

include <stdio.h>



int main(void){
	int N, i, q;
	int a[10*10*10*10*10];
	int b[10*10*10*10*10];
	
	
	
		scanf("%d", &N);
		
	
	
		
	for(i=0; i<N;i++){
		
			scanf("%d", &a[i]);
		
	}
for(i=0; i<N; i++){
	q = a[i];
	q -= 1;
	b[q]= i+1;
}

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


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

#include <stdio.h>



int main(void){
	int N, i, q;
	int a[10*10*10*10*10];
	int b[10*10*10*10*10];
	
	
	do{
		scanf("%d", &N);
	}while(N < 1|| N > 10*10*10*10*10);
	
		
	for(i=0; i<N;i++){
		do{
			scanf("%d", &a[i]);
		}while(a[i] < 0 || a[i]> 100);
	}
for(i=0; i<N; i++){
	q = a[i];
	q -= 1;
	b[q]= i+1;
}

	
for(i=0;i<N; i++){
	printf("%d ", b[i]);
}
return 0;
}
		#include <stdio.h>



int main(void){
	int N, i, q;
	int a[10*10*10*10*10];
	int b[10*10*10*10*10];
	
	
	do{
		scanf("%d", &N);
	}while(N < 1|| N > 10*10*10*10*10);
	
		
	for(i=0; i<N;i++){
		do{
			scanf("%d", &a[i]);
		}while(a[i] < 0 || a[i]> 100);
	}
for(i=0; i<N; i++){
	q = a[i];
	q -= 1;
	b[q]= i+1;
}

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

Compiler output:
a.cc:37:5: error: redefinition of 'int main()'
   37 | int main(void){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(void){
      |     ^~~~
Language: C++

// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>
#include<vector>

using namespace std;

int main()
{
    int n;
    cin>>n;
    vector<pair<int,int>>a(n);
    for(int i=1;i<=n;++i){
        int s;
        cin>>s;
        a[i-1]={s,i};
    }
    sort(a.begin(),a.end());
    for(auto x:a){
        cout<<x.second<<endl;
    }
}


// GCC reference:
//   https://gcc.gnu.org/

// C++ language references:
//   https://cppreference.com/
//   https://isocpp.org/
//   http://www.open-std.org/jtc1/sc22/wg21/

// Boost libraries references:
//   https://www.boost.org/doc/


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int N = sc.nextInt();

            Map<Integer, Integer> mMap = new HashMap<Integer, Integer>();
            for (int i = 0; i < N; i++) {
                mMap.put( sc.nextInt(), i + 1);
            }

            // キーでソートする
            Object[] mapkey = mMap.keySet().toArray();
            Arrays.sort(mapkey);

            for (Integer nKey : mMap.keySet())
            {
                System.out.println(mMap.get(nKey));
            }
        }
    }
}

Compiler output:
Main.java:5: error: illegal start of expression
        public static void main(String[] args) {
        ^
Main.java:24: error: class, interface, enum, or record expected
}
^
2 errors
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(N);
  for(int i=0;i<N;i++){
    B.at(A.at(i)-1)=i+1
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before '}' token
   13 |     B.at(A.at(i)-1)=i+1
      |                        ^
      |                        ;
   14 |   }
      |   ~
Language: C

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

int cmp( const void *p, const void *q ) {
    return ((stu*)p)->ban - ((stu*)q)->ban;
}

typedef struct {
  int num;
  int ban;
} stu;

int main(){
  int i,j,k,N;
  scanf("%d",&N);
  stu A[N];
  for(i=0;i<N;i++){
  scanf("%d ",&A[i].ban);
    A[i].num=i;
  }
  qsort(A,N,sizeof(stu),cmp);
  for(i=0;i<N;i++){
    printf("%d ",&A[i].num);
  }
  puts("");
  return 0;
}
  

Compiler output:
main.c: In function 'cmp':
main.c:5:14: error: 'stu' undeclared (first use in this function)
    5 |     return ((stu*)p)->ban - ((stu*)q)->ban;
      |              ^~~
main.c:5:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:18: error: expected expression before ')' token
    5 |     return ((stu*)p)->ban - ((stu*)q)->ban;
      |                  ^
main.c:5:35: error: expected expression before ')' token
    5 |     return ((stu*)p)->ban - ((stu*)q)->ban;
      |                                   ^
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++){
      int tmp;cin>>tmp;
      A[tmp-1]=i+1;
  }
  for(int i=0;i<N;i++){
      cout<<A[i]<<" ";
  }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: expected initializer before '>>' token
    5 |   int N, cin>>N;
      |             ^~
Language: C++

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

int main() {
  int N;
  cin >> N;

  int A[i];
  for (int i = 0; i < N; i++) cin >> A[i];

  map<int, int> students;
  for (int i = 0; i < N; i++) {
    students[A[i] - 1] = i + 1;
  }

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

  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |   int A[i];
      |         ^
a.cc:9:38: error: 'A' was not declared in this scope
    9 |   for (int i = 0; i < N; i++) cin >> A[i];
      |                                      ^
a.cc:13:14: error: 'A' was not declared in this scope
   13 |     students[A[i] - 1] = i + 1;
      |              ^
Language: C

#include<stdio.h>
int main(void){
    int n,i=0,k=0;
    int students[100000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
    scanf("%d",&students[i])
    }
    int z;
    if(n>1){
    for(k=0;k<n;k++){
    for(i=k;i<n-1;i++){
    if(students[i]>students[i+1]){
      z = students[i];
      students[i] = students[i+1];
      students[i+1] = students[i];
    }    
    }
    }
    for(i=0;i<n;i++){
        printf("%d",students[i]);
    }
    }
    else{
        printf("%d",students[0])
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:29: error: expected ';' before '}' token
    7 |     scanf("%d",&students[i])
      |                             ^
      |                             ;
    8 |     }
      |     ~                        
main.c:25:33: error: expected ';' before '}' token
   25 |         printf("%d",students[0])
      |                                 ^
      |                                 ;
   26 |     }
      |     ~
Language: C

#include<stdio.h>
int main(void){
    int n,i=0,k=0;
    int students[100000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
    scanf("%d",&students[i])
    }
    int z;
    if(n>1){
    for(k=0;k<n;k++){
    for(i=k;i<n-1;i++){
    if(students[i]>students[i+1]){
      z = students[i];
      students[i] = students[i+1];
      students[i+1] = students[i];
    }    
    }
    }
    for(i=0;i<n;i++){
        printf("%d",&students[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:29: error: expected ';' before '}' token
    7 |     scanf("%d",&students[i])
      |                             ^
      |                             ;
    8 |     }
      |     ~                        
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
  int n;
  cin>>n;
  vector<int> a(n);
  rep(i,n){
    cin>>a.at(i);
  }
  rep(j,n){
    int s=0,t=n-1;
    while(j+1!=a.at(s) && j+1!=a.at(t)){
      s++;
      t--;
    }
      if(j+1!=a.at(s)){
        cout<<t+1<<ebdl;
      }
    else{
      cout<<s+1<<endl;
    }
    }
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'ebdl' was not declared in this scope
   18 |         cout<<t+1<<ebdl;
      |                    ^~~~
Language: C++

#include <cstddef>
#include <limits>
#include <climits>
#include <cfloat>
#include <cstdint>
#include <cstdlib>
#include <new>
#include <typeinfo>
#include <exception>
#include <initializer_list>
#include <cstdalign>
#include <stdexcept>
#include <cassert>
#include <cerrno>
#include <system_error>
#include <string>

#if __has_include(<string_view>)
#   include <string_view>
#endif

#include <array>
#include <deque>
#include <forward_list>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <iterator>
#include <algorithm>
#include <cfenv>
#include <random>
#include <numeric>
#include <cmath>
#include <iosfwd>
#include <iostream>
#include <ios>
#include <streambuf>
#include <istream>
#include <ostream>
#include <iomanip>
#include <sstream>
#include <fstream>

#if __has_include(<filesystem>)
#   include <filesystem>
#endif

#include <cstdio>
#include <cinttypes>


#include <regex>
#include <atomic>
#include <thread>
#include <mutex>
#include <shared_mutex>
#include <condition_variable>
#include <future>

using namespace std::literals ;
using namespace std;

int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);

    unsigned int N;
    cin >> N;

    vector<unsigned int> A;
    int input;
    while (cin >> input) {
        A.push_back(input);
        if (A.size() == N)
            break;
    }

    // unsigned array[N];
    for (unsigned int i = 1; i <= N; i++) {
        // unsigned order = A[i];
        // array[order] = i;
        vector<unsigned int>::iterator it = find(A.rbegin(), A.rend(), i);
        cout << it - A.begin() + 1;
        if (i == N)
            break;
        cout << " ";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:87:49: error: conversion from 'std::reverse_iterator<__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int> > >' to non-scalar type 'std::vector<unsigned int>::iterator' requested
   87 |         vector<unsigned int>::iterator it = find(A.rbegin(), A.rend(), i);
      |                                             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
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];
  }
  for(int i=1;i<=n;i++){
    int x=a[j];
    for(int j=0;j<n;j++){
      if(i==x){
        cout << j+1 << " " ;
        break;
    }
  }}
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'j' was not declared in this scope
   12 |     int x=a[j];
      |             ^
Language: C++


#include <iostream>
#include<vector>

#include <algorithm>
#include<string.h>




using namespace std;

int findIndex( int value )
{
    auto iter = std::find( vec.begin(), vec.end(), value);
    size_t index = std::distance( vec.begin(), iter );
    if(index == vec.size())
        {
            return -1;
        }
    return index;
}

int main (){
int n,k,q;
  int t=0;

  cin>>n;
  
 
  
std::vector<int> vec(n+1);

vector<int> tt(n+1);

for(int i=1; i<n+1; i++){
    cin>>vec.at(i);
tt.at(i)=vec.at(i);
}
  sort(vec.begin(),vec.end());
  //reverse(vec.begin(),vec.end());

for(int i=1; i<n+1; i++){


int  pos =findIndex(i);

cout<<pos<<endl;
  

  }


  
  
  

  
  
}


Compiler output:
a.cc: In function 'int findIndex(int)':
a.cc:15:28: error: 'vec' was not declared in this scope
   15 |     auto iter = std::find( vec.begin(), vec.end(), value);
      |                            ^~~
Language: C

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

int main()
{
	int n, i, j, pom;
	scanf("%d", &n);
	int a[n+1];
	for(i=0; i<n; i++){
		scanf("%d", &a[i]);
	}
	
	for(j=1; j<=n; j++){
		for(i=0; i<n; i++){
			if(a[i]==j){
				pom=i;
			}
		}
		a[pom]=n+2;
		printf("%d ", pom+1);
		min=n+1;
	}

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:17: error: 'min' undeclared (first use in this function); did you mean 'main'?
   21 |                 min=n+1;
      |                 ^~~
      |                 main
main.c:21:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
   int a, b;
   cin >> a;
   int arr[a];
   for(int i=0; i<a; i++){
      cin >> b;
      int[b-1]=i+1;
   }
  for(int i=0; i<a; i++){
     cout << arr[i] << ' ';
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ']' before '-' token
   10 |       int[b-1]=i+1;
      |            ^
      |            ]
a.cc:10:10: error: structured binding declaration cannot have type 'int'
   10 |       int[b-1]=i+1;
      |          ^
a.cc:10:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:10: error: cannot decompose non-array non-class type 'int'
Language: C++

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

int main() {
  
  int N;
  cin >> N;
  vector<int> A(N);
  int num = 1;
  int k;
  int num2 = 1;
  
  for(int i = 0;i < N;++i){
    cin >> A[i];
  }
  
  while(num < N + 1){
    for(k = 0;k < N;++k){
      if(A[k] == num){
        cout << k + 1;
        cout << " ";
        ++num;
      }
     }
    else if(num == k){
      break;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'else' without a previous 'if'
   25 |     else if(num == k){
      |     ^~~~
Language: C++

#include <iostream>
#include <malloc.h>
int main()
{

	int n;
	scanf_s("%d", &n);
	//int count = 0;
	int* x = (int*)malloc(sizeof(int)*n);
	for (int m = 0; m < n; m++) {
		scanf("%d", x + m);
	}
	for (int k = 1; k <= n; k++) {
		int h = 0;
		while (1) {
			if (k == *(x + h)) {
				printf("%d ", h + 1);
				break;
			}
				h++;
		}
	}
	free(x);
}

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 <bits/stdc++.h>
using namespace std;

int main() {
  
  int N;
  cin >> N;
  vector<int> A(N);
  int num = 1;
  int k;
  int num2 = 1;
  
  for(int i = 0;i < N;++i){
    cin >> A[i];
  }
  
  while(num < K + 1){
    for(k = 0;k < N;++k){
      if(A[k] == num){
        cout << k + 1;
        cout << " ";
        ++num;
      }
     }
    else if(num == k){
      return;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: 'K' was not declared in this scope
   17 |   while(num < K + 1){
      |               ^
a.cc:25:5: error: 'else' without a previous 'if'
   25 |     else if(num == k){
      |     ^~~~
a.cc:26:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   26 |       return;
      |       ^~~~~~
Language: C++

anf("%d",&n);
    int ary[2][n];
    for(int i=0;i<n;i++){
        ary[1][i]=i+1;
        scanf("%d",&ary[0][i]);
    }
    for(int i=0;i<n;i++){
        int j;
        int min=ary[0][i];
        int check=i;
        for(j=i+1;j<n;j++){
            if(min>ary[0][j]){
                check=j;
                min=ary[0][j];
            }
        }
        int c=ary[1][check];
        ary[0][check]=ary[0][i];
        ary[1][check]=ary[1][i];
        ary[0][i]=min;
        ary[1][i]=c;
        printf("%d ",ary[1][i]);
    }
    putchar('\n');
    return 0;
}

Compiler output:
a.cc:1:4: error: expected constructor, destructor, or type conversion before '(' token
    1 | anf("%d",&n);
      |    ^
a.cc:2:16: error: 'n' was not declared in this scope
    2 |     int ary[2][n];
      |                ^
a.cc:3:5: error: expected unqualified-id before 'for'
    3 |     for(int i=0;i<n;i++){
      |     ^~~
a.cc:3:17: error: 'i' does not name a type
    3 |     for(int i=0;i<n;i++){
      |                 ^
a.cc:3:21: error: 'i' does not name a type
    3 |     for(int i=0;i<n;i++){
      |                     ^
a.cc:7:5: error: expected unqualified-id before 'for'
    7 |     for(int i=0;i<n;i++){
      |     ^~~
a.cc:7:17: error: 'i' does not name a type
    7 |     for(int i=0;i<n;i++){
      |                 ^
a.cc:7:21: error: 'i' does not name a type
    7 |     for(int i=0;i<n;i++){
      |                     ^
a.cc:24:12: error: expected constructor, destructor, or type conversion before '(' token
   24 |     putchar('\n');
      |            ^
a.cc:25:5: error: expected unqualified-id before 'return'
   25 |     return 0;
      |     ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++



#include <iostream>
#include<vector>

#include <algorithm>
#include<string.h>




using namespace std;

int main (){
int n,k,q;
  int t=0;

  cin>>n;
  
 
  
std::vector<int> vec(n+1);

vector<int> tt(n+1);

for(int i=1; i<n+1; i++){
    cin>>vec.at(i);
tt.at(i)=vec.at(i);
}
  sort(vec.begin(),vec.end());
  //reverse(vec.begin(),vec.end());

for(int i=1; i<n+1; i++){


auto pos =tt.find(i);

cout<<pos<<endl;
  

  }


  
  
  

  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:14: error: 'class std::vector<int>' has no member named 'find'
   36 | auto pos =tt.find(i);
      |              ^~~~
Language: C

anf("%d",&n);
    int ary[2][n];
    for(int i=0;i<n;i++){
        ary[1][i]=i+1;
        scanf("%d",&ary[0][i]);
    }
    for(int i=0;i<n;i++){
        int j;
        int min=ary[0][i];
        int check=i;
        for(j=i+1;j<n;j++){
            if(min>ary[0][j]){
                check=j;
                min=ary[0][j];
            }
        }
        int c=ary[1][check];
        ary[0][check]=ary[0][i];
        ary[1][check]=ary[1][i];
        ary[0][i]=min;
        ary[1][i]=c;
        printf("%d ",ary[1][i]);
    }
    putchar('\n');
    return 0;
}

Compiler output:
main.c:1:5: error: expected declaration specifiers or '...' before string constant
    1 | anf("%d",&n);
      |     ^~~~
main.c:1:10: error: expected declaration specifiers or '...' before '&' token
    1 | anf("%d",&n);
      |          ^
main.c:2:16: error: 'n' undeclared here (not in a function)
    2 |     int ary[2][n];
      |                ^
main.c:3:5: error: expected identifier or '(' before 'for'
    3 |     for(int i=0;i<n;i++){
      |     ^~~
main.c:3:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    3 |     for(int i=0;i<n;i++){
      |                  ^
main.c:3:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    3 |     for(int i=0;i<n;i++){
      |                      ^~
main.c:7:5: error: expected identifier or '(' before 'for'
    7 |     for(int i=0;i<n;i++){
      |     ^~~
main.c:7:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    7 |     for(int i=0;i<n;i++){
      |                  ^
main.c:7:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    7 |     for(int i=0;i<n;i++){
      |                      ^~
main.c:24:13: error: expected declaration specifiers or '...' before '\xa'
   24 |     putchar('\n');
      |             ^~~~
main.c:25:5: error: expected identifier or '(' before 'return'
   25 |     return 0;
      |     ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
Language: C++

using namespace std;



int main(){
  int N;
  cin >> N;
  vector<int>ans(N);
    for(int i =0; i<N; i++){
    int a;
    cin >> a;
    ans.at(a-1)=i+1;
  }
  for(int k=0; k<N; k++){
    cout<< ans.at(k)<<" ";
  }
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int>ans(N);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int>ans(N);
      |          ^~~
a.cc:12:5: error: 'ans' was not declared in this scope
   12 |     ans.at(a-1)=i+1;
      |     ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<< ans.at(k)<<" ";
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:12: error: 'ans' was not declared in this scope
   15 |     cout<< ans.at(k)<<" ";
      |            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  
   cin >> vector<int> data(N);
  /*for (int i =0; i < N ;i++){
    cin >> data.at(i);  
  }*/
  for (int i =0; i <N; i++){
    for(int j =0; j <N; j++){
      
    if(data.at(j) == i+1 && i == N-1){
      cout << j+1 <<endl;
      break;
    }
    if(data.at(j) == i+1){
      cout << j+1 << " ";
    }
      continue;
    }
    
  }
    
  
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected primary-expression before 'data'
    8 |    cin >> vector<int> data(N);
      |                       ^~~~
a.cc:15:13: error: overloaded function with no contextual type information
   15 |     if(data.at(j) == i+1 && i == N-1){
      |             ^~
a.cc:19:13: error: overloaded function with no contextual type information
   19 |     if(data.at(j) == i+1){
      |             ^~