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:fengzunbao2006 at 2008-07-13 17:51:09 int cmp(const void* a,const void* b) { if ((*(node *)a).x == (*(node *)b).x) return (*(node *)a).y > (*(node *)b).y ? 1 : -1; return (*(node *)a).x > (*(node *)b).x ? 1 : -1; } 这样就对了 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator