|
||||||||||
Dog and dogTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 446 Accepted Submission(s): 122 Problem Description 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 Input 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 Output D represent how long dog has run, round to integer. Sample Input
Sample Output
Source | ||||||||||
|