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 CKboss at 2014-11-24 09:52:04 on Problem 2976
In Reply To:坑爹到精度问题 Posted by:lzqxh at 2012-04-04 23:00:46
> //By Lin
> AC的方法
> 		while ( fabs(g-h)>1e-2 )
> 		{
>                         mid = (g+h)/2;
> 			if ( pan(mid)  ){
> 				g = mid; 
> 			}else h = mid; 
> 		}
> 		printf("%.0f\n" , mid );
> 
> 
> WA的方法
> 		while ( fabs(g-h)>1e-2 )
> 		{
>                         mid = (g+h)/2;
> 			if ( pan(mid)  ){
> 				g = mid; 
>                                 ans = mid; 
> 			}else h = mid; 
> 		}
> 		printf("%.0f\n" , ans );
> 明显第二个比第一个更接近精确值,但是确实WA。。。
> 强烈认为这些问题要special judge。。。不然比标程精确你就哭把
真相了......

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