The problem is simple , Find the front , Find the last , The idea is very clear :

code :
#include <cstdio> #include <cstring> #include <vector> #include <queue>
#include <iostream> #include <algorithm> #define int long long using namespace
std; const int N = 1010; struct node{ char name[20]; char betime[20]; char
endtime[20]; }person[N]; int n; bool cmp1(struct node a,struct node b){ return
strcmp(a.betime, b.betime)<0?true:false; } bool cmp2(struct node a,struct node
b){ return strcmp(a.endtime, b.endtime)>0?true:false; } signed main() { cin>>n;
for(int i=1;i<=n;i++) {
cin>>person[i].name>>person[i].betime>>person[i].endtime; }
sort(person+1,person+1+n,cmp1); printf("%s",person[1].name); printf(" ");
sort(person+1,person+1+n,cmp2); printf("%s",person[1].name); printf("\n");
return 0; }
However, the goose needs to pay attention to :
// Find the writing method of a string from small to large bool cmp1(struct node a,struct node b){ return
strcmp(a.betime, b.betime)<0?true:false; }

Technology
©2019-2020 Toolsou All rights reserved,
Dynamic Simple registration login interface HTML+CSS+JQCSS Implement overflow display ellipsis 802.11 CCA and NAV mechanism Programmer refused due to low salary offer,HR become shame , Netizens instantly blew up ..abaqus Value of mass scaling factor _ABAQUS Mass scaling for Java Student information management system console version C Classic topics of language —— Insert a number into the sorted array Computer level 1 multi-point , How many points can I pass the computer test level 1 VINS-Fusion run kitti stereo and stereo+GPS data TS stay vue2 Writing in the project