#include<iostream> #include<string> using namespace std; int main(){ int cnt;cin>>cnt; string first,last,in("44:44:44"),out("00:00:00"); while(cnt--){ string a,b,c;cin>>a>>b>>c; if(b<in){first=a;in=b;}; if(c>out){last=a;out=c;} } cout<<first<<' '<<last; return 0; }
时间: 2024-08-01 21:22:36