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

谢谢了 先膜拜之 然后再看

Posted by xyh33210 at 2009-10-25 22:41:39
In Reply To:做法 Posted by:majia5 at 2009-10-25 21:11:18
> 是一个很简单的离散对数的问题,解完以后转化成时间输出即可
> 
> x^k = a(mod p)
> 先求出一个原根G,然后计算I(a) (a的指标),这里需要用到Baby-step来做
> 最后解模方程k*I(x) = I(a) (mod p-1)
> 解出来的I(x)就是解集
> ans[i]=G^Ii(x) (mod p)
> 之后排个顺序就可以了.

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