Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
O(1) 的公式推出来了,也用了快速幂取余,还是TLE,谁来指导一下刚开始看错数据了,没开见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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator