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

大吼一声终于过了 刷了50多次到30ms~~~ 这个错误是在世太隐蔽了

Posted by first at 2006-04-03 16:15:45 on Problem 2800
In Reply To:为啥别人也这样的算法就ac了 Posted by:first at 2006-04-03 00:14:46
int d = k/n;
int t1 = n;
int t2 = k/(d + 1);
while(t1 - t2 > 10)
我是这样判断进入循环的。
我本意是 k/d - k(d + 1) > 10 采用公式求,
我用n 代替了 k/d ,d = k/n 但是 k/d 可能远大于n
这样用n代替了k/d后会导致 循环条件不满足  哎 

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