acm_icpc網路賽第二站:鞍山賽區,acm_icpc鞍山賽區

來源:互聯網
上載者:User

acm_icpc網路賽第二站:鞍山賽區,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 DescriptionOsu! is a famous music game that attracts a lot of people. In osu!, there is a performance scoring system, which evaluates 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 ai will add 0.95^(i-1)*ai to your total score.

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


 

InputThe 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 a1, a2, ..., an separated by a single space, denoting the score of each song.

T<=20, n<=50, 1<=ai<=500.


 

OutputFor 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
12530 478


 

Sample Output
984.1000000000

 

#include <stdio.h>#include <string.h>#include <math.h>#include <stdlib.h>#include <iostream>#include <algorithm>#include <vector>#include <stack>using namespace std;#define LL long longint 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<n;i++)cin>>a[i];sort(a,a+n,cmp);double sum=0;for(int i=0;i<n;i++)sum+=(pow(0.95,i)*a[i]);printf("%.10lf\n",sum);}return 0;}

 


ACM-ICPC亞洲賽網路賽 一般難度怎?題型比例?

給你講吧LZ,難者不會,會者不難,你現在在這裡提問,說明你還沒有入行,那麼網路賽對你還是非常難的,去多受幾次虐,然後努力刷題,慢慢的就會了。我是ACM地區賽金獎,回答這個問題算是比較有分量的吧?
 
鞍山市第一看守所跟第二看守所有什不同

差不多```有的地方分別不同的`有的地方`1看是關重要案例嫌疑人``有的1看是關短期嫌疑人``每個地方不一樣``
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.