Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么这样会RE?

Posted by nuanran at 2006-09-02 18:24:55 on Problem 1151
int cmp1(const void *a,const void *b)
{
	double *c,*d;
	c=(double *)a;
	d=(double *)b;
	return (*c)>(*d);
}
这样写就RE了
int cmp1(const void *a,const void *b)
{
	double *c,*d;
	c=(double *)a;
	d=(double *)b;
	if((*c)<(*d)) return -1;
	else if((*c)>(*d)) return 1;
	return 0;
}
这样就过了
为什么?难道不一样吗?在别的oj上都可以过呀!还好我在别的oj上交了一下,不然不知道到还要查到什么时候呢!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator