criyle/codenet-compile-errors huggingface dataset:
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;
  
 
  
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;
pos = strchr(tt, i);

cout<<pos<<endl;
  

  }


  
  
  

  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:13: error: no matching function for call to 'strchr(std::vector<int>&, int&)'
   38 | pos = strchr(tt, i);
      |       ~~~~~~^~~~~~~
In file included from a.cc:8:
/usr/include/string.h:226:14: note: candidate: 'char* strchr(char*, int)'
  226 | extern char *strchr (char *__s, int __c)
      |              ^~~~~~
/usr/include/string.h:226:28: note:   no known conversion for argument 1 from 'std::vector<int>' to 'char*'
  226 | extern char *strchr (char *__s, int __c)
      |                      ~~~~~~^~~
/usr/include/string.h:228:20: note: candidate: 'const char* strchr(const char*, int)'
  228 | extern const char *strchr (const char *__s, int __c)
      |                    ^~~~~~
/usr/include/string.h:228:40: note:   no known conversion for argument 1 from 'std::vector<int>' to 'const char*'
  228 | extern const char *strchr (const char *__s, int __c)
      |                            ~~~~~~~~~~~~^~~
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] data = new int[100000];
    int[] table = new int[100000];
    for(int i = 1;i <= n;i++){
      data[i] = sc.nextInt();
    }
    for(int i = 1;i <= n;i++){
      for(int j = 1;j <= n;j++){

        if(data[i] == j){
          table[j] = i;
        }
      }


Compiler output:
Main.java:17: error: reached end of file while parsing
      }
       ^
1 error
Language: C++

