License plate numberTime limit: Ms | Memory limit: 65535 KB Difficulty: 1 description Yan Yan very like to study the license plate number, from the license plate number can see the number registration sooner or later, according to the study found that the license plate number is issued in dictionary order, now she collects a lot of license plate number, please design procedures to help her judge the registration of the earlier number. The license plate number consists of 5 letters or numbers. Input the first line is N, which represents n sets of data, the second row is M, the following M-line is M license plate number
Where the n<100,m<1000 output register an earlier license plate number sample input
1
4
AA100
aa100
0o2r4
ye2er
Sample output
0o2r4
#include <cstdio>
#include <cstring>
char str[1010][10];
int main () {
int n,m,i;
scanf ("%d", &n);
while (n--) {
scanf ("%d", &m);
for (i=0;i<m;++i) {
scanf ("%s", Str[i]);
if (strcmp (str[i],str[0]) <0)
strcpy (Str[0],str[i]);
}
printf ("%s\n", Str[0]);
}
return 0;
}