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 |
计算 (2^(n+1)+1)%3实际为 f(n) = f(n-1)+2*f(n-2) 得到 f(n) = (2*2^n+(-1)^n)/3 = (2^(n+1)+1)%3 (why?) if(n<62) 快速计算上面的表达式,计算2的幂用移位快 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator