| ||||||||||
| 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:B题 怎么做? Posted by:BUAA_MM at 2009-10-25 15:11:11 > rt 1.O(n)暴力Hash寻找循环节的开始位置和循环节长 2.Baby-Step用解离散对数的相关内容来做(见上次ZJU 的E),多校的时候我用BabyStep写了5kb的代码AC了那题. 3.a^x = a^(x%phi(p)+phi(p)) (mod p) (x>=phi(p)),代码很短,不过要注意成立的条件 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator