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 |
用C的童鞋千万别写int cmp(const void *a,const void *b)!!int cmp(const void *a,const void *b) { return *(long long *)a-*(long long *)b; } 这么写排不对,因为a-b是longlong型,转成int会爆 要写 int cmp(const void *a,const void *b) { return *(long long *)a>*(long long *)b?1:-1; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator