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:大家是怎么做的啊……我现在的方法Tle了

Posted by wei_wenzhe at 2007-12-18 15:44:49 on Problem 3471
In Reply To:大家是怎么做的啊……我现在的方法Tle了 Posted by:showbu at 2007-11-28 11:32:14
应该慢了
因为涉及到的操作比较多……
我的方法:
对于a[0]的每一个因子t,对(x-t)作多项式带余除法,能在常数时间内求出商式和余式,如果余式不是0就考察下一个因子,如果是0,说明t是根,接下来求商式的根即可,递归调用。
300ms不算快,主要是遍历a[0]的因子耗时长。

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