Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

用next_permutation加上自己写的cmp函数过了。。

Posted by songzi at 2008-10-11 21:19:06 on Problem 1256

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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator