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

给Output Limit Exceed的朋友们

Posted by dirtysalt at 2009-08-12 10:06:37 on Problem 1256
在进行next_permutation排序的时候,使用的比较函数,请注意注释的地方。可以使用AAB这样的输入检验一下看是否会OLE
bool
cmp(const char &a, const char &b)
{
    char la, lb;
    la = tolower(a);
    lb = tolower(b);
    if (la < lb)
        return true;
    else if (la > lb)
        return false;
    else {
        //如果按照注释这样写的话会Output Limit Exceed.
        //if(isupper(a))return true;
        if (isupper(a) && a != b)
            return true;
        else
            return false;
    }
}

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