1 solutions
-
1
不用管某个错误啊在洛谷上是满分好了,自己看吧...#include <iostream> #include <bits/stdc++.h> using namespace std; bool compare(string x,string y)//重载排序 { return x+y>y+x; } int main() { int n; cin>>n; string a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n,compare);//排序 for(int i=0;i<n;i++){ cout<<a[i]; } return 0; }
- 1
Information
- ID
- 605
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 5
- Tags
- # Submissions
- 5
- Accepted
- 1
- Uploaded By