标签:acm tle panel sci asd while output script char s
http://acm.hdu.edu.cn/showproblem.php?pid=2000
#include <bits/stdc++.h>
using namespace std;
char s[111];
int main()
{
while(scanf("%s",s)!=EOF)
{
int len = strlen(s);
for(int i=0; i<len; i++)
{
for(int j=i; j>=1; j--)
{
if(s[j]<=s[j-1])
swap(s[j],s[j-1]);
}
}
for(int i=0; i<len; i++)
{
if(i!=len-1)
printf("%c ",s[i]);
else
printf("%c\n",s[i]);
}
}
return 0;
}
标签:acm tle panel sci asd while output script char s
原文地址:https://www.cnblogs.com/zlrrrr/p/9221815.html