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

用sort排序的问题。。

Posted by Acsaga at 2007-02-04 00:02:30 on Problem 1036
排序时写成
bool cmp(G a, G b) {
    if(a.time != b.time)
        return a.time<b.time;
    else
        return a.stout<=b.stout;  //注意这里
}
就RE
写成
bool cmp(G a, G b) {
    if(a.time != b.time)
        return a.time<b.time;
    else
        return a.stout<b.stout; //没有等号
}
就ac了,这是怎么回事?

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