1 solutions

  • 0
    @ 2023-9-2 21:34:47
    #include<bits/stdc++.h>
    #define ll long long
    
    using namespace std;
    
    template<typename T>
    inline void in (T &x) {char c;int f=1;do {c=getchar ();if (c=='-') f=-1;} while (c>'9' || c<'0');for (x=0;c>='0' && c<='9';c=getchar ()) x=(x<<1)+(x<<3)+(c^48);x*=f;}
    
    template<typename T>
    inline void out (T x,char c) {if (x==0) {putchar ('0'),putchar (c); return ;}if (x<0)putchar ('-'),x=-x;int sta[20],k=0;while (x) sta[++k]=x%10,x/=10;while (k) putchar (sta[k--]+'0');putchar (c);}
    
    const int N=1e3+5;
    
    struct node{
    	int num,id;
    }a[N];
    
    int n;
    
    bool cmp(node x,node y){
    	return x.num<y.num;
    }
    int main(){
    //	freopen (".in","r",stdin);
    //	freopen (".out","w",stdout);
    	ios::sync_with_stdio(false);
    	cin.tie(0);
    	cout.tie(0);
    	in(n);
    	for(int i=1;i<=n;++i){
    		in(a[i].num);
    		a[i].id=i;
    	}
    	sort(a+1,a+n+1,cmp);
    	for(int i=1;i<=n;++i){
    		out(a[i].id,' ');
    	}	
    	return 0;
    }
    

    Information

    ID
    6826
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    7
    Tags
    # Submissions
    79
    Accepted
    19
    Uploaded By