1006 Sign In and Sign Out

1006 Sign In and Sign Out (25)(25 分)

At the beginning of every day, the first person who signs in the

computer room will unlock the door, and the last one who signs out will

lock the door. Given the records of signing in's and out's, you are

supposed to find the ones who have unlocked and locked the door on that

day.

Input Specification:

Each input file contains one test case. Each case contains the records

for one day. The case starts with a positive integer M, which is the

total number of records, followed by M lines, each in the format:

ID_number Sign_in_time Sign_out_time

where times are given in the format HH:MM:SS, and ID number is a string

with no more than 15 characters.

Output Specification:

For each test case, output in one line the ID numbers of the persons who

have unlocked and locked the door on that day. The two ID numbers must

be separated by one space.

Note: It is guaranteed that the records are consistent. That is, the

sign in time must be earlier than the sign out time for each person, and

there are no two persons sign in or out at the same moment.

Sample Input:

3

CS301111 15:30:28 17:00:10

SC3021234 08:00:00 11:25:25

CS301133 21:45:00 21:58:40

Sample Output:

SC3021234 CS301133




?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,854評論 0 10
  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 11,088評論 0 23
  • 南國一樹相思醉。 愛煞人,愁殺人。 摘得幾個捎回去: 兩個放腳心:尋遍天涯, 不見心想那個人! 兩個放手心: 重了...
    傲骨謙顏閱讀 336評論 5 24
  • 冬天的故事 還是留在夏天來講 原來記憶沒有生命那么長 我有沒有年輕時那么慌張 人與人 不是我和你 因為彷徨 隔了一...
    我_1773閱讀 225評論 0 1
  • 一 繼續(xù)追劇《那時花開月正圓》,為善良正直純情的高富帥吳聘之死扼腕嘆息,難道好男人遭天妒?連編劇也只能讓他早死? ...
    蕾妮9808閱讀 1,167評論 1 6

友情鏈接更多精彩內(nèi)容