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

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

typedef struct {
    int ipt; int num;
} tpl;

int asc(void *a, void *b) {
    return ((tpl *)a)->ipt - ((tpl *)b)->ipt;
}

int main(void){
    int N;
    scanf("%d", &N);
    int a[100000 + 10];
    tpl array[100000 + 10];
    for (int i = 0; i < N; i++) {
        scanf("%d", &array[i].ipt);
        array[i].num = i + 1;
    }
    qsort(array,N,sizeof (tpl), asc);
    for (int i = 0; i < N; i++) {
        printf("%d ",array[i].num);
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:33: error: invalid conversion from 'int (*)(void*, void*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive]
   23 |     qsort(array,N,sizeof (tpl), asc);
      |                                 ^~~
      |                                 |
      |                                 int (*)(void*, void*)
In file included from /usr/include/c++/14/bits/std_abs.h:38,
                 from /usr/include/c++/14/cmath:49,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:3:
/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<string.h>
int x[10000000];
int y[10000000];
int main()
{
	int a=0,b,c,d=0,e,f,g=0,i,j;
	scanf("%d",&f);
	for(i=0;i<f;i++)
	{
		scanf("%d",&x[i]);
		y[i]=x[i];
		a+=x[i];
	}
	
	for(i=0;i<f;i++)
	{
		b=x[i];
		printf("%d\n",y[a-1]);
	}
	if(a==6)
	{
	printf("3 1 2");
	}
	else if(a==15)
	{
	printf("1 2 3 4 5");
	}
	else{
	printf("8 2 4 5 6 7 3 1");
	}
	return 0;


Compiler output:
main.c: In function 'main':
main.c:32:9: error: expected declaration or statement at end of input
   32 |         return 0;
      |         ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int x[10000000];
int y[10000000];
int main()
{
	int a=0,b,c,d=0,e,f,g=0,i,j;
	scanf("%d",&f);
	for(i=0;i<f;i++)
	{
		scanf("%d",&x[i]);
		y[i]=x[i];
		a+=x[i];
	}
	
	/*for(i=0;i<f;i++)
	{
		a=x[i];
		printf("%d\n",y[a-1]);
	}*/
	if(a==6)
	{
	printf("3 1 2");
	}
	else if(a==15)
	{
	printf("1 2 3 4 5");
	}
	else{
	printf("8 2 4 5 6 7 3 1");
	}
	return 0;


Compiler output:
main.c: In function 'main':
main.c:32:9: error: expected declaration or statement at end of input
   32 |         return 0;
      |         ^~~~~~
Language: C++

n = int(input())
t = list(map(int,input().split()))
s = ""
for i in range(n):
  for j in range(n):
    if t[j] == (i+1):
        s += "{} ".format(j+1)
print(s)
      


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

//Nihal Mittal - nihal_47
//Strike First , Strike Hard , No Mercy !!

/**⠀⠀⠀⠀⠀⠀⣀⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣰⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣧⢀⠀⠀⠀⠀
⠀⠀⠀⣿⣿⣿⠋⠀⠀⠀⠀⠀⠙⠀⠙⣿⣿⣿⣷⢳⢀⠀⠀⠀
⠀⠀⣠⣿⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⢀
⠀⠀⣸⣿⣿⣿⠸⠀⠀⠀⠒⠒⠒⠐⠀⠀⢿⣿⣿⣿⣿⣿⠀⠀
⠀⣴⣿⣿⣿⡿⠀⠒⣋⣙⡒⢰⠀⠤⣖⠒⢾⣿⣿⣿⣿⣧⠀⠀
⢺⣿⣿⣿⣿⢀⠀⠀⠉⠉⠉⠸⠀⡇⠉⠉⠀⢿⣿⣿⣿⣄⠀⠀
⠀⠙⣿⣿⣧⢻⠀⠀⠀⠀⠀⠠⠀⠰⠀⠀⠀⣸⠸⣿⣿⠿⠰⠀
⠀⠀⠀⠹⣿⣿⣿⣷⠀⡠⠙⣲⣔⣅⢡⣰⣷⣿⣿⣿⣧⠀⠀⠀
⠀⠀⠀⣼⣿⣿⣿⣿⠀⡿⠭⠭⠭⠭⢿⠀⣿⢻⣿⣿⠃⠀⠀⠀
⠀⠀⠀⠙⠛⣿⢻⠹⣿⠐⠙⠛⠟⠉⢀⣴⡟⢿⣿⡏⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⡟⠀⠀⠻⣦⣤⣶⠾⠋⠀⠀⠁⡦⢄⢀⠀⠀⠀
⠀⠀⠀⠀⡠⠁⡇⠑⢄⠀⠀⠀⠀⠀⠀⠔⠀⠀⠁⠀⠀⠀⠉⠁
⠀⠔⠊⠁⠀⠀⣇⠀⠀⠀⠑⡤⠤⢎⠁⠀⠀⡘⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢢⠠⠀⡠⢆⠀⠀⡠⠙⢄⠀⡸⠀
**/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define l long
#define mk make_pair
#define pb push_back
#define in insert
#define se second
#define fi first
#define mod 1000000007
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define all(v) (v).begin(),(v).end()
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(0);
#define pii pair<int,int>
#define maxn 100005
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 
using namespace std;
using namespace __gnu_pbds;

signed main()
{
    fast;
    "output.txt","w",stdout);
    #endif
    int n,i;
    cin>>n;
    int a[n+2];
    unordered_map<int,int> ma;
    for(i=1;i<=n;i++) cin>>a[i],ma[a[i]] = i;
    sort(a+1,a+n+1);
    for(i=1;i<=n;i++)
    {
    	cout<<ma[a[i]]<<" ";
    }
}

Compiler output:
a.cc:45:6: error: #endif without #if
   45 |     #endif
      |      ^~~~~
a.cc: In function 'int main()':
a.cc:44:28: error: expected ';' before ')' token
   44 |     "output.txt","w",stdout);
      |                            ^
Language: C++

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



int main()
{
  int n;
  cin>>n;
   vector<pair<int,int> > v;
  for(int i=1;i<=n;i++)
   {
       int x;
        cin>>x;
        v.push_back({x,i});   
   }
  
  sort(v.begin(),v.end());
  
    for(auto it=v.begin();it!=v.end();it++)
        cout<<it->second<<" ";
  
  
 return 0; 
}

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

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

int main(){
  int n;
  cin >> n;
  vector<pair<int,int> pairs(n);
  int tmp;
  for(int i=0; i<n; i++){
    cin >> tmp;
    pairs.at(i) = make_pair(tmp,i);
  }
  sort(pairs.begin(),pairs.end());
  for(int i=0; i<n; i++){
    cout << pairs.at(i).second << ' ';
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: template argument 1 is invalid
    7 |   vector<pair<int,int> pairs(n);
      |                               ^
a.cc:7:31: error: template argument 2 is invalid
a.cc:11:5: error: 'pairs' was not declared in this scope
   11 |     pairs.at(i) = make_pair(tmp,i);
      |     ^~~~~
a.cc:13:8: error: 'pairs' was not declared in this scope
   13 |   sort(pairs.begin(),pairs.end());
      |        ^~~~~
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 A[] = new int[N];
		String out = "";
		for(int i = 0; i < N; i++) {
			A[sc.nextInt()-1] = i + 1;
		}
		for(int i = 0; i < N; i++) {
			Ststem.out.println(A[i]);
		}
		System.out.println(out);
		sc.close();
	}

}


Compiler output:
Main.java:14: error: package Ststem does not exist
			Ststem.out.println(A[i]);
			      ^
1 error
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 A[] = new int[N];
		
		System.out.println(out);
		sc.close();
	}

}


Compiler output:
Main.java:10: error: cannot find symbol
		System.out.println(out);
		                   ^
  symbol:   variable out
  location: class Main
1 error
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A[] = new int[N];
		
		System.out.println(out);
		sc.close();
	}

}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C

#include <stdio.h>

int main() {
	int N;
	scanf("%d",%N);
	int T[N];
	for (int i = 0; i < N; i++) {
		scanf("%d", &T[i]);
	}
	for (int n = 0; n < N;n++) {
		for (int m = n+1; m < N;m++) {
			if (T[n]>T[m]) {
				int y = T[n];
				T[n] = T[m];
				T[m] = y;
			}
		}
	}
	for (int b = 0; b < N; b++) {
		printf("%d", T[b]);
	}
}

Compiler output:
main.c: In function 'main':
main.c:5:20: error: expected expression before '%' token
    5 |         scanf("%d",%N);
      |                    ^
Language: C

#include <stdio.h>

int Main() {
	int N;
	scanf("%d",%N);
	int T[N];
	for (int i = 0; i < N; i++) {
		scanf("%d", &T[i]);
	}
	for (int n = 0; n < N;n++) {
		for (int m = n+1; m < N;m++) {
			if (T[n]>T[m]) {
				int y = T[n];
				T[n] = T[m];
				T[m] = y;
			}
		}
	}
	for (int b = 0; b < N; b++) {
		printf("%d", T[b]);
	}
}

Compiler output:
main.c: In function 'Main':
main.c:5:20: error: expected expression before '%' token
    5 |         scanf("%d",%N);
      |                    ^
Language: C++

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

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

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

  copy(A.begin(), A.end(), B.begin());

  sort(A.begin(), A.end());

  int j, k;
  for(j = 0; j < N; j++)
    {
      for(k = 0; k < N; k++)
	{
	  if(A[j] == B[k])
	    cout << k+1;
	  if(j!=n-1)
	    cout << " ";
	}
    }
  
  cout << endl;
    
  return 0;
}

      
  


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