#include<iostream>
#include<map>
#define ll long long
using namespace std;
int main(){
        ll n;  cin>>n;
        int a[n];
        for(ll i=0;i<n;i++) cin>>a[i];
         ll n;  cin>>n;
        int a[n];
        for(ll i=0;i<n;i++) cin>>a[i];
       map<ll,ll> m;
       for(ll i=0;i<n;i++){
        m[a[i]]=i+1;
       }
       for(auto it=m.begin();it != m.end();it++){
        cout<<it->second<<" ";
       }
        cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: redeclaration of 'long long int n'
    9 |          ll n;  cin>>n;
      |             ^
a.cc:6:12: note: 'long long int n' previously declared here
    6 |         ll n;  cin>>n;
      |            ^
a.cc:10:13: error: redeclaration of 'int a [n]'
   10 |         int a[n];
      |             ^
a.cc:7:13: note: 'int a [n]' previously declared here
    7 |         int a[n];
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
struct w2
{
	int xh,rs;
};
wz a[N];
bool cmp(wz a,wz b)
{
	return a,rs<b.rs;
}
int main()
{
	int n;
	while(cin>>n)
	{
		int t;
		for(int i=1;i<=n;i++)
		{
			cin>>t;
			a[i].xh=i;
			a[i].rs=t;
		}
		sort(a+1,a+n+1,cmp);
		for(int i=1;i<=n;i++)
		{
			if(i==1)
				cout<<a[i].xh;
			else
				cout<<" "<<a[i].xh;
		}
		cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc:8:1: error: 'wz' does not name a type; did you mean 'w2'?
    8 | wz a[N];
      | ^~
      | w2
a.cc:9:10: error: 'wz' was not declared in this scope; did you mean 'w2'?
    9 | bool cmp(wz a,wz b)
      |          ^~
      |          w2
a.cc:9:15: error: 'wz' was not declared in this scope; did you mean 'w2'?
    9 | bool cmp(wz a,wz b)
      |               ^~
      |               w2
a.cc:9:19: error: expression list treated as compound expression in initializer [-fpermissive]
    9 | bool cmp(wz a,wz b)
      |                   ^
a.cc: In function 'int main()':
a.cc:22:25: error: 'a' was not declared in this scope
   22 |                         a[i].xh=i;
      |                         ^
a.cc:25:22: error: 'a' was not declared in this scope
   25 |                 sort(a+1,a+n+1,cmp);
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  
  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 << data.at(j) <<endl;
    }
    if(data.at(j) == i+1){
      cout << data.at(j) << " ";
    }
    
  }
    
  
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int N; cin >> N;
  int sum;
  vector<int> order(N);
  vector<int> seaq(N);
  
  for (int i = 0; i < N; i++) {
    cin >> sum;
    seaq.at(sum - 1) = i + 1;
  }
  
  for (int i = 0; i < N; i++) {
    cout << seaq.at(i) << " " << endl;
}
  

          
        
  


Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() 
{
	int n;
	cin >> n;
	int a[n];
	vector<pair<int,int> > v;
	for(int i =0; i <n;i++){
		int x;
		cin >> x;
		v.push_back(make_pair(x,i));
	}
	sort(v.begin(),v.end());
	for(int i =0; i <n;i++){
		cout << v[i].second+1<<" ";
	}
}

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

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

/*int intcomp(const int *a, const int *b){
  if(*a<*b)
  return 1;
  else if(*a>*b)
  return -1;
  else
  return 0;
}
*/

int main(void){

  typedef struct Student{
    int itu;
    int bango;
  }student;
    int n;
    int i,j;
    scanf("%d",&n);

    student st[n];//i番目の子が投稿した時点での教室にいる人の人数。
    student tmp;
    /*or(i=0;i<n;i++){
      st[i].bango=i+1;
    }*/
    for(i=0;i<n;i++){
      scanf("%d",&st[i].itu);
      st[i].bango=i+1;
    }
    for(i=0;i<n;i++){
      for(j=i+1;j<n;j++){
        if(st[j].itu>st[j+1]){
          tmp=st[j].itu;
          st[j].itu=st[j+1].itu;
          st[j+1].itu=tmp
        }
        }
      }
    }
  //  qsort(&st[0].itu,n,sizeof(int),(int(*)(const void*, const void*))intcomp);

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



    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:21: error: invalid operands to binary > (have 'int' and 'student' {aka 'struct Student'})
   35 |         if(st[j].itu>st[j+1]){
      |            ~~~~~~~~~^~~~~~~~
      |                 |      |
      |                 int    student {aka struct Student}
main.c:36:15: error: incompatible types when assigning to type 'student' {aka 'struct Student'} from type 'int'
   36 |           tmp=st[j].itu;
      |               ^~
main.c:38:23: error: incompatible types when assigning to type 'int' from type 'student' {aka 'struct Student'}
   38 |           st[j+1].itu=tmp
      |                       ^~~
main.c:38:26: error: expected ';' before '}' token
   38 |           st[j+1].itu=tmp
      |                          ^
      |                          ;
   39 |         }
      |         ~                 
main.c: At top level:
main.c:45:5: error: expected identifier or '(' before 'for'
   45 |     for(i=0;i<n;i++){
      |     ^~~
main.c:45:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   45 |     for(i=0;i<n;i++){
      |              ^
main.c:45:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   45 |     for(i=0;i<n;i++){
      |                  ^~
main.c:51:5: error: expected identifier or '(' before 'return'
   51 |     return 0;
      |     ^~~~~~
main.c:52:1: error: expected identifier or '(' before '}' token
   52 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <algorithm>
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> ans(N);
  for (int i = 0; i < N; i++) {
    B[A[i]-1] = i+1;    
  }
  
  for (int i = 0; i < N; i++) {
    cout << B[i] << " ";
  }
  cout << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'B' was not declared in this scope
   18 |     B[A[i]-1] = i+1;
      |     ^
a.cc:22:13: error: 'B' was not declared in this scope
   22 |     cout << B[i] << " ";
      |             ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: no matching function for call to 'std::vector<int>::at()'
   13 |     if(data.at() == j+1 && j == N-1){
      |        ~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = int; _Alloc = std::allocator<int>; const_reference = const int&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note:   candidate expects 1 argument, 0 provided
a.cc:16:15: error: no matching function for call to 'std::vector<int>::at()'
   16 |     if(data.at() == j+1){
      |        ~~~~~~~^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = int; _Alloc = std::allocator<int>; const_reference = const int&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note:   candidate expects 1 argument, 0 provided
Language: C++

using namespace std;

int main() {
  int N,K;
  cin >> N;
  vector<int> vec(N);
  //vector<int> vec2(N);
  int ans;
/*  for(int i=0;i<N;i++) {
    cin >> vec.at(i);
    vec2.at(i) = vec.at(i)
  }
  sort(vec.begin(),vec.end());
  */
  //for(int i=0;i<N;i++) cin >> vec.at(i);
  
  for(int i=0;i<N;i++) {
    for(int j=0;j<N;j++){
      if(i==0) cin >> vec.at(j);
      if((i+1)==vec.at(j)) {
        ans=j+1;
        break;
      }
    }
    cout << ans << " ";
  }
  //for(int i=0;i<vec2.size();i++) cout << vec2.at(i);
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   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:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> vec(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:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> vec(N);
      |          ^~~
a.cc:19:23: error: 'vec' was not declared in this scope
   19 |       if(i==0) cin >> vec.at(j);
      |                       ^~~
a.cc:20:17: error: 'vec' was not declared in this scope
   20 |       if((i+1)==vec.at(j)) {
      |                 ^~~
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout << ans << " ";
      |     ^~~~
a.cc:25:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
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 index = std::distance(a.begin(), j);
    cout<<index+1<<endl;
  }
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: no matching function for call to 'distance(std::vector<int>::iterator, int&)'
   12 |     int index = std::distance(a.begin(), j);
      |                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:148:5: note: candidate: 'template<class _InputIterator> constexpr typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:148:5: note:   template argument deduction/substitution failed:
a.cc:12:30: note:   deduced conflicting types for parameter '_InputIterator' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'int')
   12 |     int index = std::distance(a.begin(), j);
      |                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/filesystem:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_path.h:1431:1: note: candidate: 'std::ptrdiff_t std::distance(filesystem::__cxx11::path::iterator, filesystem::__cxx11::path::iterator)'
 1431 | distance(filesystem::path::iterator __first, filesystem::path::iterator __last)
      | ^~~~~~~~
/usr/include/c++/14/bits/fs_path.h:1431:37: note:   no known conversion for argument 1 from 'std::vector<int>::iterator' to 'std::filesystem::__cxx11::path::iterator'
 1431 | distance(filesystem::path::iterator __first, filesystem::path::iterator __last)
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C

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

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

#include<stdio.h>
int main(){
  int i,tmp,num;
  scanf("%d",&num);
  int sort[num];
  for(i=0;i<num;i++){
    scanf("%d",&tmp);
    sort[tmp-1] = i
  }
  for(i=0;i<num;i++){
    if(i==num-1)
      printf("%d",sort[i]);
    else
      printf("%d ",sort[i]);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '}' token
    8 |     sort[tmp-1] = i
      |                    ^
      |                    ;
    9 |   }
      |   ~
Language: C++

#include <iostream>
#include <vector>
 
using namespace std;
 
void sort2vectors(vector<int> &av, vector<int> &bv)
{
        int n = av.size();
        vector<int> p(n), av2(n), bv2(n);
        iota(p.begin(), p.end(), 0);
        sort(p.begin(), p.end(), [&](int a, int b) { return av[a] < av[b]; });
        for (int i = 0; i < n; i++) {
                av2[i] = av[p[i]];
                bv2[i] = bv[p[i]];
        }
        av = av2;
        bv = bv2;
}
 
int main() {
  unsigned int N;
  cin >> N;
  vector<int> A(N);
  for(int i=0; i < N; i++){
  	cin >> A[i];
  }
  
  vector<int> B(N);
  for(int i=0; i < N; i++){
  	B[i] = i;
  }
  
  sort2vectors(A, B)
  
  for(int i=0; i < N; i++){
    cout << B[i] << " ";
  }
  cout << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'void sort2vectors(std::vector<int>&, std::vector<int>&)':
a.cc:10:9: error: 'iota' was not declared in this scope
   10 |         iota(p.begin(), p.end(), 0);
      |         ^~~~
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(p.begin(), p.end(), [&](int a, int b) { return av[a] < av[b]; });
      |         ^~~~
      |         short
a.cc: In function 'int main()':
a.cc:33:21: error: expected ';' before 'for'
   33 |   sort2vectors(A, B)
      |                     ^
      |                     ;
   34 | 
   35 |   for(int i=0; i < N; i++){
      |   ~~~                
a.cc:35:16: error: 'i' was not declared in this scope
   35 |   for(int i=0; i < N; i++){
      |                ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: lvalue required as left operand of assignment
   16 |     if(data.at(j) == j && j = N-1){
      |        ~~~~~~~~~~~~~~~~^~~~
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner kbd=new Scanner(System.in);
    int n=kbd.nextInt();
    int a[]=new int[n];
    for(int i=0;i<n;i++){
      a[i]=kbd.nextInt();
    }
    boolean att[]= new boolean[n];
    for(int i=0;i<=n;i++){
      for(int j=0;j<n;j++){
        if(true)continue;
        if(a[j]==i){
          System.out.print(j+1+" ");
          att=true;
        }
      }
    }

  }
}


Compiler output:
Main.java:17: error: incompatible types: boolean cannot be converted to boolean[]
          att=true;
              ^
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: 'n' was not declared in this scope
   16 |     if(data.at(j) == j && j = n-1){
      |                               ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
  int a;
  cin>>a;
  vector<P> b(a);
  
  rep(i,a){
    int c;
    cin>>c;
    make_pair(i,c);
  }
  sort(all(b));
  rep(i,a)
    cout<<b.second;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'second'
   21 |     cout<<b.second;
      |             ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n) ;i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll=long long;

int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  pii stu[n];
  rep(i,n){
    int s;
    cin >> s;
    stu[i].fi=s;
    stu[i].se=i;
  }

  sort(stu,stu+n);

  rep(i,n) cout << stu[i].se+1 << " ";
  cout  << endl;


  return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:14:3: error: 'pii' was not declared in this scope
   14 |   pii stu[n];
      |   ^~~
a.cc:18:5: error: 'stu' was not declared in this scope; did you mean 'std'?
   18 |     stu[i].fi=s;
      |     ^~~
      |     std
a.cc:22:8: error: 'stu' was not declared in this scope; did you mean 'std'?
   22 |   sort(stu,stu+n);
      |        ^~~
      |        std
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   13 |     if(N.at(j) == j){
      |          ^~
a.cc:16:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   16 |     if(N.at(j) == j && j = n-1){
      |          ^~
a.cc:16:28: error: 'n' was not declared in this scope
   16 |     if(N.at(j) == j && j = n-1){
      |                            ^
Language: C++

import numpy as np

n = int(input())
a = list(map(int, input().split()))
a = np.array(a)
b = np.argsort(a)
for x in b:
    print(x+1, end=" ")

print()


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <vector>

using namespace std;

void sort2vectors(vector<int> &av, vector<int> &bv)
{
        int n = av.size();
        vector<int> p(n), av2(n), bv2(n);
        iota(p.begin(), p.end(), 0);
        sort(p.begin(), p.end(), [&](int a, int b) { return av[a] < av[b]; });
        for (int i = 0; i < n; i++) {
                av2[i] = av[p[i]];
                bv2[i] = bv[p[i]];
        }
        av = av2;
        bv = bv2;
}
 
int main() {
  unsigned int N;
  cin >> N;
  vector<int> A(N);
  for(int i=0; i < N; i++){
  	cin >> A[i];
  }
  
  sort2vectors(A, B)
  
  for(int i=0; i < N; i++){
    cout << B[i] << " ";
  }
  cout << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'void sort2vectors(std::vector<int>&, std::vector<int>&)':
a.cc:10:9: error: 'iota' was not declared in this scope
   10 |         iota(p.begin(), p.end(), 0);
      |         ^~~~
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(p.begin(), p.end(), [&](int a, int b) { return av[a] < av[b]; });
      |         ^~~~
      |         short
a.cc: In function 'int main()':
a.cc:28:19: error: 'B' was not declared in this scope
   28 |   sort2vectors(A, B)
      |                   ^
a.cc:30:16: error: 'i' was not declared in this scope
   30 |   for(int i=0; i < N; i++){
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())

 int main ()
 {
   int n;
   cin>>n;
   vector<int> a(n);
   for(int i=0; i<n; ++i){
     cin>>a[i];
   string b;
   a[i]==b[i];
   }
   for(int i=0; i<n; ++i)
     cin>>b[i];
  
     cout<<b<<endl;
 }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'b' was not declared in this scope
   19 |      cin>>b[i];
      |           ^
a.cc:21:12: error: 'b' was not declared in this scope
   21 |      cout<<b<<endl;
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: request for member 'at' in 'N', which is of non-class type 'int'
   10 |     cin >> N.at(i);
      |              ^~
a.cc:12:24: error: 'i' was not declared in this scope
   12 |   for (int j =0; j <N; i++){
      |                        ^
a.cc:13:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   13 |     if(N.at(j) == j){
      |          ^~
a.cc:14:17: error: request for member 'at' in 'N', which is of non-class type 'int'
   14 |       cout << N.at(j) << " ";
      |                 ^~
a.cc:16:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   16 |     if(N.at(j) == j && j = n-1){
      |          ^~
a.cc:16:28: error: 'n' was not declared in this scope
   16 |     if(N.at(j) == j && j = n-1){
      |                            ^
a.cc:17:17: error: request for member 'at' in 'N', which is of non-class type 'int'
   17 |       cout << N.at(j) <<endl;;
      |                 ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i =0; i < N ;i++){
      |   ^~~
a.cc:9:18: error: 'i' was not declared in this scope
    9 |   for (int i =0; i < N ;i++){
      |                  ^
a.cc:13:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   13 |     if(N.at(j) == j){
      |          ^~
a.cc:14:17: error: request for member 'at' in 'N', which is of non-class type 'int'
   14 |       cout << N.at(j) << " ";
      |                 ^~
a.cc:16:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   16 |     if(N.at(j) == j && j = n-1){
      |          ^~
a.cc:16:28: error: 'n' was not declared in this scope
   16 |     if(N.at(j) == j && j = n-1){
      |                            ^
a.cc:17:17: error: request for member 'at' in 'N', which is of non-class type 'int'
   17 |       cout << N.at(j) <<endl;;
      |                 ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())

 int main ()
 {
   int n;
   cin>>n;
   vector<int> a(n);
   for(int i=0; i<n; ++i)
     cin>>a[i];
   string b;
   a[i]==b[i];
   for(int i=0; i<n; ++i)
     cin>>b[i];
  
     cout<<b<<endl;
 }
     


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

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <queue>


using namespace std;

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

    vector<int> num(N);
    priority_queue<pair<int, int>> pq;
    for (int i = 0; i < N ;i++) {
      cin >> num[i];
      pq.push(make_pair(num[i], i));
    }

    vector<int> res(N);
    for (int i = 0; i < pq.size(); i++) {
        res[i] = pq.top().second;
        res.pop();
    }
    
    reverse(res.begin(), res.end());
    for (int i = 0; i < N ;i++) {
        cout << res[i] << " ";
    }
    cout << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'class std::vector<int>' has no member named 'pop'
   24 |         res.pop();
      |             ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())

 int main ()
 {
   int n;
   cin>>n;
   vector<int> a(n);
   for(int i=0; i<n; ++i)
     cin>>a[i];
   string b;
   for(int i=0; i<n; ++i)
     cin>>b[i];
   a[i]==b[i]
     cout<<b<<endl;
 }
     

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

#include <stdio.h>

int main(){
  int n;
  if(scanf("%d",&n)==1){}
  int a[n];int i;int b[n];
  for(i=0;i<n;i++){
    if(scanf("%d",&a[i])==1){}
    b[a[i]-1]=i;
  }
  for(i=0;i<n;i++){
    pirntf("%d",b[i]);
  }
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,memo;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
	cin >> A[i];
  }
  for(int memo = 1; memo <= N; N++){
      if(memo == A[N]){
        cout << i; 
        memo++;
        N = 0;
  	  }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'i' was not declared in this scope
   12 |         cout << i;
      |                 ^
Language: Java

import jdk.nashorn.internal.parser.Scanner;

/**
 * c
 */
public class c {

    public static void main(String[] args) {
        java.util.Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        a = sc.nextLine().split(" ");

        for (int i = 0; i < a.length(); i++) {
            System.out.print(a.index(i + 1) + 1);
            System.out.print(" ");
        }
        System.out.println();
    }
}

Compiler output:
Main.java:6: error: class c is public, should be declared in a file named c.java
public class c {
       ^
Main.java:1: error: package jdk.nashorn.internal.parser does not exist
import jdk.nashorn.internal.parser.Scanner;
                                  ^
Main.java:9: error: cannot find symbol
        java.util.Scanner sc = new Scanner(System.in);
                                   ^
  symbol:   class Scanner
  location: class c
Main.java:10: error: cannot find symbol
        n = sc.nextInt();
        ^
  symbol:   variable n
  location: class c
Main.java:11: error: cannot find symbol
        a = sc.nextLine().split(" ");
        ^
  symbol:   variable a
  location: class c
Main.java:13: error: cannot find symbol
        for (int i = 0; i < a.length(); i++) {
                            ^
  symbol:   variable a
  location: class c
Main.java:14: error: cannot find symbol
            System.out.print(a.index(i + 1) + 1);
                             ^
  symbol:   variable a
  location: class c
7 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  //vector<int> a(n);
  vector<pair<int, int>> A(n);
  for(int i=0;i<n;i++){
    int a;
    cin >> a;
    A[i] = make_pair(a,i)
  }
  
  sort(A.begin(),A.end());
  for(int i=0;i<n;i++){
    cout << A[i].second << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected ';' before '}' token
   11 |     A[i] = make_pair(a,i)
      |                          ^
      |                          ;
   12 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int num;
	vector<int> rank;
	cin >> num;
	
	for(int i=0; i<num; i++)
	{
		int temp;
		cin >> temp;
		rank.push_back(temp);
	}

	// vector<size_t> ans;
	for(int i=0; i < num; i++)
	{
		for(int j=0; j<num; j++)
		{
			if(rank[j] == i)
			{
				// ans.push_back(j);
				cout << j;
				break;
			}
		}
		if(j != (num -1))
		{
			cout << " ";
		}
		else
		{
			cout << endl;
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:20: error: 'j' was not declared in this scope
   28 |                 if(j != (num -1))
      |                    ^
Language: Java

import jdk.nashorn.internal.parser.Scanner;

/**
 * c
 */
public class c {

    public static void main(String[] args) {
        java.util.Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        a = sc.nextLine().split(" ");

        for (int i = 0; i < a.length(); i++) {
            System.out.println(a.index(i + 1) + 1);
        }
    }
}

Compiler output:
Main.java:6: error: class c is public, should be declared in a file named c.java
public class c {
       ^
Main.java:1: error: package jdk.nashorn.internal.parser does not exist
import jdk.nashorn.internal.parser.Scanner;
                                  ^
Main.java:9: error: cannot find symbol
        java.util.Scanner sc = new Scanner(System.in);
                                   ^
  symbol:   class Scanner
  location: class c
Main.java:10: error: cannot find symbol
        n = sc.nextInt();
        ^
  symbol:   variable n
  location: class c
Main.java:11: error: cannot find symbol
        a = sc.nextLine().split(" ");
        ^
  symbol:   variable a
  location: class c
Main.java:13: error: cannot find symbol
        for (int i = 0; i < a.length(); i++) {
                            ^
  symbol:   variable a
  location: class c
Main.java:14: error: cannot find symbol
            System.out.println(a.index(i + 1) + 1);
                               ^
  symbol:   variable a
  location: class c
7 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,memo;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
	cin >> A[i];
    for(int memo = 1; memo <= i; memo++){
      if(memo == h[i]){
        cout << i; 
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: 'h' was not declared in this scope
   10 |       if(memo == h[i]){
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,memo;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
	cin >> h[i];
    for(int memo = 1; memo <= i; memo++){
      if(memo == h[i]){
        cout << i; 
      }
    }
  }
  sort(

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'h' was not declared in this scope
    8 |         cin >> h[i];
      |                ^
a.cc:15:8: error: expected primary-expression at end of input
   15 |   sort(
      |        ^
a.cc:15:8: error: expected '}' at end of input
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool compare_by_b(pair<int, int> a, pair<int, int> b) {
    if(a.second != b.second){
        return a.second < b.second;
    }else{
        return a.first < b.first;
    }
}
int main(){
  int n;
  cin >> n;
  //vector<int> a(n);
  vecotr<pair<int, int>> A(n);
  for(int i=0;i<n;i++){
    int a,b;
    cin >> a >> b;
    A[i] = make_pair(a,b)
  }
  
  sort(ALL(A),compare_by_b);
  for(int i=0;i<n;i++){
    cout << A[i].first << endl;
  }
  return 0:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'vecotr' was not declared in this scope
   14 |   vecotr<pair<int, int>> A(n);
      |   ^~~~~~
a.cc:14:23: error: expected primary-expression before '>' token
   14 |   vecotr<pair<int, int>> A(n);
      |                       ^~
a.cc:14:26: error: 'A' was not declared in this scope
   14 |   vecotr<pair<int, int>> A(n);
      |                          ^
a.cc:21:8: error: 'ALL' was not declared in this scope
   21 |   sort(ALL(A),compare_by_b);
      |        ^~~
a.cc:25:11: error: expected ';' before ':' token
   25 |   return 0:
      |           ^
      |           ;
a.cc:25:11: error: expected primary-expression before ':' token
Language: C++

#include<bits/stdc++.h>
using namespace std;
struct po
{
	int x,y;
};
cmp(po a,po b)
{
	return a.x<b.x;
}
int main()
{
	
	int n;
	while(cin>>n)
	{
		po a[10100];
		for(int i=1;i<=n;i++)
		{
			cin>>a[i].x;
			a[i].y=i;
		}
		sort(a+1,a+n+1,cmp);
		for(int i=1;i<=n;i++)
		{
			//cout<<a[i].x<<" ";
			cout<<a[i].y<<" ";
			
		}cout<<endl;
	}
}

Compiler output:
a.cc:7:1: error: ISO C++ forbids declaration of 'cmp' with no type [-fpermissive]
    7 | cmp(po a,po b)
      | ^~~
Language: C++

    #include<bits\stdc++.h>
    using namespace std;
    #define ll long long int
    #define FIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    
int main(){
    ll n;
    cin>>n;
    vector<pair<ll,ll> > a(n);
    for(ll i=0;i<n;i++){
        cin>>a[i].first;
        a[i].second=i;
    }
    sort(a.begin(),a.end());
    for(ll i=0;i<n;i++){
        cout<<a[i].second+1<<" ";
    }
    cout<<endl;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int num;
	vector<int> rank;
	cin >> num;
	
	for(int i=0; i<num; i++)
	{
		int temp;
		cin >> temp;
		rank.push_back(temp);
	}

	// vector<size_t> ans;
	for(int i=0; i < num; i++)
	{
		auto pos = find(rank.begin(); rank.end(); i);
		size_t index = distance(rank.begin(), pos);
		cout << index;
		if(i != (num-1))
		{
			cout << " ";
		}
		// ans.push_back(index);
	}
	
	cout << ans << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:45: error: expected ')' before ';' token
   19 |                 auto pos = find(rank.begin(); rank.end(); i);
      |                                ~            ^
      |                                             )
a.cc:19:55: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::end() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   19 |                 auto pos = find(rank.begin(); rank.end(); i);
      |                                               ~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:893:7: note: declared here
  893 |       end() _GLIBCXX_NOEXCEPT
      |       ^~~
a.cc:19:60: error: expected ';' before ')' token
   19 |                 auto pos = find(rank.begin(); rank.end(); i);
      |                                                            ^
      |                                                            ;
a.cc:29:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

using namespace std;

int main() {
  int a, b, c;
  c = 0;
  cin >>a;
  vector<int> vec(a);
  vector<int> n(a);
  for (int i = 0; i < a; i++) {
    cin >> vec.at(i);
    }

  for(int j=0; j<a; j++){
     for(int k=0; k<a; k++){
       if(vec.at(k)==j+1){
         n.at(j) = k+1;
         break;
       }
       else {
         continue;
       }
     }
  }
  for(int l=0; l<a; l++){  
     cout <<n.at(l);
  }
    cout <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >>a;
      |   ^~~
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:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> vec(a);
      |   ^~~~~~
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:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> vec(a);
      |          ^~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> n(a);
      |          ^~~
a.cc:10:12: error: 'vec' was not declared in this scope
   10 |     cin >> vec.at(i);
      |            ^~~
a.cc:15:11: error: 'vec' was not declared in this scope
   15 |        if(vec.at(k)==j+1){
      |           ^~~
a.cc:16:10: error: 'n' was not declared in this scope
   16 |          n.at(j) = k+1;
      |          ^
a.cc:25:6: error: 'cout' was not declared in this scope
   25 |      cout <<n.at(l);
      |      ^~~~
a.cc:25:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:13: error: 'n' was not declared in this scope
   25 |      cout <<n.at(l);
      |             ^
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout <<endl;
      |     ^~~~
a.cc:27:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:12: error: 'endl' was not declared in this scope
   27 |     cout <<endl;
      |            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: Java

import java.util.*;
public class A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);	
		
		Map<Integer, Integer> map = new HashMap<>();
		
		int n = sc.nextInt();
		for(int i = 1; i <= n; i++) {
		
		map.put(new Integer(sc.nextInt()), new Integer(i));
		}
		
		for(int i = 1; i <= n; i++) {		
			System.out.print(map.get(i)+ " ");
			}
		
	}
}


Compiler output:
Main.java:2: error: class A is public, should be declared in a file named A.java
public class A {
       ^
Main.java:13: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
		map.put(new Integer(sc.nextInt()), new Integer(i));
		        ^
Main.java:13: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
		map.put(new Integer(sc.nextInt()), new Integer(i));
		                                   ^
1 error
2 warnings
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <climits>
#include <string>
#include <bitset>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<ll> > vvll;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define fin(ans) cout<<(ans)<<endl
#define STI(s) atoi(s.c_str())
#define mp(p,q) make_pair(p,q)
#define pb(n) push_back(n)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define Sort(a) sort(a.begin(),a.end())
#define Rort(a) sort(a.rbegin(),a.rend())
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const int P = 1000000007;
const int INF = INT_MAX;
const ll LLINF = 1LL<<60;


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

int N,tmp;
scanf("%d",&N);
int A[N],B[N];
rep(i,N){
	scanf("%d",&A[i]);
	B[i]=A[i];
}

for (i=0; i<N; ++i) {
  for (j=i+1; j<N; ++j) {
    if (A[i] > A[j]) {
      tmp = A[i];
      A[i] = A[j];
      A[j] = tmp;
    }
  }
}

rep(i,N){
	rep(j,N){
		if(A[i]==B[j])printf("%d",j);
	}
}


//////////////////////////////////////////////////////
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:6: error: 'i' was not declared in this scope
   57 | for (i=0; i<N; ++i) {
      |      ^
a.cc:58:8: error: 'j' was not declared in this scope
   58 |   for (j=i+1; j<N; ++j) {
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  vector<int> V(N);
  for (int i=0; i<N; ++i) {
    cin >> vec.at(i);
  }
  for (int j=0; j<N; ++j) {
    V.at(vec.at(j)) = j;
  }
  for (int k=0; k<N; ++K) {
    cout << V.at(k);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'K' was not declared in this scope
   15 |   for (int k=0; k<N; ++K) {
      |                        ^
Language: C++

#include<algorithm>//sort(all(変数),greater<型名>())　で降順に
#include<cmath>//切り上げceil(値)
#include<deque>
#include<iomanip>//setprecision(数字)
#include<iostream>
#include<list>
#include<map>
#include<numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include<queue>//priority_queue(優先度付きキュー)：最大値の探索が早い
#include<set>
#include<stack>
#include<string>
#include<vector>

#include<bits/stdc++.h>
#include<cstdio>
#include<cstdlib>
#include<tuple>
#include<utility>
#define rep0(i,n)  for(ll i=0; i<n; i++)
#define rrep0(i,n) for(ll i=n-1; 0<=i; i--)
#define rep1(i,n)  for(ll i=1; i<=n; i++)
#define rrep1(i,n) for(ll i=n; 1<=i; i--)
#define vll vector<ll>
#define vi vector<int>
#define all(x) (x).begin(),(x).end()
#define mod 1000000007
using ll = long long;
using namespace std;
/*ビットxにi番目のフラグが立っているかどうか
if(x & (1 << i))
↑ a << b == a*pow(b,2)
/*{0, 1, ..., n-1} の部分集合の全探索
for (int bit = 0; bit < (1 << n); ++bit)
*/

int main(){
  ll n;  cin >> n;
  vi x(n+1)
  rep0(i,n){
    ll a;  cin >> a;
    x[a] = i;
  }
  rep1(i,n){
    cout << x[i];
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: expected ',' or ';' before 'for'
   20 | #define rep0(i,n)  for(ll i=0; i<n; i++)
      |                    ^~~
a.cc:40:3: note: in expansion of macro 'rep0'
   40 |   rep0(i,n){
      |   ^~~~
a.cc:40:8: error: 'i' was not declared in this scope
   40 |   rep0(i,n){
      |        ^
a.cc:20:32: note: in definition of macro 'rep0'
   20 | #define rep0(i,n)  for(ll i=0; i<n; i++)
      |                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> ans(N);
  for(int i=0;i<N;i++){
    cin >> ans.at(i);
  }
  sort(ans.begin(),ans.end());
  for(int i=0;i<N:i++){
    cout<<ans.at(i)+1<<" ";
  }
  cout << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   11 |   for(int i=0;i<N:i++){
      |               ^
a.cc:11:18: error: found ':' in nested-name-specifier, expected '::'
   11 |   for(int i=0;i<N:i++){
      |                  ^
      |                  ::
a.cc:11:17: error: 'N' is not a class, namespace, or enumeration
   11 |   for(int i=0;i<N:i++){
      |                 ^
a.cc:15:1: error: expected primary-expression before '}' token
   15 | }
      | ^
a.cc:14:16: error: expected ')' before '}' token
   14 |   cout << endl;
      |                ^
      |                )
   15 | }
      | ~               
a.cc:11:6: note: to match this '('
   11 |   for(int i=0;i<N:i++){
      |      ^
a.cc:15:1: error: expected primary-expression before '}' token
   15 | }
      | ^
Language: Java

import java.util.HashMap;
import java.util.Scanner;
public class Main142c {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		HashMap<Integer,Integer>hm = new HashMap<Integer,Integer>();

		int n = sc.nextInt();
		
		for(int i = 1; i <= n ; i++) {
			int a = sc.nextInt();
			hm.put(a, i);
		}
		for(int i = 1 ; i <= n ;i++) {
			int ans = hm.get(i);
			System.out.println(ans);
		}
		
			}

}


Compiler output:
Main.java:3: error: class Main142c is public, should be declared in a file named Main142c.java
public class Main142c {
       ^
1 error