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:求中点的证明和N^2算法. 谢谢

Posted by 1120121860 at 2013-08-01 11:52:58 on Problem 1160 and last updated at 2013-08-01 14:17:00
In Reply To:求中点的证明和N^2算法. 谢谢 Posted by:intheway at 2009-11-08 21:02:28
我还没A,但是刚刚想了下网上解法所使用的中点最优的结论
我的想法是:
对于奇数个点的情况:假设使结果最优的点不在中点Pn,不妨设其为中点左边的一个点Pn-1,则问题等价于讨论将邮局从中点向左移一位所带来的开销变化。设L=|Pn-Pn-1|,则显然左移一位造将导致中点和其右边所有点的路程各自+L,造成中点左边(不包括中点的所有点)各自路程减L。由于加L的点比减L的点多了一个(即中点),所以开销变化肯定是增加的。当假设最优点是中点左边的第N个点时,采用同样的方法左移N步可证
对于偶数点的情况:类似奇数点证明。可以证明i+j/2的情况和i+j/2+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