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 |
取模的时候加就好了In Reply To:多项式除法求余是个什么过程? Posted by:crazydo at 2006-03-16 10:50:06 比如(x^6 + x^4 + x^2 + x + 1) (x^7 + x + 1)=x^13 + x^11 + x^9 + x^8 + x^6 + x^5 + x^4 + x^3 + 1 , 再取x^8 + x^4 + x^3 + x + 1的模,把除式看做b,被除式看做a,则a/b可以这么算: b*x^5,然后加到a中(因为是取2模,加就可以了也节省时间),得到x^11+x^4+x^3+1,再加上b*x^3,就得到了x^7+x^6+1。 一旦得到的式子次数小于除式b的次数就可以输出了。这里7<8,所以结果就出来了。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator