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

 #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. C# TryXXXX模式

    public static int? TrayParse(string text) { int ret; if (int.TryParse(text,out ret)) { return ret; } ...

  2. Magento 二次开发手册相关

    最近开始学习Magento二次开发,其实以前在科泰的时候就已经见识到这套电子商务系统的复杂了,当时是部门要上一个Mangeto的团购系统,傻东安装就安装了2天才搞定,安装以后发现有300多张表,当时说 ...

  3. jackson set properties to default value (取消让jackson 赋予默认值)

    you can define it with Integer rather than int or long. define it with a package type. jackson wont' ...

  4. C# 使用WIN32API设置外部程序窗口无边框

    使用代码 var wnd = win32.FindWindowA(null, "窗口标题"); Int32 wndStyle = win32.GetWindowLong(wnd, ...

  5. iOS开发之都兴忱小结

    1.NSArray/NSDictionary ------> strong temp和self.arr是同一地址. 2.NSArray/NSDictionary ------->copy ...

  6. JLINK固件,JLINK驱动和JLINK硬件版本之间的关系,以及固件升级方法

    初学者容易在这几个问题上面犯迷糊,这里简单的说说.   1. JLINK硬件版本首先说JLINK的硬件版本有V7,V8和V9,相信这一点大家应该都没问题,那怎么看自己手头的JLINK是哪个硬件版本呢, ...

  7. 【golang】用container/list实现栈(Stack)

    go语言中的container有heap.list.ring,没有stack. 其中heap是优先级队列,虽然有Push()/Pop()接口,但是使用heap要实现heap.Interface接口,不 ...

  8. http://www.ruanyifeng.com/blog/2007/03/metadata.html

    http://www.ruanyifeng.com/blog/2007/03/metadata.html

  9. POJ2126——Prime Path(BFS)

    Prime Path DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of ...

  10. WebMvcConfigurerAdapter

    spring Boot 默认的处理方式就已经足够了,默认情况下Spring Boot 使用WebMvcAutoConfiguration中配置的各种属性. 建议使用Spring Boot 默认处理方式 ...