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 |
注意pollard_rho中gcd的写法应该把LL d=gcd(y-x,n)改成LL d=gcd(y-x+n,n); 因为大家写gcd的时候 大多是下面的写法,这要求输入的a,b是非负数才能得到我们想要的答案 LL gcd(LL a,LL b){ return b?gcd(b,a%b):a; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator