The World

TimeLimit:1000MS  MemoryLimit:262144KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
The World can indicate world travel, particularly on a large scale. You may be lucky enough to be embarking on a six-month overseas trip, or are working, studying or living overseas for an extended period of time. Similarly, this card reinforces Universal understanding and global awareness, and you will have a new appreciation for people and cultures from across the world.

Across the world there are various time zones, leading to time differences. Here you are informed of several famous capitals and their corresponding time zones.

  • Beijing - China - UTC + 8 (China Standard Time)

  • Washington - United States - UTC - 5 (Eastern Standard Time)

  • London - United Kingdom - UTC (Greenwich Mean Time)

  • Moscow - Russia - UTC + 3 (Moscow Time)

  • Given the local time of a city, you are expected to calculate the date and local time of another specific city among the above capitals.
    Input
    The first line of input contains a single integer $T$ ≤ 1000 indicating the number of testcases.
    Each testcase consists of three lines. The first line is in the form of “hour:minute AM/PM” (1 ≤ $hour$ ≤ 12, 00 ≤ $minute$ ≤ 59) indicating the local time. Next two lines contain two strings $s_1$, $s_2$. $s_1$ is the name of city corresponding to the given time, while $s_2$ indicates the city you are expected to calculate the local time.
    Output
    For each testcase, begin with “Case $i$:”, where $i$ indicate the case number, and then output a single line in the following format“Yesterday/Today/Tomorrow $hour:minute$ AM/PM”, separated by spaces. The first word describes the corresponding date.
    SampleInput
    2
    12:00 AM
    London
    Moscow
    4:00 PM
    London
    Beijing
    SampleOutput
    Case 1: Today 3:00 AM
    Case 2: Tomorrow 12:00 AM
    Submit
    题目统计信息详细
    总AC数8
    通过人数7
    尝试人数7
    总提交量16
    AC率43.75%
    AC该题后可以添加标签
    贴完标签可以获得20ACB。
    并且可以获得本题所有提交代码查看权限。
    点击标题可以显示标签。
    如果你还没认真思考过这题,请不要查看标签
    如果您已经通过了该题,请务为该题贴上标签

    T^T Online Judge

    [BUG反馈] [FAQ] [闽ICP备17026590号-1]
    当前版本:3.24 系统时间: