#include"stdio.h"
#define maxn 300000
double s[maxn];
double max,min,temp;
void div(int lo,int hi)
{
int mid=(hi+lo)/2;
if(hi==lo+1)
{
if(s[lo]>s[hi])
{
temp=s[lo];
s[lo]=s[hi];
s[hi]=temp;
}
if(max<s[hi])max=s[hi];
if(min>s[lo])min=s[lo];
return;
}
div(lo,mid);
div(mid+1,hi);
}
int main()
{
int T=0,i,n;
while(scanf("%d",&n)!=EOF&& n>0)
{
max=-2100000000;min=2100000000;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载