南阳277

 1 #include<stdio.h>
 2 #include<string.h>
 3 char temp[6];
 4 char ans[6];
 5 int main()
 6 {
 7     int n;
 8     scanf("%d",&n);
 9     while(n--)
10     {
11         int m;
12         scanf("%d",&m);
13         scanf("%s",temp);
14         strcpy(ans,temp);
15         while(--m)
16         {
17             scanf("%s",temp);
18             if(strcmp(temp,ans) < 0)
19                 strcpy(ans,temp);
20         }
21         puts(ans);
22     }
23 }
24         
原文地址:https://www.cnblogs.com/qq188380780/p/6544788.html