| ||||||||||
| 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 | |||||||||
用next_permutation加上自己写的cmp函数过了。。
cmp的函数,下面Sort和next_permutation直接调用就好了。。。。
bool cmp(char a,char b)
{ int t='a'-'A';
if(isupper(b)&&islower(a))
{
b+=t;
if(a==b) return false;
return a<b;
}
else if(isupper(a)&&islower(b))
{
a+=t;
if(a==b )return true;
return a<b;
}
else return a<b;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator