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 Baron0319 at 2019-09-05 20:12:18 on Problem 1597
这道题其实可以转化成裴蜀定理: ax+by = 1;
    题意转化成数学知识就是:ax%y=m,m要取到0-(y-1)的所有值,其中x是step,y是mod,ax表示x的整数倍,因为seed(0)=0
    该式就等价于ax+by=m,很明显,m可以取到0,就是初值,
    然后如果m要取到0-(y-1)的所有值,那么ax+by=1就一定要成立,因为如果ax+by=1,那么只要在两边同时乘(1-m-1中任何一个数)就好了,
 

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