题目:https://www.luogu.org/problem/U75523
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a[30009],d,s;
cin>>n;
for(int i=1;i<=n;i++) cin>>a[i];
sort(a+1,a+n+1);
cin>>d;
for(int j=1;j<=d;j++)
{
cin>>s;
cout<<a[s]<<endl;
}
return 0;
}