21108_Educationaljourney

2022-5-16 18:18| 发布者: Hocassian| 查看: 46| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-89504847974299-Problem List-采集的数据-后羿采集器.html

Pro.ID

21108

Title

Educational journey

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21108

AC

11

Submit

31

Ratio

35.48%

时间&空间限制

  • Time Limit: 1000/500 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    The University of Calgary team qualified for the 28th ACM International Collegiate Programming Contest World Finals in Prague, Czech Republic. Just by using the initials of team members they got a very cunning team name: ACM (Alecs, Celly and Monny). In order to prepare for the contest, they have decided to travel to Edmonton to learn the tricks of trade from Dilbert, Alberta-wide famous top-coder.

    Due to a horrible miscommunication which is as welcome as a plague among such teams, A, C and M drive from Calgary to Edmonton in separate cars. To make things worse, there was also a miscommunication with D, who being always so helpful, decides to go to Calgary in order to save the team a trip to the far, freezing North. All this happens on the same day and each car travels at a constant (but not necessarily the same) speed on the famous Alberta #2.

    A passed C and M at time t1 and t2, respectively, and met D at time t3. D met C and M at times t4 and t5, respectively. The question is: at what time time did C pass M?

    输入

    The input is a sequence of lines, each containing times t1, t2, t3, t4 and t5, separated by white space. All times are distinct and given in increasing order. Each time is given in the hh:mm:ss format on the 24-hour clock. A line containing -1 terminates the input.

    输出

    Description

    The University of Calgary team qualified for the 28th ACM International Collegiate Programming Contest World Finals in Prague, Czech Republic. Just by using the initials of team members they got a very cunning team name: ACM (Alecs, Celly and Monny). In order to prepare for the contest, they have decided to travel to Edmonton to learn the tricks of trade from Dilbert, Alberta-wide famous top-coder.

    Due to a horrible miscommunication which is as welcome as a plague among such teams, A, C and M drive from Calgary to Edmonton in separate cars. To make things worse, there was also a miscommunication with D, who being always so helpful, decides to go to Calgary in order to save the team a trip to the far, freezing North. All this happens on the same day and each car travels at a constant (but not necessarily the same) speed on the famous Alberta #2.

    A passed C and M at time t1 and t2, respectively, and met D at time t3. D met C and M at times t4 and t5, respectively. The question is: at what time time did C pass M?

    Input

    The input is a sequence of lines, each containing times t1, t2, t3, t4 and t5, separated by white space. All times are distinct and given in increasing order. Each time is given in the hh:mm:ss format on the 24-hour clock. A line containing -1 terminates the input.

    Output

    For each line of input produce one line of output giving the time when C passed M in the same format as input, rounding the seconds in the standard way.

    Sample Input

    10:00:00 11:00:00 12:00:00 13:00:00 14:00:00
    10:20:00 10:58:00 14:32:00 14:59:00 16:00:00
    10:20:00 12:58:00 14:32:00 14:59:00 16:00:00
    08:00:00 09:00:00 10:00:00 12:00:00 14:00:00
    -1

    Sample Output

    12:00:00
    11:16:54
    13:37:32
    10:40:00

    Source

    样例输入

    10:00:00 11:00:00 12:00:00 13:00:00 14:00:00
    10:20:00 10:58:00 14:32:00 14:59:00 16:00:00
    10:20:00 12:58:00 14:32:00 14:59:00 16:00:00
    08:00:00 09:00:00 10:00:00 12:00:00 14:00:00
    -1

    样例输出

    12:00:00
    11:16:54
    13:37:32
    10:40:00

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部