技巧挺强的。
CODE:
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 51
int cmp(string a, string b)
{
if(a+b > b+a) return 1;
return 0;
} //string已经重载了 < > = 运算符
string str[MAXN];
int main()
{
int n;
while(scanf("%d", &n) && n)
{
for(int i = 0; i < n; i++)
cin>>str[i];
for(int i = 0; i < n; i++)
cout<<str[i];
cout<<endl;
}
return 0;
}
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
#define MAXN 51
int cmp(string a, string b)
{
if(a+b > b+a) return 1;
return 0;
} //string已经重载了 < > = 运算符
string str[MAXN];
int main()
{
int n;
while(scanf("%d", &n) && n)
{
for(int i = 0; i < n; i++)
cin>>str[i];
for(int i = 0; i < n; i++)
cout<<str[i];
cout<<endl;
}
return 0;
}