日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

URAL - 1902 Neo-Venice

發布時間:2023/11/27 生活经验 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 URAL - 1902 Neo-Venice 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

題目:

Mars was the first planet colonized by humans. After a long terraforming process its appearance has changed completely. From the red desert it has become a blue planet covered by water. There was so much water that some of the cities were built not on land, but on stilts over the water. The most famous one was Neo-Venice. There are canals instead of roads and numerous gondolas instead of cars in this city. All this attracts huge crowds of tourists from the Earth to Neo-Venice. The most popular activities among them are boat excursions. Gondolas are steered by young girls who can not only bring tourists through the canals but also tell them about the history of the city or sing a song along the way. Due to their love for the water these girls are called undines. The undine Anna has just received a license to steer a gondola. Tomorrow she will carry tourists on excursion to the St. Peter's canal. This canal is narrow, but many popular routes are passing through it, so there are always a lot of gondolas. Anna is afraid that her excitement may lead to a crash with another gondola during the excursion. However, all undines are trained to steer the gondola smoothly and with the same speed, so the only threat comes from gondolas sailing in the opposite direction. Anna knows the schedule of her colleagues and when she herself will enter the canal. Now she wants to know exactly when she will encounter other gondolas, in order to be extra careful around them.

Input

The first line of the input contains integers?n,?t?and?s.?n?is the number of undines who will go through the St. Peter’s canal in the opposite direction (1 ≤?n?≤ 100).?t?is the time needed for the gondola to sail through the entire length of the canal (1 ≤?t?≤ 100).?s?is the moment of time at which the Anna's gondola will enter the canal (360 ≤?s?≤ 1200). The second line contains integers?s?1, …,?s?nthat define the moments of time at which the gondolas of Anna’s colleagues will appear on the opposite side of the canal.?s???t?<?s?1?< … <?s?n?<?s?+?t.

Output

Output?n?numbers that are the points of time when Anna will meet her colleagues, with absolute or relative error no more than 10??6. Numbers should be separated with spaces or line feeds.

Example

inputoutput
2 60 600
600 630
630.000000
645.000000

?

思路:水題:ans=(t+s+x)/2;

 1 #include <bits/stdc++.h>
 2 
 3 using namespace std;
 4 
 5 #define MP make_pair
 6 #define PB push_back
 7 typedef long long LL;
 8 typedef pair<int,int> PII;
 9 const double eps=1e-8;
10 const double pi=acos(-1.0);
11 const int K=1e6+7;
12 const int mod=1e9+7;
13 
14 
15 int n,t,s,x;
16 int main(void)
17 {
18     cin>>n>>t>>s;
19     for(int i=1;i<=n;i++)
20         scanf("%d",&x),printf("%.6f\n",(s+t+x)/2.0);
21     return 0;
22 }

?

轉載于:https://www.cnblogs.com/weeping/p/6383769.html

總結

以上是生活随笔為你收集整理的URAL - 1902 Neo-Venice的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。