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

POJ的评测机上pascal的浮点运算误差比较大……

Posted by xuhaoran510 at 2011-04-11 14:23:57 on Problem 3728
rt
两个代码差别如下
AC代码
for i:=1 to 65536 do lg2[i]:=trunc(ln(i)/ln(2)+1e-8);
WA代码
for i:=1 to 65536 do lg2[i]:=trunc(ln(i)/ln(2));
一个AC,一个WA,但这两个代码在我自己机器上对拍几百组极限规模数据均无区别。

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