标签:style blog http color io os ar for 2014
默默的签到
1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 int a[64]; 5 int main(){ 6 int t,n; 7 while(~scanf("%d",&t)){ 8 while(t--){ 9 scanf("%d",&n); 10 for(int i=0;i<n;i++){ 11 scanf("%d",&a[i]); 12 } 13 sort(a,a+n); 14 double ans=0,mul=1; 15 for(int i=n-1;i>=0;i--){ 16 ans+=a[i]*mul; 17 mul*=0.95; 18 } 19 printf("%.10f\n",ans); 20 } 21 } 22 return 0; 23 }
end
2014 ACM/ICPC Asia Regional Anshan Online
标签:style blog http color io os ar for 2014
原文地址:http://www.cnblogs.com/gaolzzxin/p/3971380.html