stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
//#pragma GCC optimize(2)

//#pragma G++ optimize(2)

//#include <bits/stdc++.h>

#include <iostream>

#include <cstdio>

#include <cstdlib>

#include <cmath>

#include <cstring>

#include <string>

#include <climits>

#include <algorithm>

#include <queue>

#include <vector>

using namespace std;



const int maxn=100000+10;

struct node{

    int key;

    int id;

};

node a[maxn];

int n;

bool comp(node _a,node _b){

    return _a.key<_b.key;

}

int getint(){

    int x=0,s=1; char ch=' ';

    while(ch<'0' || ch>'9'){ ch=getchar(); if(ch=='-') s=-1;}

    while(ch>='0' && ch<='9'){ x=x*10+ch-'0'; ch=getchar();}

    return x*s;

}

int main(){

    //ios::sync_with_stdio(false);

    //cin.tie(0);

    cin>>n;

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

        int x; cin>>a[i].key;

        a[i].id=i;

    }

    sort(a+1,a+1+n,comp);

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

        cout<<a[i].id<<' ';

    }

    cout<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdlib>

#include<cstdio>

#include<cstring>

#include<cmath>

#include<algorithm>

#include<iomanip>

using namespace std;

#define rep(i,s,t) for(int i=s;i<=t;i++)

#define mem(a,s) memset(a,s,sizeof(a))

typedef long long LL;

const int N=1e5+10;

int n;

pair<int, int> a[N];

int main(){

    //freopen("in.txt","r",stdin);

    cin>>n;

    rep(i,1,n){

        cin >> a[i].first;

        a[i].second = i;

    }

    sort(a + 1, a + n + 1);

    cout << a[1].second;

    rep(i,2,n){

        cout << ' ' << a[i].second;

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

using namespace std;

struct student

{

	int num;

	int total;

}s[100100];

bool cmp(student a,student b)

{

	if(a.total<b.total)

	return true;

	else

	return false;

}

int main()

{

	int n;

	cin>>n;

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

	{

		s[i].num=i;

		cin>>s[i].total;

	}

	sort(s+1,s+1+n,cmp);

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

	{

		if(i!=n)

		{

			cout<<s[i].num<<" ";

		}

		else

		{

			cout<<s[i].num;

		}

	}

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <algorithm>

#include <cstdio>

#include <cstring>

#include <iostream>

#include <string>

using namespace std;

int n;

struct st

{

    int s, c;

    bool operator<(const st &a) const

    {

        return s<a.s;

    }

}a[100010];

int main()

{

 

    scanf("%d", &n);

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

    {

        a[i].c = i;

        scanf("%d", &a[i].s);

    }

    sort(a+1, a + 1+n);



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

    {

        printf("%d ", a[i].c);

    } 

    return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include<algorithm>

using namespace std;



struct st

{

    int id;

    int num;

    bool operator<(const st& p)

    {

        return num<p.num;

    }

};

st a[100000+10];

int main()

{

    int N;

    cin>>N;

    for(int i=1;i<=N;i++)

    {

        a[i].id = i;

        cin>>a[i].num;

    }

    sort(a+1,a+N+1);

    for(int i=1;i<=N;i++)

        cout<<a[i].id<<" ";

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <stdio.h>

#include <algorithm>

#include <string.h>

using namespace std;



struct node{

	int i,ai;

	bool operator < (node t){

		return ai<t.ai;

	}

};



const int nmax=1e5+5;

int n;



node str[nmax];



int main(){

	scanf("%d",&n);

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

		str[i].i=i;

		scanf("%d",&str[i].ai);

	}

	sort(str+1,str+n+1);

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

		printf("%d ",str[i].i);

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<vector>

#include<algorithm>

using namespace std;

const int M=1e5+5;

struct stu{

	int id;

	int val;

	stu(){

	}

	stu(int a,int b){

		id=a;

		val=b;

	}

	bool operator < (const stu &s)const{

		return val<s.val;

	}

};

int n,num;

int a[M];

vector<stu>v;

int main()

{

	cin>>n;

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

	{

		cin>>num;

		v.push_back(stu(i+1,num));

	}

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

	for(int i=0;i<v.size()-1;i++)

	{

		cout<<v[i].id<<" ";

	}

	cout<<v[v.size()-1].id<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<algorithm>

#include<iostream>

using namespace std;

const int N=22e4;



int a[N],r[N];

bool cmp(int x,int y){

	return a[x]<a[y];

}

int main(){

	ios::sync_with_stdio(0);

	int n;

	cin>>n;

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

		cin>>a[i];

		r[i]=i;

	}

	sort(r,r+n,cmp);

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

		cout<<r[i]+1<<' ';

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



struct Stu

{

    int num, rank;

    bool operator < (const Stu& x)const {

        return rank < x.rank;

    }

}stu[100010];

int n;



int main()

{

    scanf("%d", &n);

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

    {

        scanf("%d", &stu[i].rank);

        stu[i].num = i + 1;

    }

    sort(stu, stu + n);

    printf("%d", stu[0].num);

    for(int i = 1; i < n; i++)printf( " %d", stu[i].num);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

using namespace std;

struct a

{

	int num;

	int sum;

	bool operator < (const a &s)const

	{

		return sum<s.sum;

	}

	a(){num=0;sum=0;

	}

};

a s[100050];

int main()

{

	int N;

	cin>>N;

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

	{

		cin>>s[i].sum;

		s[i].num=i+1;

	}

	sort(s,s+N);

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

	{

		cout<<s[i].num<<" ";

	}

} 

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

#include<queue>

#include<cmath>

#include<iostream>

#include<cstring>

using namespace std;

template<class _T>inline void read(_T &_a)

{

    bool f=0; char _c=getchar(); _a=0;

    while(_c<'0'||_c>'9'){ if(_c=='-') f=1; _c=getchar(); }

    while(_c>='0'&&_c<='9'){ _a=(_a<<3)+(_a<<1)-'0'+_c; _c=getchar(); }

    if(f) _a=-_a;

}



const int MAXN=100002;

int n;

struct NODE

{

    int a,id;

    inline bool operator < (const NODE &x) const { return a<x.a; }

}e[MAXN];



int main()

{

    read(n);

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

    {

        read(e[i].a);

        e[i].id=i;

    }

    sort(e+1,e+n+1);

    for (int i=1;i<=n;++i) printf("%d ",e[i].id);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;



int n;

struct node

{

	int num;

	int t;

} a[100005];



inline int cmp(node x,node y)

{

	if(x.t < y.t)return 0;

	else return 1;

}



int main()

{

	cin>>n;



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

		a[i].num = i,cin>>a[i].t;



	sort(a+1,a+n+1,cmp);



	for(int i=n; i>=1; i--)

		cout<<a[i].num<<" ";



	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;



struct node{

	int id,rank;

	node(int x,int y):id(x),rank(y){}

	bool operator <(const node& rhs) const {

		return rank>rhs.rank;

	}

};



priority_queue<node> Q;

int n,x,y;



int main(){

	scanf("%d",&n);

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

		scanf("%d",&x);

		Q.push(node(i,x));

	}

	while(!Q.empty()){

		printf("%d ",Q.top());Q.pop();

	}

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#pragma GCC optimize ("O3")

#include <bits/stdc++.h>

#define ll long long

#define cst first

#define dur second

#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);

using namespace std;

const int N = 1e5 + 5, M = 2 * N + 5;





int main(){

    int n;

    scanf("%d", &n);

    vector<pair<int, int> > v;

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

        int x;

        scanf("%d", &x);

        v.emplace_back(x, i);

    }

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

    for(auto i : v)printf("%d ", i.second);

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



int main()

{

	long long n;

	cin>>n;

	long long arr[n];

	vector< pair<long long,long long> >v;

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

	{

		cin>>arr[i];

		v.push_back(make_pair(arr[i],i+1));

	}

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

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

		cout<<v[i].second<<" ";

}


// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main( )

{

    int n, i, j, k;

    vector< pair<int, int> > v;

    cin >> n;

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

        cin >> j;

        v.push_back(make_pair(j, i));

    }

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

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

        if (i != 0) cout << ' ';

        cout << v[i].second;

    }

    cout << '\n';

    return 0;

}


// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>



using namespace std;



struct peo

{

	int id,num;

}p[101000];

bool cmp(peo a,peo b)

{

	return a.id<b.id;

}

int main()

{

	int n;cin>>n;

	for(int i=1;i<=n;i++) scanf("%d",&p[i].id),p[i].num=i;

	sort(p+1,p+n+1,cmp);

	for(int i=1;i<=n;i++) printf("%d ",p[i].num);

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <map>

using namespace std;

map<int,int> m;



int main()

{

	int n,a;

	cin>>n;

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

		cin>>a;

		m[a]=i;

	}

	map<int,int>::iterator it;

	for(it=m.begin();it!=m.end();it++) cout<<it->second<<" ";

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream> 

#include<algorithm>

using namespace std;





struct Node{

	int a;

	int b;

};



int n;

Node f[100003];

bool cmp(Node a, Node b){

	if(a.b < b.b) return true;

	return false;

}



int main(){	

	cin >> n;

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

		cin >> f[i].b;

		f[i].a = i;

	}

	sort(f+1, f+1+n, cmp);

	for(int i = 1; i <= n; i++) cout << f[i].a << ' ';

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<vector>

#include<string>

#include<algorithm>

using namespace std;

const int nmax=1e5+10;

int main(){

	int n;

	scanf("%d",&n);

	vector<pair<int,int> > ans;

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

		int tmp;scanf("%d",&tmp);

		ans.push_back(make_pair(tmp,i));

	}

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

	for(auto it=ans.begin();it!=ans.end();it++){

		printf(it==ans.begin()?"%d":" %d",it->second);

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

using namespace std;



struct stu

{

	int num;

	int order;

	bool operator <(const stu&s)

	{

		return num<s.num;

	}

}a[100099];

 

int main()

{

	int n;

	cin>>n;

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

	{

		cin>>a[i].num;

		a[i].order=i+1;

	}

	sort(a,a+n);

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

	{

		cout<<a[i].order<<' ';

	}

	cout<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm> 

using namespace std;

const int MAX=1e5+10;

struct student

{

	int num;

	int index;	

	bool operator<(const student &p) const

	{

		if(num!=p.num) return num<p.num;

	}

};

student a[MAX];

int main()

{

	int n=0;

	cin>>n;

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

	{

		cin>>a[i].num;

		a[i].index=i+1;

	}

	sort(a,a+n);

	cout<<a[0].index;

	for(int i=1;i<n;i++) cout<<" "<<a[i].index;

	cout<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string.h>

#include<algorithm>

using namespace std;

int n;

struct A{

	int x;

	int y;

};

A a[100010];

bool cmp(A s,A d){

	return s.x<d.x;

}

int main(){

	cin>>n;

	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++){

		if(i!=1)cout<<' ';

		cout<<a[i].y;

	}

} 

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

using namespace std;

struct At{

	int index;

	int ai;

}a[100010];

bool cmp(At a,At b){

	return a.ai<b.ai;

}

int main(){

	int n;

	cin>>n;

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

		cin>>a[i].ai;

		a[i].index=i;

	}

	sort(a+1,a+1+n,cmp);

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

		cout<<a[i].index<<" ";

	}

	cout<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

using namespace std;

struct a

{

	int num;

	int sum;

	bool operator < (const a &s)const

	{

		return sum<s.sum;

	}

	a(){num=0;sum=0;

	}

};

a s[100050];

int main()

{

	int N;

	cin>>N;

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

	{

		cin>>s[i].sum;

		s[i].num=i+1;

	}

	sort(s,s+N);

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

	{

		cout<<s[i].num<<" ";

	}

} 

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

using namespace std;



int N;

struct st{

	int i,a;

} A[100010];

bool cmp(const st &x, const st &y){

	return x.a<y.a;

}



int main(void){

	cin>>N;

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

		cin>>A[i].a;

		A[i].i=i;

	}

	sort(A,A+N,cmp);

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

		cout<<A[i].i+1<<" ";

	cout<<endl;



	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <algorithm>

using namespace std;

const int maxn=1e5+10;

int n;

struct node{

	int val,idx;

	bool operator<(const node &t){

		return val<t.val;

	}

}a[maxn];

int main()

{

	scanf("%d",&n);

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

		scanf("%d",&a[i].val);

		a[i].idx=i;

	}

	sort(a+1,a+1+n);

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

		printf("%d ",a[i].idx);

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstring>

#include<algorithm>

#include<cstdio>

#define N 100005

using namespace std;

struct ab{

int a,b;

};

ab a[N];

int cmp(ab x,ab y){

return x.a<y.a;

}

int n;

int main(){

scanf("%d",&n);

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

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

a[i].b=i;

}

sort(a+1,a+n+1,cmp);

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

printf("%d ",a[i].b);

}

}

// Fastest known solution for this problem: