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

 #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. Unix安装BerkeleyDB

    下载安装包Berkeley DB 5.3.21.tar.gz http://www.oracle.com/technetwork/products/berkeleydb/downloads/index ...

  2. Linux操作系统下的Sudo命令

    查看.修改或者执行某些命令需要root用户的权限,如果不想直接切换到root用户,就可以使用sudo命令.sudo命令用于针对单个命令授予临时权限.sudo仅在需要时授予用户权限,减少了用户因为错误执 ...

  3. 【poj2891-Strange Way to Express Integers】拓展欧几里得-同余方程组

    http://poj.org/problem?id=2891 题意:与中国剩余定理不同,p%ai=bi,此处的ai(i=1 2 3 ……)是不一定互质的,所以要用到的是同余方程组,在网上看到有人称为拓 ...

  4. WPA/WAP2wifi 密码破解笔记

    前言: 相对于前一段时间脆弱的WEP路由器而言,当今的路由器加密方式也大都改变为WPA/WPA2,使得无线路由器的破解难度增加.虽然如此,但还是有很多漏洞层出不穷,如WPS.退一步来说,即使加密算法无 ...

  5. PO/POJO/VO/BO/DAO/DTO

    PO(persistant object) 持久对象在o/r 映射的时候出现的概念,如果没有o/r映射,就没有这个概念存在了.通常对应数据模型(数据库),本身还有部分业务逻辑的处理.可以看成是与数据库 ...

  6. PowerDesiger 15逆向生成工程E-R图及导出word表格

    应用环境:win8(64位)+oracle10g(32位)服务端+PowerDesigner15 需求:oracle数据库中的表结构是web工程框架hibernate 自动生成,现需要将数据库中已有的 ...

  7. SPOJ 78 Marbles 组合数学

    相当于从n-1个位置里面找k-1个位置放隔板 #include <cstdio> #include <cstring> #include <cstdlib> #in ...

  8. Delphi遍历文件夹

    /// <remarks> /// 遍历文件夹 (引用SysUtils单元) /// </remarks> procedure TfrmMusicMenu.SearchInDi ...

  9. 使用ExtJs实现文件下载

    文件下载,是不可以直接通过Ext.Ajax.Request来实现的.一般的,可以通过创建一个隐藏的form表单来实现.具体代码以及代码注释如下: if (!Ext.fly('downForm')){ ...

  10. linux硬件驱动层

    1.make menuconfig scripts/kconfig/lxdialog/menubox.o: In function `print_buttons':menubox.c:(.text+0 ...