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看是關短期嫌疑人``每個地方不一樣``