标签:sort main code tac nbsp ++ math.h problem print
http://acm.hdu.edu.cn/showproblem.php?pid=2014
#include<iostream> #include<stdio.h> #include<math.h> #include<queue> #include<stack> #include<algorithm> #define PI 3.1415927 using namespace std; int main() { int i; int n,a[105]; while(~scanf("%d",&n)) { double sum=0; for(i=0;i<n;i++) { scanf("%d",&a[i]); } sort(a,a+n); for(i=1;i<n-1;i++) { sum+=a[i]; ///printf("%d\n",a[i]); } printf("%.2lf\n",sum/(n-2)); } return 0; } ///hdu2014
标签:sort main code tac nbsp ++ math.h problem print
原文地址:http://www.cnblogs.com/hhkobeww/p/7534724.html