| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:其实不用排序只需要将字符串转换为整数然后用STL,再转为字符串输出就行了In Reply To:其实不用排序只需要将字符串转换为整数然后用STL,再转为字符串输出就行了 Posted by:Eli_love at 2010-03-11 15:29:46 > for(i=0;i<len;i++)
> {
> if(s[i]>='a' && s[i]<='z')
> a[(s[i]-'a')*2+1]++;
> else a[(s[i]-'A')*2]++;
> }
> int cnt=0;
> for(i=0;i<53;i++)
> {
> while(a[i]--) b[cnt++]=i;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator