fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define for1(i,m,n) for(int i=m;i<=n;i++)
  5. #define for0(i,m,n) for(int i=m;i<n;i++)
  6.  
  7. #define int unsigned long long
  8. #define el '\n'
  9. #define fi first
  10. #define se second
  11. #define ii pair<int,int>
  12. #define vll(i) i.begin(),i.end()
  13. #define pb push_back
  14.  
  15. const int N=1e7;
  16. const int mod=1e9+7;
  17.  
  18. vector<ii>v;
  19. signed main(){
  20. ios_base::sync_with_stdio(0);
  21. cin.tie(0);
  22. cout.tie(0);
  23. // freopen("bai1.INP","r",stdin);
  24. // freopen("bai1.OUT","w",stdout);
  25. int n;cin>>n;
  26. for1(i,1,n){
  27. int x;cin>>x;
  28.  
  29. v.pb({x,i});
  30. }
  31. sort(vll(v),[](const ii &a,const ii &b){
  32. return a.fi>b.fi;
  33. });
  34. for(auto x:v) cout<<x.fi<<el;
  35. return 0;
  36. }
  37.  
Success #stdin #stdout 0s 5300KB
stdin
Standard input is empty
stdout
2