3044:Dog and dog

题目描述
Nowadays, Xiaoyang thinks of a simple problem. The problem is derive from primary school: Two men get close with the same speed v1, there is a dog run between them with speed v2. It is easy to answer the question that how long dog has run (D) before they meet. Since it is so easy, he want to change this problem. Two men can see each other within 10 meters, if their distance less than 10 meters, then they stop. The dog can run at most L2 meters. At first, two man's distance is L1 meters, their speeds are changed. The left man's speed becomes and the right man's speed becomes . The dog's speed also changed to
输入解释
the first line N, then N lines follows
each line has 4 parameters L1, L2, V1, V2;

0<=L1,L2<=100,0<v1,v2<=100
输出解释
D represent how long dog has run, round to integer.
输入样例
2
9 1 2 3 
47 11 25 9
输出样例
0
11
来自杭电HDUOJ的附加信息
Recommend gaojie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3044

最后修改于 2020-10-25 22:59:31 UTC 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)

·

·

·

·

登陆或注册以提交代码