alexander35 @ 2022-11-21 13:42:22
#include<bits/stdc++.h>
using namespace std;
int n,a[100001];
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
cin>>a[i];
int m=(n+1)/2;
for(int i=1;i<=m;i++)
{
sort(a+1,a+2*i);
cout<<a[i]<<endl;
}
return 0;
}
by TKXZ133 @ 2022-11-21 13:52:12
by zymooll @ 2022-11-21 13:52:49
时间复杂度
不超就有鬼了
by zymooll @ 2022-11-21 13:53:18
请用更好的算法,例如对顶堆
by alexander35 @ 2022-11-21 16:42:01
谢谢