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:Time Limit Exceeded 怎么该啊!算法不会,大侠指点啊!

Posted by Kuroro at 2012-11-30 11:28:55 on Problem 1061
In Reply To:Re:Time Limit Exceeded 怎么该啊!算法不会,大侠指点啊! Posted by:Kuroro at 2012-11-30 11:12:58
> ax = b%n
> 我刚尝试了下,如果不没有这段代码,1000组数据耗时3951,用了耗时134
> 	long tmp = extgcd(a, b);
> 		if(tmp >1)
> 		{
> 			a= a/tmp;
> 			b= b/tmp;
> 		}
不好意思,想的简单了,这个速度是会快,结果不对

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