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:要是N是素数pollard rho会死循环的 Posted by:frkstyc at 2005-06-30 14:54:57 void main() { unsigned __int64 c,e,t,n,p; createPrime(); while(scanf("%I64u %I64u %I64u",&c,&e,&n)!=EOF) { if(n<0) while(1);/////////*** p = factor(n); t = (p - 1) * (n/p - 1); printf("%I64u\n",powermod(c,modular_linear_equation_solver(e,t),n)); } } 把***哪儿的语句注掉就是RE,否则是TLE,why? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator