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)递推. ...
随机推荐
- xampp环境 安装 用法 composer
准备工作 1.打开PHP配置文件E:\xampp\php\php.ini确认以下模块已开启(移除前面的分号). extension=php_openssl.dll, extension=php_cur ...
- Error setting expression 'XXX‘'[Ljava.lang.with value '[Ljava.lang.String;@10101fb'
ognl报的警告,说明你的格式错误,一般是日期格式错误,格式转换器的应用,id设置的类型不对String 类型,输入了Int类型所以方法一是改变这个类中的id的属性 然后get和set也跟着改变 另一 ...
- pathinfo()在php不同版本中对于对多字节字符处理的不同结果
phpinfo()函数在处理路径时,在php的低版本中无法处理多字节字符,这里测试的是php5.3和php5.6 的区别 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
- Object-C中方法
//方法 //方法分了两种 //1.类方法,类调用,方法以+开头 //2.实例方法,对象调用,方法以-开头 //类方法和实例方 ...
- hibernate的一级缓存问题
1.证明一级缓存的问题 输出结果: 只发出一条查询语句 第二条查询语句没有执行 因为第一条查询语句缓存的存在 2. 移除缓存: 输出结果: 3.一级缓存的快照 就是对一级缓存的数据备份 保证数据库的 ...
- Hdu1361&&Poj1068 Parencodings 2017-01-18 17:17 45人阅读 评论(0) 收藏
Parencodings Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total ...
- HDU1372 Knight Moves(BFS) 2016-07-24 14:50 69人阅读 评论(0) 收藏
Knight Moves Problem Description A friend of you is doing research on the Traveling Knight Problem ( ...
- [label][JavaScript]七个JavaScript技巧
重点:http://www.javascriptkit.com/ create an object: var car = new Object(); car.colour = 'red'; car.w ...
- Android Studio Genyomtion配置
在AndroidStudio里面点击 File -> Settings 在Settings界面中,选择Plugins 在Plugins,输入Genymotion,并点击下面的链接 点击Insta ...
- [ACM_水题] UVA 12502 Three Families [2人干3人的活后分钱,水]
Three Families Three families share a garden. They usually clean the garden together at the end o ...