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

Re:这题怎么做啊,大手给点思路啊.

Posted by sxyz007 at 2008-05-20 22:42:33 on Problem 1395
In Reply To:这题怎么做啊,大手给点思路啊. Posted by:ufo008ahw at 2007-11-15 17:54:14
因为有一个最小的c是其他的倍数

我们把所有都/c

这样任意a:b都可以看成a:1和1:b的齿轮连起来

我们只要bfs出1-10000中所有1:x即可


然后分别判断a和b是否可达,都是就YES

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