Line belt Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3531 Accepted Submission(s): 1364 Problem Description In a two-dimensional plane there are two line belts, there are two segments AB…
Problem Description In a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww's speed on AB is P and on CD is Q, he can move with the speed R on other area on the plane. How long must he take to travel from A to D?…
题目链接 Line belt Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2862 Accepted Submission(s): 1099 Problem Description In a two-dimensional plane there are two line belts, there are two segment…
HDU 3400 Line belt (三分再三分) ACM 题目地址: pid=3400" target="_blank" style="color:rgb(0,136,204); text-decoration:none">HDU 3400 Line belt 题意: 就是给你两条线段AB , CD .一个人在AB以速度p跑,在CD上以q跑,在其它地方跑速度是r.问你从A到D最少的时间. 分析: 先三分AB上的点.再三分CD上的点就可以. …
In a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww's speed on AB is P and on CD is Q, he can move with the speed R on other area on the plane. How long must he take to travel from A to D? Input The first lin…
从A出发到D,必定有从AB某个点E出发,从某个点F进入CD 故有E,F两个不确定的值. 在AB上行走的时间 f = AE / p 在其他区域行走的时间 g = EF / r 在CD上行走的时间 h = FD / q 总时间 T = f + g + h 当E确定时,T1 = g + h + C 此时g时一个先减后增的凹函数,h是一个单调递减的凹函数,根据凹函数的性质,故T1是一个凹函数 反之亦然,故需要三分确定其中一个点的位置,再三分另一个点的位置. #include<stdio.h>…