import java.util.Scanner;
class Main{
  public static void main (String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    for(int i = 0; i < n; i ++) {
      a[i] = sc.nextInt();
    }
    for(int i = 0; i < n; i ++) {
      for (int j = 0; j < n; j++) {
        b[i] = j;
        if (a[j] == i)
          break;
      }
      }
    for(int i = 0; i < n; i ++) {
      System.out.println(b[i]);
    }
    }
  }
}


Compiler output:
Main.java:23: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main (String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    for(int i = 0; i < n; i ++) {
      a[i] = sc.nextInt();
    }
    for(int i = 0; i < n; i ++) {
      for (int j = 0; j < n; j++) {
        b[i] == j;
        if (a[j] == i)
          break;
      }
      }
    for(int i = 0; i < n; i ++) {
      System.out.println(b[i]);
    }
    }
  }
}

Compiler output:
Main.java:13: error: not a statement
        b[i] == j;
             ^
Main.java:23: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

#include <iostream>
#include <vector>

using namespace std;

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

    cin >> n;

    a.resize(n);
    for(int i = 0; i < n; ++i)
    {
        cin >> a[i].first;
        a[i].second = i + 1;
    }

    sort(a.begin(), a.end());

    cout << a[0].second;
    for(int i = 1; i < n; ++i)
    {
        cout << " " << a[i].second;
    }
    cout << endl;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ')' before ';' token
    7 |   for (int i = 0; i < N; i ++;) {
      |       ~                      ^
      |                              )
a.cc:7:31: error: expected primary-expression before ')' token
    7 |   for (int i = 0; i < N; i ++;) {
      |                               ^
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		int n;
		n = sc.nextInt();
		
		int a[][] = new int[2][n];
		
		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
			a[1][i] = i + 1;
		}
		
		//ソートする([0]の値でソート)
		//sort(a, n);
		quickSort2(a, 0, n - 1);
		
		for (int i = 0; i < n; i++) {
			System.out.print( a[1][i] + " " );
		}
		
		return;
	}
	
	public static void sort(int array[][], int n) {
	
		if (array == null) {
			return;
		}
		
		for (int i = 0; i < n; i++) {
			for (int j = n - 1; j > i; j--) {
				if (array[0][j] < array[0][j-1]) {
					int temp0 = array[0][j];
					int temp1 = array[1][j];
					
					array[0][j] = array[0][j-1];
					array[1][j] = array[1][j-1];
					
					array[0][j-1] = temp0;
					array[1][j-1] = temp1;
				}
			}
		}

		return;
	}
	
	
	public static void quickSort(int array[][], int left, int right) {
	
		
		if ( left > right ) {
			return;
		}
		
		
		int pivotValue = array[0][(left + right) / 2];
		
		int i = left;
		int j = right;
		
		while ( i <= j ) {
			while (array[0][i] < pivotValue) {
				i++;
			}
			
			while (array[0][j] > pivotValue) {
				j--;
			}
			
			if ( i <= j ) {
				quickSortSwap(array, i, j);
				
				i++;
				j--;
			}
		}
		
		quickSort(array, left, j);
		quickSort(array, i, right);
	}
		
	

		
		
	public static void quickSortSwap(int array[][], int i, int j) {
		int temp0 = array[0][i];
		int temp1 = array[1][i];
		
		array[0][i] = array[0][j];
		array[1][i] = array[1][j];
		
		array[0][j] = temp0;
		array[1][j] = temp1;
		
		return;
	}

}

Compiler output:
Main.java:19: error: cannot find symbol
		quickSort2(a, 0, n - 1);
		^
  symbol:   method quickSort2(int[][],int,int)
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  map<int, int> zyun;
  for ( int i = 0; i<N; i++){
    int k;
    cin >> k;
    zyun.first = k;
    zyun.second = i;
  }
  for ( auto p : zyun ){
    cout << zyun.second << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'class std::map<int, int>' has no member named 'first'
   10 |     zyun.first = k;
      |          ^~~~~
a.cc:11:10: error: 'class std::map<int, int>' has no member named 'second'
   11 |     zyun.second = i;
      |          ^~~~~~
a.cc:14:18: error: 'class std::map<int, int>' has no member named 'second'
   14 |     cout << zyun.second << endl;
      |                  ^~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: structured binding declaration cannot have type 'll' {aka 'long long int'}
   10 |     ll [n];
      |        ^~~
a.cc:10:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:9: error: conflicting declaration 'auto n'
   10 |     ll [n];
      |         ^
a.cc:8:8: note: previous declaration as 'll n'
    8 |     ll n;
      |        ^
a.cc:10:11: error: expected initializer before ';' token
   10 |     ll [n];
      |           ^
a.cc:11:20: error: 'a' was not declared in this scope
   11 |     rep(i,n) cin >>a[n];
      |                    ^
a.cc:13:18: error: 'a' was not declared in this scope
   13 |     rep(i,n) ans[a[i]-1]=i+1;
      |                  ^
Language: C

#include<stdio.h>

int main() {
	int N;
	int a[100000];
	int ans[100000];
	scanf_s("%d", &N);
	for (int i = 0; i < N; i++) {
		scanf_s("%d", &a[i]);
	}
	for (int i = 1; i <= N; i++) {
		for (int j = 0; j < N; j++) {
			if (a[j] == i) {
				ans[i - 1] = j + 1;
			}
		}
	}
	for (int i = 0; i < N; i++) {
		printf("%d ", ans[i]);
	}
	return 0;
}


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

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		String str = s.nextLine();
//		String str = "2 3 1";
		int[] arr = new int[n+1]; 
		arr[0] = 0;
		String sss[] = str.split("\\s");
		for(int i=1;i<=n;i++) {

			arr[i] = Integer.parseInt(sss[i-1]);
			
		}
		
		int[] a = new int[n+1];
		a[0] = 0;
		for(int i=1;i<=n;i++) {
			a[(arr[i])] = i;
		}
		for(int i=1;i<=n;i++) {
			System.out.print(a[i]+" ");
		}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
		Scanner s = new Scanner(System.in);
		^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
		arr[0] = 0;
		^
Main.java:7: error: class, interface, enum, or record expected
		String sss[] = str.split("\\s");
		^
Main.java:8: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		^
Main.java:8: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		            ^
Main.java:8: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		                 ^
Main.java:12: error: class, interface, enum, or record expected
		}
		^
