国产激情自拍_国产9色视频_丁香花在线电影小说观看 _久久久久国产精品嫩草影院

首頁 > 學院 > 開發設計 > 正文

【Codeforces 782 B The Meeting Place Cannot Be Changed】+ 二分

2019-11-06 06:32:30
字體:
來源:轉載
供稿:網友

B. The Meeting Place Cannot Be Changed time limit per test5 seconds memory limit per test256 megabytes inputstandard input outputstandard output The main road in Bytecity is a straight line from south to north. Conveniently, there are coordinates measured in meters from the southernmost building in north direction.

At some points on the road there are n friends, and i-th of them is standing at the point xi meters and can move with any speed no greater than vi meters per second in any of the two directions along the road: south or north.

You are to compute the minimum time needed to gather all the n friends at some point on the road. Note that the point they meet at doesn’t need to have integer coordinate.

Input The first line contains single integer n (2?≤?n?≤?60?000) — the number of friends.

The second line contains n integers x1,?x2,?…,?xn (1?≤?xi?≤?109) — the current coordinates of the friends, in meters.

The third line contains n integers v1,?v2,?…,?vn (1?≤?vi?≤?109) — the maximum speeds of the friends, in meters per second.

Output PRint the minimum time (in seconds) needed for all the n friends to meet at some point on the road.

Your answer will be considered correct, if its absolute or relative error isn’t greater than 10?-?6. Formally, let your answer be a, while jury’s answer be b. Your answer will be considered correct if holds.

Examples input 3 7 1 3 1 2 1 output 2.000000000000 input 4 5 10 3 2 2 3 2 4 output 1.400000000000 Note In the first sample, all friends can gather at the point 5 within 2 seconds. In order to achieve this, the first friend should go south all the time at his maximum speed, while the second and the third friends should go north at their maximum speeds.

二分~~

AC代碼:

