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 2004huangyimin at 2006-04-18 19:49:47 on Problem 2726
1。当任意两个旅馆的距离不等时,那么任意比m距离近的旅馆都比m的价格贵的m一定是candidate hotel 的。
2。当存在两个旅馆的距离相等时,那么价格贵得那个一定不是candidate hotel 的。

这样便可以产生一种只需要进行一次排序的方法。

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