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 ...
随机推荐
- android启动界面
/** * 应用程序启动类:显示欢迎界面并跳转到主界面 * <a href="http://my.oschina.net/arthor" target="_bl ...
- Swift-8-枚举
// Playground - noun: a place where people can play import UIKit // 枚举语法 enum SomeEnumeration { // e ...
- js Date操作
new Date(new Date().getTime() - 24 * 24 * 60 * 60 * 1000)类似C#中的AddDays,返回一个月前的时间 //时间格式化方法 v ...
- Hadoop2的FN安装(federated namespace)
尝试了简单的安装hadoop2后,我们再来尝试一下hdfs的一项新功能:FN.这项技术可以解决namenode容量不足的问题.它采用多个namenode来共享datanode的方式,每个namenod ...
- poj 1129(dfs+图的四色定理)
题目链接:http://poj.org/problem?id=1129 思路:根据图的四色定理,最多四种颜色就能满足题意,使得相邻的两部分颜色不同.而最多又只有26个点,因此直接dfs即可. #inc ...
- php面试题笔试题 比较有用
一.选择题1.php的源代码是 (A )A.开放的 B.封闭的 C.需购买的 D.完全不可见的2.php的输出语句是 ( C )A.out.print B.response.write C.echo ...
- Domino移动Web上传的附件到RichText域
只是从网上拷贝下来,没有测试. 得到上传文件的路径http://searchdomino.techtarget.com/tip/Trap-an-attachment-path-via-the-Domi ...
- contos7 mongodb安装教程
通过yum安装mongodb 1.创建文件mongodb.repo文件, cd /etc/yum.repos.d/ vi mongodb.repo 复制如下代码: [mongodb-org-3.4] ...
- python scrapy,beautifulsoup,regex,sgmparser,request,connection
In [2]: import requests In [3]: s = requests.Session() In [4]: s.headers 如果你是爬虫相关的业务?抓取的网站还各种各样, ...
- Web 资源介绍
软件体系结构 C/S, client/server 特点: 该结构的软件, 客户端和服务端都需要编写 开发成本较高,维护较为麻烦 好处: 客户端在本地可以分担一部分运算 B/S, browser/se ...