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:谁能告诉我,为什么WA?In Reply To:谁能告诉我,为什么WA? Posted by:kikif at 2007-09-03 11:31:15 int cmp(const void *a1,const void *a2){ point p1=*(point *)a1;point p2=*(point *)a2; double tmp=xmult(p1,p2,p[0]); if(tmp==0){ return (p2.x*p2.x+p2.y*p2.y-p1.x*p1.x-p1.y*p1.y); } return tmp; // } cmp函数返回int类型,而叉积函数返回double类型,强制转换会出现问题。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator