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:思路很清晰,一直WA,是精度的原因还是啥? 找到的测试用例全过了,帮忙看看吧,谢谢啦~

Posted by liaolong at 2011-04-16 14:38:51 on Problem 1328
In Reply To:思路很清晰,一直WA,是精度的原因还是啥? 找到的测试用例全过了,帮忙看看吧,谢谢啦~ Posted by:liaolong at 2011-04-16 14:10:31
这个我自己发现错误了 很弱智的错误,qsort使用错误:
int cmp(struct arix *x,struct arix *y)//对左右区间进行排序,先按右区间从小到大,右区间相等按左区间排
{
	if(x->b!=y->b) return x->b-y->b;
	else return x->a-y->a;
}
不应该返回差值的。

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