解题思路:水题,不多说。

 #include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
double A[]; int cmp(int x, int y)
{
return x > y;
} int main()
{
int n, t;
scanf("%d", &t);
while(t--)
{
scanf("%d", &n);
double sum = ;
for(int i = ; i <= n; i++)
{
scanf("%lf", &A[i]);
//sum += A[i];
}
sort(A+, A++n, cmp);
for(int i = ; i <= n; i++) sum += pow(0.95, (i-))*A[i];
printf("%.10lf\n", sum);
}
return ;
}

HDU 5003 Osu!的更多相关文章

  1. 2014 Asia AnShan Regional Contest --- HDU 5078 Osu!

    Osu! Problem's Link:   http://acm.hdu.edu.cn/showproblem.php?pid=5078 Mean: 略. analyse: 签到题,直接扫一遍就得答 ...

  2. hdu 5078 Osu! (2014 acm 亚洲区域赛鞍山 I)

    题目链接:http://acm.hdu.edu.cn/showproblem.php? pid=5078 Osu! Time Limit: 2000/1000 MS (Java/Others)     ...

  3. hdu 5003 模拟水题

    http://acm.hdu.edu.cn/showproblem.php?pid=5003 记得排序后输出 #include <cstdio> #include <cstring& ...

  4. [ACM] HDU 5078 Osu!

    Osu! Problem Description Osu! is a very popular music game. Basically, it is a game about clicking. ...

  5. hdu 5078 Osu!(鞍山现场赛)

    Osu! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Sub ...

  6. hdu 5003 模拟水题 (2014鞍山网赛G题)

    你的一系列得分 先降序排列 再按0.95^(i-1)*ai 这个公式计算你的每一个得分 最后求和 Sample Input12530 478Sample Output984.1000000000 # ...

  7. HDU5003:Osu!(签到题)HDU5038:(签到题,题意很坑)

    HDU 5003 水题,直接上代码(因为题意读错了,WA了一遍). #include <iostream> #include <string.h> #include <s ...

  8. The 2014 ACM-ICPC Asia Regional Anshan

    继续复盘下一场Regional! [A]-_-/// [B]模拟(之前每次遇到模拟.暴搜都直接跳了,题目太长也是一个原因...下次是在不行可以尝试一下) [C]数论 互质.容斥? [D]数学推导(方差 ...

  9. HDOJ 2111. Saving HDU 贪心 结构体排序

    Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

随机推荐

  1. Task 使用 Task以及Task.Factory都是在.Net 4引用的。Task跟Thread很类似,通过下面例子可以看到。

    static public void ThreadMain() { Thread t1 = new Thread(TaskWorker); t1.Start(3); } static public v ...

  2. http://www.cnblogs.com/flyoung2008/archive/2013/08/11/3251148.html

    http://www.cnblogs.com/flyoung2008/archive/2013/08/11/3251148.html

  3. Linux Mint 17 + 小米WIFI创建手机热点

    转载:http://www.pppei.net/blog/post/690 亲测可行! 我的系统是linux mint 17.1 64位,所用wifi位小米WIFI. 以下是原文: 此方法在linux ...

  4. POJ 1704 Staircase Nim 阶梯博弈

    #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int ...

  5. JavaWeb项目开发案例精粹-第4章博客网站系统-002辅助类及配置文件

    1. <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5&qu ...

  6. Mysql笔记——DDL

    数据库模式定义语言DDL(Data Definition Language),是用于描述数据库中要存储的现实世界实体的语言.一个数据库模式包含该数据库中所有实体的描述定义.   =========== ...

  7. C#之你懂得的序列化/反序列化

    前言:写此文章一方面是为了巩固对序列化的认识,另一方面是因为本人最近在面试,面试中被问到“为什么要序列化”.虽然一直在使用,自己也反复的提到序列化,可至于说为什么要序列化,还真的没想过,所以本文就这样 ...

  8. C++:文件的输入和输出

    1.共同的打开文件方式: fin.open("test.txt",ios::binary) fout.open("test.txt",ios::binary) ...

  9. Sql case when用法

    说明,sql中的if和else 是不能在select 语句中使用的.只能用来控制sql程序的流程.只能用case when. CREATE TABLE USER(NAME VARCHAR(20) NO ...

  10. git服务器gitlab之搭建和使用--灰常好的git服务器【转】

    转自:http://blog.csdn.net/zy416548283/article/details/38057925 git服务器比较有名的是gitosis和gitolite,这两个管理和使用起来 ...