题意: 找到今天第一个出门的人和最后一个进门的人。
思路:
主要在于处理字符串。这里我试着用python求了一下。
n = raw_input()
outtmin = 999999
intmax = -1
for i in range(0,int(n)):
string=raw_input()
s = string.split()
sid = s[0]
outs = s[1]
ins = s[2]
outtimes = outs.split(':')
intimes = ins.split(':')
outtime = int(outtimes[0])*3600 + int(outtimes[1])*60 + int(outtimes[2])
intime = int(intimes[0])*3600 + int(intimes[1])*60 + int(intimes[2])
if outtime < outtmin :
outtmin = outtime
outid = sid
if intime > intmax:
intmax = intime
inid = sid
print outid + " " + inid