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 temp_ptr at 2011-10-06 15:53:53 on Problem 1644
In Reply To:Re:大家都试试这个数据 Posted by:temp_ptr at 2011-10-06 15:46:05
> (Note that due to rounding the calculated probability for display, a probability of 0.5000 may appear after the Bet for. or Bet against. message.)
> 这句话是什么意思?为啥会出现Bet for. 0.5000这种情况?
自己顶,原来要这么写才能AC:
double ans = 0.8965423212354;
int test = (int)(ans*10000+0.5);
if(ans > 0.5)      printf xxxx, test/10000.0f
else if(ans < 0.5) printf xxxx, test/10000.0f
else               printf xxxx, test/10000.0f


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