0
点赞
收藏
分享

微信扫一扫

NYOJ277 - 车牌号



第一行是n,代表有n组数据,第二行是m,以下m行是m个车牌号码

其中n<100,m<1000

输出 输出注册较早的车牌号 样例输入

1 4 AA100 aa100 0o2r4 ye2er

样例输出

0o2r4



#include<stdio.h>
#include<string.h>
int main(){
int T;
scanf("%d",&T);
while(T--){
int T1;
char s[10];
scanf("%d",&T1);
scanf("%s",s);
T1--;
while(T1--){
char ch[10];
scanf("%s",ch);
if(strcmp(ch,s) < 0)
strcpy(s, ch);
}
puts(s);
}
return 0;
}



举报

相关推荐

0 条评论