URAL - 1902 Neo-Venice
题目:
Input
Output
Example
| input | output |
|---|---|
2 60 600 |
630.000000 |
思路:水题:ans=(t+s+x)/2;
#include <bits/stdc++.h> using namespace std; #define MP make_pair
#define PB push_back
typedef long long LL;
typedef pair<int,int> PII;
const double eps=1e-;
const double pi=acos(-1.0);
const int K=1e6+;
const int mod=1e9+; int n,t,s,x;
int main(void)
{
cin>>n>>t>>s;
for(int i=;i<=n;i++)
scanf("%d",&x),printf("%.6f\n",(s+t+x)/2.0);
return ;
}
URAL - 1902 Neo-Venice的更多相关文章
- 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...
- ural 2071. Juice Cocktails
2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...
- ural 2073. Log Files
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...
- ural 2070. Interesting Numbers
2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate int ...
- ural 2069. Hard Rock
2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock ...
- ural 2068. Game of Nuts
2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...
- ural 2067. Friends and Berries
2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. ...
- ural 2066. Simple Expression
2066. Simple Expression Time limit: 1.0 secondMemory limit: 64 MB You probably know that Alex is a v ...
- ural 2065. Different Sums
2065. Different Sums Time limit: 1.0 secondMemory limit: 64 MB Alex is a very serious mathematician ...
随机推荐
- CI cookie 存放数组
#ci cookie 由于不能存放数组,所有必须序列化之后在存入数组中 #定义数组 $cookie_array=array( 'shop_id'=>$gid, 'shop_name'=> ...
- 使用StringTokenizer分解字符串
Java切割字符串.一般使用substring.split.StringTokenizer来处理,前两种是String对象的方法,使用字符串能够直接处理,本文介绍下StringTokenizer的使用 ...
- EM算法--原理
EM算法即期望最大化(Expection Maximization)算法,是一种最优化算法,在机器学习领域用来求解含有隐变量的模型的最大似然问题.最大似然是一种求解模型参数的方法,顾名思义,在给定一组 ...
- Asp.net控制Tomcat启动关闭的实现方法
一.场景 近日有个项目客户要求能自己配置相关权限.由于历史原因这个项目采用的是公司以前的权限系统.这个权限系统很强大,不过有个弊端,就是每增加一个权限菜单都要重启才能生效,不然就要等1天它缓存过期后才 ...
- boost数据结构tuple
boost数据结构tuple tuple(元组)定义了一个有固定数目元素的容器,其中每个元素类型可以不相同,这与其它容器有着本质的区别!vector和array虽然可以容纳很多元素,但是元素的类型必须 ...
- Python标准库:内置函数delattr(object, name)
本函数是用来删除对象的属性,比方在函数setattr()里加入的属性,就能够利用这个函数来删除. 參数object是一个对象,參数name是一个字符串,但这个字符串必须是对象的属性.比方delattr ...
- IOS开发报错之Undefined symbols for architecture armv6
本文转载至 http://blog.csdn.net/sanpintian/article/details/7575434 今天在项目中引入SVSegmentedControl.h/.my以及SVS ...
- python之range和xrange
range 前面小节已经说明了,range([start,] stop[, step]),根据start与stop指定的范围以及step设定的步长,生成一个序列. 比如: 1 >>> ...
- mysql source 执行sql脚本,中文变量不显示问题或乱码问题
执行脚本内容如下: SET @pre_version=2017080901; SET @cur_version=2017090401; SET @ver_desc = '测试脚本'; CALL pro ...
- [Android]反编译apk + eclipse中调试smali
从来没有想过反编译apk是来的如此方便,并且还可以修改后重新编译运行,这比在win下修改pe容易多了,感谢apktool和smali工具的作者提供这么好的工具. 跟踪apk一般的做法是在反编译的sma ...