1006 Sign In and Sign Out (25 分)
作者:互联网
#include<iostream>
#include<climits>
using namespace std;
int main()
{
int n,min=INT_MAX,max=INT_MIN;
cin>>n;
string unlock,lock;
for(int i=0;i<n;i++)
{
strint t;
cin>>t;//名字
int s1,f1,m1,s2,f2,m2;//进入时间和出去时间
cin>>s1>>f1>>m1>>s2>>f2>>m2;
int t1=s1*3600+f1*60+m2;
int t2=s2*3600+f2*60+m2;
if(t1<min)
{
min=t1;
unlock=t;
}
if(t1>max)
{
max=t1;
lock=t;
}
}
cout<<unlock<<" "<<lock<<endl;
return 0;
}
标签:f1,f2,int,s2,s1,Sign,m2,1006,Out 来源: https://blog.csdn.net/qq_38054511/article/details/122638183