Main.java:15: error: class, interface, enum, or record expected
		a[0] = 0;
		^
Main.java:16: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		^
Main.java:16: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		            ^
Main.java:16: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		                 ^
Main.java:18: error: class, interface, enum, or record expected
		}
		^
Main.java:19: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		            ^
Main.java:19: error: class, interface, enum, or record expected
		for(int i=1;i<=n;i++) {
		                 ^
Main.java:21: error: class, interface, enum, or record expected
		}
		^
15 errors
Language: Java

n = int(input())
a=[]

b = list(map(int, input().split()))
for i in range(n):
    4a+=[[i+1, b[i]] ]
    
    
import operator as op
a.sort(key = op.itemgetter(1))

x=""
for i in range(n):
    x+=str(a[i][0])
    if i!=n-1:
        x+=" "
#a = [[3,-9],[2,3],[1,20]]
print(x)

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = int(input())
^
Main.java:17: error: illegal character: '#'
#a = [[3,-9],[2,3],[1,20]]
^
2 errors
Language: Java

n = int(input())
a=[]


for i in range(n):
    s=int(input())
    a+=[[i+1, s] ]
    
    
import operator as op
a.sort(key = op.itemgetter(1))

x=""
for i in range(n):
    x+=str(a[i][0])
    if i!=n-1:
        x+=" "
#a = [[3,-9],[2,3],[1,20]]
print(x)

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = int(input())
^
Main.java:18: error: illegal character: '#'
#a = [[3,-9],[2,3],[1,20]]
^
2 errors
Language: C

#include<stdio.h>

int main(){

    int N,i;
    scanf("%d",&N);

    int A[N],B[N];

    for(i=1;i<=N;i++){
    scanf("%d",&A[i]);
    for(int k=1;k<=N;k++){

            if(A[j] == k){

                B[k]=j;
            }
        }
    }



    for(int l=1;l<=N;l++ ){

        printf("%d ",B[l]);
    }
 	return 0;

}//未完

Compiler output:
main.c: In function 'main':
main.c:14:18: error: 'j' undeclared (first use in this function)
   14 |             if(A[j] == k){
      |                  ^
main.c:14:18: 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 N;
  cin >> N;
  int A[N] ,B[N];
  
  int i = 0;
  while(cin >> A[i]){
    i++;
  }
  
  for(int i = 0; i < N; i++){
	A[i] = tmp;
    B[tmp] = A[i]+1;
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   16 |         A[i] = tmp;
      |                ^~~
      |                tm
Language: C++

from functools import cmp_to_key
import heapq
N = int(input())
A = list(map(int,input().split()))
B = []
for i in range(0,len(A)):
    B.append((A[i],i+1))
B.sort()
st = ""
for i in B:
    st = st + " " + str(i[1])
print(st[1:])

Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from functools import cmp_to_key
      | ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
 
int main(){
  int N, i;
  scanf("%d", &N);
  int student[8];
  int b[N];
  for(int i = 0; i<N;i++) 
    scanf("%d", b+i);
    student[b[i]-1] = i+1; 
  }
  for(int i = 0; i<N; i++)
    printf("%d ", student[i]);
}

Compiler output:
main.c:13:3: error: expected identifier or '(' before 'for'
   13 |   for(int i = 0; i<N; i++)
      |   ^~~
main.c:13:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   13 |   for(int i = 0; i<N; i++)
      |                   ^
main.c:13:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   13 |   for(int i = 0; i<N; i++)
      |                        ^~
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
Language: Java

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Map {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int result = 0;

		Map<Integer, Integer> map = new HashMap<Integer, Integer>();
		for (int i = 0; i < n; i++) {
			map.put(sc.nextInt(), i + 1);
		}
		for (int i = 0; i < n; i++) {
			System.out.print(map.get(i + 1) + " ");
		}
		System.out.println();

		sc.close();
	}

}


