标签:des style java color os strong io 代码
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<stdio.h>
#include<string.h>
struct stu
{
char number[30];
char come[10];
char go[10];
}person,first,last;
int main()
{
int N,M,i;
scanf("%d",&N);
while(N--)
{
scanf("%d",&M);
scanf("%s%s%s",person.number,person.come,person.go);
first=person;
last=person;
while(--M)
{
scanf("%s%s%s",person.number,person.come,person.go);
if(strcmp(person.come,first.come)<0)
first=person;
if(strcmp(person.go,last.go)>0)
last=person;
}
printf("%s %s\n",first.number,last.number);
}
return 0;
}
HDU 1234 开门人和关门人,布布扣,bubuko.com
标签:des style java color os strong io 代码
原文地址:http://blog.csdn.net/qq_16767427/article/details/38195129