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

O(1) 的公式推出来了,也用了快速幂取余,还是TLE,谁来指导一下

Posted by alpc73 at 2010-05-09 23:08:12 on Problem 3761
刚开始看错数据了,没开见100000case,推了个o(n)的
f(n,k)=f(n-1,k)*(k+1)+(k^(n-k))*(k-1)!
TLE后改成O(1)的
f(n,k)=k!*((k+1)^q+k^q); q=m-n;还是TLE
用了快速幂取余,还是TLE.
谁能指条明路?

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