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 |
Re:什么叫乘法逆元?我表示我只会用二分法进行等比数列求和做此题……In Reply To:倒,不会乘法逆元,用土鳖方法搞这题,写了高精才过的表示压力巨大…… Posted by:xuhaoran510 at 2011-04-10 10:55:54 RT 1+p+p^2+……+p^c= 1° odd(c)=true 原式=cal(p,c)={p^[(c+1)>>1)] +1} *cal(p,(c-1)>>1); 2° odd(c)=false 原式=cal(p,c)={p^[(c+1)>>1)] +1} *cal(p,(c-1)>>1) +p^c; 原理:例如c=3 分成(1+p)+(p^2+p^3)提出p^2,二分递归。 c=4 分成(1+p)+(p^2+p^3)+(p^4),p^4单独计算。 http://hi.baidu.com/lydrainbowcat/blog/item/7078dcfbdf43be0e6d22eb83.html Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator