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

请问hawk,这道题的算法是不是这样的:找出M的除掉1的因子的个数p,然后用M^N减去p^N得到结果?

Posted by zxqi_009 at 2005-08-25 10:00:50 on Problem 1091
理由是具有共因子的一组数是不可能到达指定位置的,而一组不具有公约数的数总是可以到达左边一个单位的位置的?我的算法是这样的,但总是wa,不知道是不是算法错了?

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