Cod sursa(job #705296)
Utilizator | Data | 3 martie 2012 23:51:23 | |
---|---|---|---|
Problema | Ordine | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<cstdio>
#include<cstring>
#include<algorithm>
char s[1000000];
int f(char x,char y){
return (x!=y);
}
int main(){
freopen("ordine.in","r",stdin);
freopen("ordine.out","w",stdout);
gets(s);
int n = (int)strlen(s);
std :: sort(s,s+n-1,f);
printf("%s",s);
return 0;
}