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

总算AC了,枚举的时候注意double比较!!!!

Posted by FOR_RITZ at 2006-12-21 14:29:48 on Problem 3039
做最优比较的时候如果是
for(f=0;f<32768;f++)
的话比较 必须用 if(temp-e<-0.0000000001)而不能用if(temp-e<=0.0000000001)
因为比较小的值优先

而如果用
for(f=32767;f>=0;f--)
的话比较 必须用 if(temp-e<0.0000000001)而不能用if(temp-e<=-0.0000000001)

因为这个郁闷了很长时间
细节决定成败啊...

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