Main.cpp:2:22: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std; main(){ios::sync_with_stdio(false);cin.tie(nullptr);int n;cin>>n;vector<pair<int,int>> a(n);vector<pair<int,int>> ainx(n,{0,-1});for(int i=0;i<n;i++){cin>>ainx[i].first;a[i]={ainx[i].first,i};}sort(a.begin(),a.end());for(int i=1;i<n;i++){if(a[i].first==a[i-1].first){ainx[a[i-1].second].second=a[i].second;}}int s=0;while(s<n){if(ainx[s].second!=-1){for (int i=s;i<ainx[s].second;i++){cout<<ainx[s].first<<"\n";}s=ainx[s].second;}else{cout<<ainx[s].first<<"\n";s++;}}return 0; }
| ^~~~