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 |
这样为什么过不了??????????哪位高手帮看看啊!!!!!!!!!!#include<stdio.h> #include<iostream> #include<algorithm> using namespace std; int a[5000001]; int main() { int n1,n2,n; while(scanf("%d%d%d",&n1,&n2,&n)!=EOF) { if(n1==0&&n2==0&&n==0) break; for(int i=0;i<n;i++) scanf("%d",&a[i]); sort(a,a+n); double sum=0; for(int i=n2;i<n-n1;i++) sum=sum+a[i]; printf("%lf\n",(double)sum/(n-n1-n2)); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator