这次。。啥也不说了 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
Now you are given the task to write a calculator for this system.
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.
Your answers will be considered correct if its absolute error is smaller than 1e-5.
1 2 530 478
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