文章

60

粉丝

361

获赞

41

访问

498.7k

头像
简洁
P1254 北京大学机试题
发布于2021年1月13日 09:34
阅读数 7.4k

#include <iostream>
#include <string>
#include <string.h>
#include<algorithm>
using namespace std;

bool compare(char a,char b)
{
	return a<b;
}
int main()
{
	char s[30];
	scanf("%s",&s);
	int len=strlen(s);
	sort(s,s+len,compare);
	printf("%s",s);
	//system("pause");
	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发