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

排序中应该注意什么呢?帮忙看下~~

Posted by wolfchuyan at 2007-07-13 20:18:31 on Problem 3262
int cmp(const void *a ,const void *b)
{
    if ((*(node *)a).d > (*(node *)b).d)
      return 1;
    else if((*(node *)a).d ==(*(node *)b).d)
    {
        if ((*(node *)a).t <(*(node *)b).t) return 1;
        else return -1;
    }
    return -1;
}

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