2013
12-04

# 开门人和关门人

3
1
ME3021112225321 00:00:00 23:59:59
2
EE301218 08:05:35 20:56:35
MA301134 12:35:45 21:40:42
3
CS301111 15:30:28 17:00:10
SC3021234 08:00:00 11:25:25
CS301133 21:45:00 21:58:40

ME3021112225321 ME3021112225321
EE301218 MA301134
SC3021234 CS301133

#include <iostream>
#include <string>
using namespace std;

int main()
{
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
string id, start, end;
cin >> id >> start >> end;
string idstart, idend, startmin, endmax;
idstart = id;
idend = id;
startmin = start;
endmax = end;

for(int i = 1; i < n; i++)
{
cin >> id >> start >> end;
if(start < startmin)
{
startmin = start;
idstart = id;
}
if(end > endmax)
{
endmax = end;
idend = id;
}
}
cout << idstart << " " << idend << endl;
}
return 0;
}

1. Thanks for taking the time to examine this, I really feel strongly about it and love studying a lot more on this topic. If possible, as you acquire experience

2. 算法是程序的灵魂，算法分简单和复杂，如果不搞大数据类，程序员了解一下简单点的算法也是可以的，但是会算法的一定要会编程才行，程序员不一定要会算法，利于自己项目需要的可以简单了解。