#include<cstdio>#include<algorithm>using namespace std;typedef long long LL;const int K = 1e5 + 10;const LL KL = 1e10 + 10;const int p = 1e7;double a[K],b[K];int N;bool bc(double o){ double ll = a[1] - b[1] * o,rr = a[1] + b[1] * o; for(int i = 2 ; i <= N; i++){ double bl = a[i] - b[i] * o,br = a[i] + b[i] * o; if(bl > rr || br < ll) return false; ll = max(ll,bl),rr = min(rr,br); } return true;}int main(){ scanf("%d",&N); for(int i = 1; i <= N; i++) scanf("%lf",&a[i]); for(int i = 1; i <= N; i++) scanf("%lf",&b[i]); LL sum = 100; double pl = 0,l = 0, r = KL * 1.0; while(sum--){ double m = (l + r) / 2; if(bc(m)) r = m,pl = m; else l = m; } printf("%lf/n",pl); return 0;}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
国产激情自拍_国产9色视频_丁香花在线电影小说观看 _久久久久国产精品嫩草影院
久热免费视频| 国产特级毛片| 亚洲图区综合| 亚洲综合色视频在线观看 | 国产一级粉嫩xxxx| 国产人成在线视频| 一本大道久久精品| 天天操天天曰| 色中文字幕在线| 国产剧情av在线| 2021av在线| 国产精选在线观看| 在线国产中文字幕| 国产毛片在线看| 伊人狠狠av| 国产精品视频二区三区| 在线免费观看黄色av| 国产资源在线看| 国产一二三区精品视频| 永久免费网站在线| 五月天天在线| 久久亚洲资源| av在线免费播放| 国产人成高清视频观看| 超碰国产在线观看| 一本大道久久精品| 国产福利免费在线观看| 午夜不卡视频| 国产精品一二三区视频| www黄在线观看| 一区二区精品区| 精品女厕厕露p撒尿| 国产素人视频在线观看| 日本欧洲一区| 精品视频一二区| 国产对白在线| 精品黄色免费中文电影在线播放| 国产午夜在线视频| 国产一区二区三区不卡在线| 国产麻豆精品一区二区三区v视界| av中文字幕在线看| 亚洲欧美自拍另类| 日本福利午夜视频在线| 久久五月精品中文字幕| 国产在线一二三| 导航福利在线| 国产毛片在线看| 国产香蕉免费精品视频| 中文字幕色视频| √天堂8资源中文在线| 国产精品四虎| 伊人永久在线| www.中文字幕久久久| 久久国产热视频| 99热在线免费播放| ·天天天天操| 青青草免费在线视频| 国产麻豆视频| 国产激情在线| 人日人天天爽| 国产网站免费观看| 在线播放av网站| 狠狠干天天爱| 国产鲁鲁视频在线观看特色| 国产午夜视频在线观看| 99久热re在线精彩视频| 全网国产福利在线播放| 中文字幕人成高视频| 国产福利电影在线| 开心婷婷激情五月| 国产区在线观看| 青青草视频免费在线观看| 国产一卡2卡3卡四卡网站| 夜夜操天天干| 国产精品被窝福利一区| 激情丁香婷婷| av在线资源网| 国产盗摄一区二区| 四虎www视频| 国产激情二区| 99视频免费在线观看| 亚洲精品午夜级久久久久| 国产伦精品一区二区三区高清版禁 | 国产精品入口麻豆完整版| av男人的天堂网| 国产福利视频在线观看| 福利视频在线看| 在线观看免费黄色| 国产福利视频在线| 国产三级视频| 国产一二三在线观看| 国产69精品久久app免费版| av中文字幕在线看| 精品福利视频导航大全| 国产黄色在线网站| 国产二区三区在线| 国产视频精品久久| 国产麻豆精品视频一区二区| 日本视频三区| av在线免费播放网站| 91国内精品久久久久| 国产三级自拍| 国产卡一卡二卡三| 久色视频在线观看| 国产麻豆精品视频一区二区 | 日本中文字幕高清视频| 国产免费a∨片在线观看不卡| 欧美成人久久电影香蕉| 热99re久久精品精品免费| 青草视频在线播放| 成人av小说网| 国产激情在线视频| 一本大道香蕉8中文在线视频| gogogogo高清视频在线| 日本不卡影院| 综合激情亚洲| 亚洲天堂影院在线观看| 美女国产在线| 国产日产一区二区| 亚洲图区综合| 国产麻豆精品一区二区三区v视界| 中文字幕在线免费观看| 国产porny蝌蚪视频| 日本视频一二三区中文字幕| 尤物视频在线看| 在线国产小视频| 国产羞羞视频在线观看| 99色在线观看| 丁香婷婷在线| 国产成人精品男人的天堂538| 四虎成人欧美精品在永久在线 | 黄色在线视频观看网站| 国产极品视频| 国产女王在线**视频| 一本免费视频| 国产免费黄色| 天天干天天操天天爽| 国产污视频在线| 九九热视频在线| 99在线播放| 国产视频二区三区| 激情五月色综合亚洲小说| 精品极品三级久久久久| 免费看的av| 日本一本久久| 99在线免费观看| 最近中文字幕在线中文视频| 三级小说一区| 亚洲wwwwww| 91久久精品国产性色| 中文字幕免费中文| 国产男女无套在线播放| 超碰免费在线观看| 青草av在线| av麻豆国产| 在线国产一级| 91在线视频免费看| 国产高清av| 国产桃色电影在线播放| 午夜av电影| 国产精品久久精品牛牛影视| 国产一二区在线| 日本中文字幕视频在线| 天天操天天射天天色| 天天av综合网| 国产美女av在线| 最新天堂资源在线| 国产黄色在线播放| 国产9色视频| 精品福利视频导航大全| 亚洲欧美精品日韩欧美| 欧美日韩国产亚洲沙发| 国产永久av在线| 成人免费一区二区三区视频网站| 国产中文伊人| 国产视频2区| 亚洲夜夜综合| 九九热视频在线观看| 国产亚洲精品自在线观看| 精品一区二区在线欧美| 亚洲欧美小说国产图片| 久久久久久日本一区99| 中文字幕毛片| 亚洲天堂视频在线观看免费| 免费看成年人视频在线观看| 国产一二区视频| 亚洲欧美精选| 国产精品作爱| 精品久久久久一区二区三区| 日韩精品免费一区二区| 中文字幕在线视频免费观看| 97一区二区三区| 美女av在线播放| 精品一区二区三区在线成人| 免费女人毛片视频| 国产精品久久久久久久久鸭| av在线不卡免费| 国产三级视频在线| 国产鲁鲁视频在线观看特色| 午夜在线网站|