Unaccepted 100pts求助玄关
查看原帖
Unaccepted 100pts求助玄关
1005477
zhoubohan624楼主2024/5/30 21:17

咱就是说,100pts100pts还Unaccepted?Unaccepted?

不扯淡了,发代码

#include<bits/stdc++.h>
using namespace std;
string a[100005];
bool cmp(string x,string y){
	return (x+y>y+x);
}
int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	sort(a,a+n+1,cmp);
	for(int i=1;i<=n;i++){
		cout<<a[i];
	}
	return 0;
}

wawawawawawa

2024/5/30 21:17
加载中...