Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:排序中应该注意什么呢?帮忙看下~~In Reply To:排序中应该注意什么呢?帮忙看下~~ Posted by:wolfchuyan at 2007-07-13 20:18:31 按照 d/t排序 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator