amcplayer @ 2024-04-04 21:29:27
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,a[100010];
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
for(int i=1;i<=n;i+=2)
{
sort(a+1,a+i+1);
cout<<a[i/2+1]<<endl;
}
return 0;
}
by Special_Tony @ 2024-04-04 21:33:25
@kailangdewangyo 你n^2logn不tle才怪
by Ryanwu @ 2024-04-05 11:41:52
@kailangdewangyo 你算下时间复杂度
by lgx57 @ 2024-04-18 19:49:24
照你这么做这道题就不会是绿题了。 @kailangdewangyo