POJ 2350
#include<iostream>
#include<stdio.h>
#include<iomanip>
using namespace std;
int main()
{
//freopen("acm.acm","r",stdin);
int * score;
int i;
double sum;
int k;
int num;
int anum;
cin>>anum;
while(anum--)
{
cin>>num;
sum = ;
k = ;
score = new int[num];
for(i = ; i < num ; i++)
{
cin>>score[i];
sum += score[i];
}
sum = sum/double(num);
for(i = ; i < num; i ++)
{
if(score[i]>sum)
k++;
}
cout<<setiosflags(ios::fixed)<<setprecision()<<double(k)/double(num)*<<"%"<<endl;
}
}
POJ 2350的更多相关文章
- POJ 2350 Above Average
Description It is said that 90% of frosh expect to be above average in their class. You are to provi ...
- Poj 2350 Above Average(精度控制)
一.Description It is said that 90% of frosh expect to be above average in their class. You are to pro ...
- POJ 题目分类(转载)
Log 2016-3-21 网上找的POJ分类,来源已经不清楚了.百度能百度到一大把.贴一份在博客上,鞭策自己刷题,不能偷懒!! 初期: 一.基本算法: (1)枚举. (poj1753,poj2965 ...
- (转)POJ题目分类
初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. ...
- poj分类
初期: 一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. ( ...
- poj 题目分类(1)
poj 题目分类 按照ac的代码长度分类(主要参考最短代码和自己写的代码) 短代码:0.01K--0.50K:中短代码:0.51K--1.00K:中等代码量:1.01K--2.00K:长代码:2.01 ...
- POJ 1260:Pearls(DP)
http://poj.org/problem?id=1260 Pearls Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 8 ...
- POJ题目分类(按初级\中级\高级等分类,有助于大家根据个人情况学习)
本文来自:http://www.cppblog.com/snowshine09/archive/2011/08/02/152272.spx 多版本的POJ分类 流传最广的一种分类: 初期: 一.基本算 ...
- POJ题目分类(转)
初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. ...
随机推荐
- KbmMW 4.5 发布
We are happy to announce the release of kbmMW v. 4.50.00 Professional, Enterprise and CodeGear Editi ...
- linux下mysql命令大全
1.linux下启动mysql的命令: mysqladmin start /ect/init.d/mysql start (前面为mysql的安装路径) 2.linux下重启mysql的命令: mys ...
- Exception: java.io.FileNotFoundException: D:\Users\liuyangOS2237\Workspaces\MyEclipse%2010\Zhuce\WebRoot\WEB-INF\classes\users.xml (系统找不到指定的路径。解决
com.exception.DaoException: java.io.FileNotFoundException: D:\Users\liuyangOS2237\Workspaces\MyEclip ...
- “无后端”的web应用开发模式
最近看到前端趋势2013大会上的一篇文章,题目是<各位快看,不用后端>,觉得有点意思,恰好近期的一次讨论及半年前的一次开发实践也涉及到这种模式,简单谈谈我的想法. 不得不说,文章的题目确实 ...
- centos yum command
yum repolist all -- 列出所有仓库 yum list all -- 列出仓库中所有软件包 yum info package-name -- 查看软件包信息 yum install p ...
- (KMP)Seek the Name, Seek the Fame -- poj --2752
http://poj.org/problem?id=2752 Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536 ...
- HDU6026 Deleting Edges 2017-05-07 19:30 38人阅读 评论(0) 收藏
Deleting Edges Time ...
- [译]在 Andriod/IOS 程序中使用自己的字体
原文链接:http://firemonkeyblog.blogspot.com/2014/12/using-custom-fonts-in-android-delphi.html 你应该能够在 And ...
- js 利用数组实现类似于asp中的数据字典
---恢复内容开始--- 首先声明一个数组 var dictNew=new Array; var key; var value; for (var i = 0; i <50; i++) { // ...
- Winform打包安装程序覆盖安装的实现
1.修改项目程序集版本号. 2.设置Version,使当前版本号大于前一个版本号. 3.RemovePreviousVersions属性设置为true. 以上三步后,生成安装程序即可实现覆盖安装. P ...