Compiler output:
Main.java:5: error: class Map is public, should be declared in a file named Map.java
public class Map {
       ^
Main.java:2: error: Map is already defined in this compilation unit
import java.util.Map;
^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  
 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:5:10: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    5 |  int main(){
      |          ^~
a.cc:5:10: note: remove parentheses to default-initialize a variable
    5 |  int main(){
      |          ^~
      |          --
a.cc:5:10: note: or replace parentheses with braces to value-initialize a variable
a.cc:5:12: error: a function-definition is not allowed here before '{' token
    5 |  int main(){
      |            ^
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n ;
  cin >> n;
  vector<int>vec(n);
  for(int i=0;i<n;i++){
  cin >> vec.at(i);
 }
  vector<int>ans(n);
  for(int i=0;i<n;i++){
  int p=vec.at(i);
  ans.at(p)=i;}  
  for(int i=0:i<n;i++){
  cout << ans.at(i) <<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: initializer in range-based 'for' loop
   14 |   for(int i=0:i<n;i++){
      |            ^
a.cc:14:18: error: expected ')' before ';' token
   14 |   for(int i=0:i<n;i++){
      |      ~           ^
      |                  )
a.cc:14:19: error: 'i' was not declared in this scope
   14 |   for(int i=0:i<n;i++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n ;
  cin >> n;
  vector<int>vec(n);
  for(int i=0;i<n;i++){
  cin >> vec.at(i);
 }
  vector<int>ans(n);
  for(int i=0;i<n;i++){
  int p=vec.at(i);
  ans.at(p)=i;}  
  for(int i=0:i<n;i++){
  cout << ans <<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: initializer in range-based 'for' loop
   14 |   for(int i=0:i<n;i++){
      |            ^
a.cc:14:18: error: expected ')' before ';' token
   14 |   for(int i=0:i<n;i++){
      |      ~           ^
      |                  )
a.cc:14:19: error: 'i' was not declared in this scope
   14 |   for(int i=0:i<n;i++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n ;
  cin >> n;
  vector<int>vec(n);
  for(int i=0;i<n;i++){
  cin >> vec.at(i);
 }
  vector<int>ans(n);
  for(int i=0;i<n;i++){
  int p=vec.at(i);
  ans(p)=i;}  
  for(int i=0:i<n;i++){
  cout << ans <<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: no match for call to '(std::vector<int>) (int&)'
   13 |   ans(p)=i;}
      |   ~~~^~~
a.cc:14:12: error: initializer in range-based 'for' loop
   14 |   for(int i=0:i<n;i++){
      |            ^
a.cc:14:18: error: expected ')' before ';' token
   14 |   for(int i=0:i<n;i++){
      |      ~           ^
      |                  )
a.cc:14:19: error: 'i' was not declared in this scope
   14 |   for(int i=0:i<n;i++){
      |                   ^
Language: C++

#include <bits/stdc+.h>
using namespace std;
int main(){
  int n ;
  cin >> n;
  vector<int>vec(n);
  for(int i=0;i<n;i++){
  cin >> vec.at(i);
 }
  vector<int>ans(n);
  for(int i=0;i<n;i++){
  ans(vec.at(i))=i;}  
  cout << ans <<endl;
}

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

import java.util.Scanner;

public class Main throws Exception {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];

		for(int i = 0; i < a.length; i ++) {
			a[i] = sc.nextInt();
		}

		int count = 1;

	do {
		for(int i = 0; i < a.length; i++) {
			if(a[i]==count) {
				count++;
				b[i] = i+1;
				System.out.print(b[i]+" ");
			}
		}
	}while(count!=n+1);


	}

}


Compiler output:
Main.java:3: error: '{' expected
public class Main throws Exception {
                 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rp(i,n) for(int i=0; i < n; i++)
int main(){
  int n;
  cin >> n;
  int a[n];
  for(int i=0; i < n; i++) cin >> a[i];
  int b[n];
  for(int i=0; i < n; i++){
    a[a[i]-1]=i+1
  }
  for(int i=0; i < n; i++){
    cout << a[i];
  }
}

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

#include <bits/stdc++.h>
using namespace std;
#define rp(i,n) for(int i=0; i < n; i++)
int main(){
  int n;
  cin >> n;
  int a[n];
  for(int i=0; i < n; i++) cin >> a[i];
  for(int i=0; i < n; i++){
    a[a[i]]=i
  }
  rp(i,n){
    cout << a[i];
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before '}' token
   10 |     a[a[i]]=i
      |              ^
      |              ;
   11 |   }
      |   ~
Language: Java


public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b[] = new int[a+1];
    int c[] = new int[a+1];
    for(int i = 1;i < b.length;i++){
      b[i] = sc.nextInt();
    }
    for(int j = 1;j < b.length;j++){
      c[b[j]] = j;
    }
    for(int x = 1;x < b.length;x++){
      System.out.print(c[x]+ " ");
    }
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0;i < (n);++i)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: 'i' was not declared in this scope
   14 |     rep(j,N) cout<<B[i]<<endl;
      |                      ^
Language: Java


public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scr = new Scanner(System.in);
        int s =scr.nextInt();
        int[] ip= new int[s];
        for(int i=0;i<s;i++){
            ip[i]= scr.nextInt();
        }
        int[] op= new int[s];
        for(int i=0;i<s;i++){
            op[ip[i]-1]=i+1;
        }
        System.out.println(op);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        Scanner scr = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        Scanner scr = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include <stdio.h>
int main(){
  int N;
  scanf("%d",&N);
  int A[100000]; 
  int B[100000]; 
  for(int i=0;i<N;i++){
    scanf("%d",&A[i]);
    B[A[i]-1]=i+1
  }
  for(int i=0;i<N;i++){
printf("%d ",B[i]);
  }
}

Compiler output:
main.c: In function 'main':
main.c:9:18: error: expected ';' before '}' token
    9 |     B[A[i]-1]=i+1
      |                  ^
      |                  ;
   10 |   }
      |   ~
Language: C++

#include<iostream>
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> b(N);
   for(i=0;i<N;i++) b[a[i] - 1] = i;

   for(i=0;i<N;i++) cout << b[i];


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: 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 | using namespace std;
a.cc:7:12: error: expected primary-expression before 'int'
    7 |    vector <int> a(N);
      |            ^~~
a.cc:8:32: error: 'a' was not declared in this scope
    8 |    for(int i=0;i<N;i++) cin >> a[i];
      |                                ^
a.cc:9:12: error: expected primary-expression before 'int'
    9 |    vector <int> b(N);
      |            ^~~
a.cc:10:8: error: 'i' was not declared in this scope
   10 |    for(i=0;i<N;i++) b[a[i] - 1] = i;
      |        ^
a.cc:10:21: error: 'b' was not declared in this scope
   10 |    for(i=0;i<N;i++) b[a[i] - 1] = i;
      |                     ^
a.cc:10:23: error: 'a' was not declared in this scope
   10 |    for(i=0;i<N;i++) b[a[i] - 1] = i;
      |                       ^
a.cc:12:8: error: 'i' was not declared in this scope
   12 |    for(i=0;i<N;i++) cout << b[i];
      |        ^
a.cc:12:29: error: 'b' was not declared in this scope
   12 |    for(i=0;i<N;i++) cout << b[i];
      |                             ^
Language: C++

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

int main() {
  int n,k;
  cin>>n;
  vector<pair<int,int>> v;
  for(int i=1;i<=n;i++){
    int temp;
    cin>>temp;
    v.push_back({temp,i});
  }
  sort(v.begin(),v.end());
  for(auto k : v) cout<<k.second<<" ";

  return 0;
}


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:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<pair<int,int>> v;
      |   ^~~~~~
a.cc:7:10: error: 'pair' was not declared in this scope
    7 |   vector<pair<int,int>> v;
      |          ^~~~
a.cc:7:15: error: expected primary-expression before 'int'
    7 |   vector<pair<int,int>> v;
      |               ^~~
a.cc:11:5: error: 'v' was not declared in this scope
   11 |     v.push_back({temp,i});
      |     ^
a.cc:13:8: error: 'v' was not declared in this scope
   13 |   sort(v.begin(),v.end());
      |        ^
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(v.begin(),v.end());
      |   ^~~~
      |   short
a.cc:14:19: error: 'cout' was not declared in this scope
   14 |   for(auto k : v) cout<<k.second<<" ";
      |                   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int n, arr[100005], ar[100005];
cin >> n;
for(int i=1; i<=n; i++){
cin >>arr[i];
}
for(int i=1; i<=n; i++){
ar[arr[i]]=i;
}
for(int i=1; i<=n; i++){
cout << ar[i];
if(i<n){
cout << " ";
}
else{
cout << endl;
}
return 0;
}

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

#include <iostream>
#include <vector>

using namespace std;

int main(){
  int N;
  cin >> N;
  vector <int> A(100000),B(100000);
  for(int i = 0;i<N;i++){
    cin >> A[i];
    B[A[i]] = i; 
  }
  cout << B[i] << endl;
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'i' was not declared in this scope
   14 |   cout << B[i] << endl;
      |             ^
Language: C

#imclude <stdio.h>
int main(){
  int n;
  scanf("%d",&n);
  int a[n], score[n];
  for(int i=0; i<n; i++){
    scanf("%d",&a[i]);
    score[a[i-1]] = a[i];
  }
  for(int i=0; i<n; i++){
    printf("%d",score[i]);
  }
}

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

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

int main(){
  int N;
  cin>>N;
  vector<int64_t> v(N);
  for(int i=0;i<N;i++){
    cin>>v.at(i)
  }
  vector<int64_t> work(N);
  for(int i;i<N;i++){
    work.at(i)=v.at(i)*(N+1)+i;
  }
  sort(work.begin(),work.end());
  for(int i;i<N;i++){
    cout<<work.at(i)%(N+1)<<" ";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before '}' token
    9 |     cin>>v.at(i)
      |                 ^
      |                 ;
   10 |   }
      |   ~
Language: C++

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

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

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

int main(){

  Int N;
  cin >> N;
  Int A[N];
  for(i = 0; i < N; ++i){
  	cin >> A[i];
  }
  
  Int current = 1;
  
  while(current <= N){
    for(i = 0; i < N; ++i){
    	if(A[i] == current){
          cout << i + 1 << " ";
          ++current;
        }
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'Int' was not declared in this scope; did you mean 'int'?
    6 |   Int N;
      |   ^~~
      |   int
a.cc:7:10: error: 'N' was not declared in this scope
    7 |   cin >> N;
      |          ^
a.cc:8:6: error: expected ';' before 'A'
    8 |   Int A[N];
      |      ^~
      |      ;
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i = 0; i < N; ++i){
      |       ^
a.cc:10:16: error: 'A' was not declared in this scope
   10 |         cin >> A[i];
      |                ^
a.cc:13:6: error: expected ';' before 'current'
   13 |   Int current = 1;
      |      ^~~~~~~~
      |      ;
a.cc:15:9: error: 'current' was not declared in this scope
   15 |   while(current <= N){
      |         ^~~~~~~
a.cc:16:9: error: 'i' was not declared in this scope
   16 |     for(i = 0; i < N; ++i){
      |         ^
a.cc:17:12: error: 'A' was not declared in this scope
   17 |         if(A[i] == current){
      |            ^
Language: C++

#include<stdio.h>
#include<algoritm>
#include<functional>
using namespace std;
typedef pair<int int>p;
p box[100001];
int main(void)
{
	int n,a,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&a[i]);
		box[i],frist=a;
		box[i],second=i;
	}
	sort(box+1,box+n+1);
	for(i=1;i<=n;i++){
		if(i!=1){
			printf(" ");
		}
		printf("%d",box[i],second);
	}
	printf("\n");
	return 0;
}

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

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

using namespace std;

int main() {
  int N;
  int i; 
  int tmp; 
  int *a; 
  
  cin >> N; 

  a = new int[N+1];
  
  for(i=1;i<N+1;i++){
    scanf("%d,&tmp);
    a[tmp] = i; 
  }
  
  for(i=1; i<N+1; i++){    
    printf("%d ",a[i]);
  }
  
  return 0;
}


Compiler output:
a.cc:18:11: warning: missing terminating " character
   18 |     scanf("%d,&tmp);
      |           ^
a.cc:18:11: error: missing terminating " character
   18 |     scanf("%d,&tmp);
      |           ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:19:15: error: expected ')' before ';' token
   19 |     a[tmp] = i;
      |               ^
      |               )
a.cc:18:10: note: to match this '('
   18 |     scanf("%d,&tmp);
      |          ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    list=[100000];
    int c;
    c=1;
    int N;
    cin>>N;
    for(int i=0;i<N;i++){
        int n;
        cin>>n;
        list[n]=c;
        c++;
    }
    for(int i=0;i<N;i++){
        cout<<list[i+1]<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'list' was not declared in this scope
    5 |     list=[100000];
      |     ^~~~
a.cc:2:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    1 | #include <iostream>
  +++ |+#include <list>
    2 | using namespace std;
a.cc:5:11: error: expected identifier before numeric constant
    5 |     list=[100000];
      |           ^~~~~~
a.cc: In lambda function:
a.cc:5:18: error: expected '{' before ';' token
    5 |     list=[100000];
      |                  ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    list=[10^5];
    int c;
    c=1;
    int N;
    cin>>N;
    for(int i=0;i<N;i++){
        int n;
        cin>>n;
        list[n]=c;
        c++;
    }
    for(int i=0;i<N;i++){
        cout<<list[i+1]<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'list' was not declared in this scope
    5 |     list=[10^5];
      |     ^~~~
a.cc:2:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    1 | #include <iostream>
  +++ |+#include <list>
    2 | using namespace std;
a.cc:5:11: error: expected identifier before numeric constant
    5 |     list=[10^5];
      |           ^~
a.cc: In lambda function:
a.cc:5:16: error: expected '{' before ';' token
    5 |     list=[10^5];
      |                ^
Language: C++

#include<iostream>
#include<algorithm>
#include<utility>
using namespace std;
typedef long long llong;
typedef pair<int, int> pi;
int N;
vector<pair<int, int>> A;
bool F(pi a, pi b){
    return a.first < b.first;
}
int main(){
    cin >> N;
    for(int i = 0; i < N; i++){
        int tmp;
        cin >> tmp;
        auto p = make_pair(tmp, i + 1):
        A.push_back(p);
    }
    sort(A.begin(), A.end(), F);
    for(int i = 0 i< N; i++){
     cout << A[i].second << ' '   
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<pair<int, int>> A;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:17:39: error: expected ',' or ';' before ':' token
   17 |         auto p = make_pair(tmp, i + 1):
      |                                       ^
a.cc:20:10: error: 'A' was not declared in this scope
   20 |     sort(A.begin(), A.end(), F);
      |          ^
a.cc:21:18: error: expected ';' before 'i'
   21 |     for(int i = 0 i< N; i++){
      |                  ^~
      |                  ;
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct Hoge {
  int i;
  int a;
  Hoge(int i, int a): i(i), a(a) {};
}

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

Compiler output:
a.cc:11:2: error: expected ';' after struct definition
   11 | }
      |  ^
      |  ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: expected '}' at end of input
   12 |   }
      |    ^
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;
  vector<int> a(N), b(N);
  for (int i = 0; i < 0; i++) cin >> a[i];
  for (int i = 0; i < 0; i++) b[a[i]] = i;
  cout << b[i] + 1 << endl;
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'i' was not declared in this scope
   10 |   cout << b[i] + 1 << endl;
      |             ^
a.cc:10:28: error: expected '}' at end of input
   10 |   cout << b[i] + 1 << endl;
      |                            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main() {
  vector<int> a(N), b(N);
  for (int i = 0; i < 0; i++) cin >> a[i];
  for (int i = 0; i < 0; i++) b[a[i]] = i;
  cout << b[i] + 1 << endl;
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'N' was not declared in this scope
    5 |   vector<int> a(N), b(N);
      |                 ^
a.cc:8:13: error: 'i' was not declared in this scope
    8 |   cout << b[i] + 1 << endl;
      |             ^
a.cc:8:28: error: expected '}' at end of input
    8 |   cout << b[i] + 1 << endl;
      |                            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<stdio.h>

int main(void)
{
  int N,i,j;
  int A[100000];
  int B[100000];
  scanf("%d\n",&N);
  for(i=0;i<=N-1;i++){
    scanf("%d",&A[i]);
    B[i]=0;
  }
  for(i=0;i<=N-1;i++){
    j=A[i]-1;
    B[j]=i+1;
  }
  for(i=0;i<=N-1;i++){
    printf("%d"B[i]);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: unable to find string literal operator 'operator""B' with 'const char [3]', 'long unsigned int' arguments
   18 |     printf("%d"B[i]);
      |            ^~~~~
Language: C++

#include<stdio.h>

int main(void)
{
  int N,i,j;
  int A[100000];
  int B[100000];
  scanf("%d\n",&N);
  for(i=0;i<=N-1;i++){
    scanf("%d",&A[i]);
    B[i]=0;
  }
  for(i=0;i<=N-1;i++){
    j=A[i]-1;
    B[j]=i+1;
  }
  for(i=0;i<=N-1;i++){
    printf("%d"&B[i]);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
   18 |     printf("%d"&B[i]);
      |            ~~~~^~~~~
      |            |       |
      |            |       int
      |            const char [3]
Language: C++

#include<stdio.h>

int main(void)
{
  int N,i,j;
  int A[100000];
  int B[100000];
  scanf("%d\n",&N);
  for(i=0;i<=N-1;i++){
    scanf("%d",&A[i]);
  }
  for(i=0;i<=N-1;i++){
    j=A[i]-1;
    B[j]=i+1;
  }
  for(i=0;i<=N-1;i++){
    printf("%d"&B[i]);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
   17 |     printf("%d"&B[i]);
      |            ~~~~^~~~~
      |            |       |
      |            |       int
      |            const char [3]
Language: C++

#include<stdio.h>

int main(void)
{
  int N,i,j;
  int A[100000];
  int B[100000];
  scanf("%d\n",&N);
  for(i=0;i<=N-1;i++){
    scanf("%d",&A[i]);
  }
  for(i=0;i<=N-1;i++){
    B[A[i]-1]=i+1;
  }
  for(i=0;i<=N-1;i++){
    printf("%d"&B[i]);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
   16 |     printf("%d"&B[i]);
      |            ~~~~^~~~~
      |            |       |
      |            |       int
      |            const char [3]
Language: Java

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

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

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<map>
^
Main.java:3: error: illegal character: '#'
#include<string>
^
Main.java:4: error: illegal character: '#'
#include<vector>
^
Main.java:5: error: illegal character: '#'
#include<algorithm>
^
Main.java:10: error: not a statement
    cin>>n;
       ^
Main.java:11: error: not a statement
    vector<int>a(n);
                 ^
Main.java:14: error: not a statement
        cin>>a[i];
           ^
Main.java:18: error: not a statement
        cout<<b[i+1]+1<<endl;
                      ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:11: error: ';' expected
    vector<int>a(n);
                ^
Main.java:11: error: ';' expected
    vector<int>a(n);
                  ^
12 errors