| ||||||||||
| 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 | |||||||||
排序中应该注意什么呢?帮忙看下~~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