0
已解决
赵一璇
初级守护
初级守护
#include <bits/stdc++.h>
using namespace std;
struct f{
int id;
int sore;
}a[100005];
int n;
bool cmp(f x,f y){
return x.sore>y.sore;
}
bool cmp1(f x,f y){
return x.id<y.id;
}
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i].sore;
a[i].id=i;
}
sort(a+1,a+n+1,cmp);
sort(a+1,a+3+1,cmp1);
sort(a+n-2,a+n+1,cmp1);
cout<<a[1].id<<" "<<a[2].id<<" "<<a[3].id<<endl;
cout<<a[n-2].id<<" "<<a[n-1].id<<" "<<a[n].id;
return 0;
}