| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
求RE合理解释。#include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
double a[50000];
int main()
{
int i,n1,n2,n;
double sum;
while(scanf("%d%d%d",&n1,&n2,&n),n1+n2+n>0)
{
for(i=0;i<n;i++)
scanf("%lf",&a[i]);
sort(a,a+n);
for(i=n2,sum=0;i<=n-n1-1;i++)
sum+=a[i];
printf("%.6f\n",sum/(n-n1-n2));
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator