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

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

Posted by csulk at 2010-07-15 15:09:12 on Problem 3262
In Reply To:排序中应该注意什么呢?帮忙看下~~ Posted by:wolfchuyan at 2007-07-13 20:18:31
> 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;
> }


不明白呀 我的和楼主也是一样的 一定要d/t吗?

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