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:Time Limit Exceeded 怎么该啊!算法不会,大侠指点啊!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator