设为首页 加入收藏

TOP

acm_icpc网络赛第二站:鞍山赛区
2015-07-20 17:42:02 来源: 作者: 【 】 浏览:2
Tags:acm_icpc 网络 第二 鞍山 赛区

这次。。啥也不说了 chp他两上课来晚了。。我也没账号。。开场半小时才开始做的,就敲了一道水题。。然后他们两一直在商量那道计算几何。。最后还是没出来。

Osu!

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 140 Accepted Submission(s): 93
Special Judge


Problem Description Osu! is a famous music game that attracts a lot of people. In osu!, there is a performance scoring system, which eva luates your performance. Each song you have played will have a score. And the system will sort all you scores in descending order. After that, the i-th song scored a i will add 0.95^(i-1)*a i to your total score.

Now you are given the task to write a calculator for this system.


Input The first line contains an integer T, denoting the number of the test cases.

For each test case, the first line contains an integer n, denoting the number of songs you have played. The second line contains n integers a 1, a 2, ..., a n separated by a single space, denoting the score of each song.

T<=20, n<=50, 1<=a i<=500.


Output For each test case, output one line for the answer.

Your answers will be considered correct if its absolute error is smaller than 1e-5.


Sample Input
1
2
530 478


Sample Output
984.1000000000

#include 
  
   
#include 
   
     #include 
    
      #include 
     
       #include 
      
        #include 
       
         #include 
        
          #include 
         
           using namespace std; #define LL long long int a[555]; bool cmp(int a,int b) { return a>b; } int main() { int t,n; cin>>t; while(t--) { cin>>n; for(int i=0;i
          
           >a[i]; sort(a,a+n,cmp); double sum=0; for(int i=0;i
            
            

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Powershell配置SharePoint环境(.. 下一篇HDU 4770 Lights Against Dudely

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·MySQL 安装及连接-腾 (2025-12-25 06:20:28)
·MySQL的下载、安装、 (2025-12-25 06:20:26)
·MySQL 中文网:探索 (2025-12-25 06:20:23)
·Shell脚本:Linux Sh (2025-12-25 05:50:11)
·VMware虚拟机安装Lin (2025-12-25 05:50:08)