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:为什么分子会小于4,可以简单证明一下吗??

Posted by liangzhirong at 2008-10-19 20:51:55 and last updated at 2008-10-19 20:53:09
In Reply To:Re:为什么分子会小于3,可以简单证明一下吗?? Posted by:wzc1989 at 2008-10-19 20:42:47
是不大于3

考虑分子为2,3,4的第一个项出现之前各有多少项,展开讨论一下,可以证明分子为4的第一项出现之前的项数>N (大概为N/2 + N/3 + N/4,根据N模2,3,4的余数略有不同,需要展开讨论)

以上过程可以直接得出O(1)算法

不知道有没有更简洁的

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