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

有什么要注意的么? 我们开始用这种方法(公式内详) 测了无数组数据..觉得没问题 可是WA了

Posted by alpc48 at 2009-10-25 16:05:17
In Reply To:或者说在算快速幂的时候和P无关。只需要算a、b乘几次就循环了就可以了。然后快速求fibonacci%|循环节| Posted by:ACM06Louty at 2009-10-25 16:00:36
  我们的公式是 a ^( (fib(n-1)%m - r) % m + r ) * b^( (fib(n-2)%m - r) % m + r) 
  m是循环节 <=1000000 r是进入循环节前的尾巴

  求教 Orz..

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