Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:这样读入油问题吗

Posted by lookus at 2005-06-30 15:11:18 on Problem 2447
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator