@[luogu_tanbozhi](/user/1321076) 你string初始化0干什么?
by hhhcj @ 2024-04-27 19:19:16
@[luogu_tanbozhi](/user/1321076) 代码如下:
```cpp
#include <bits/stdc++.h>
using namespace std;
int n;
string s[21] = {};
bool cmp(string x, string y)
{
return (x+y) > (y+x);
}
int main()
{
cin>>n;
for(int i=1; i<=n; i++)
{
cin>>s[i];
}
sort(s+1, s+n+1, cmp);
for(int i=1; i<=n; i++)
{
cout<<s[i];
}
cout<<endl;
return 0;
}
```
by hhhcj @ 2024-04-27 19:19:43
@[luogu_tanbozhi](/user/1321076) 对了,壶关吗?
by hhhcj @ 2024-04-27 19:21:19
@[hhhcj](/user/1021663) 壶关了
by luogu_tanbozhi @ 2024-05-08 21:45:10