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

a hint

Posted by 200731000904 at 2009-04-22 21:28:46 on Problem 3212
如何不通过比较得出两个数x,y中的较大者和较小者?
如果你会这个就能明白题目的转化了
然后分别x轴和y轴求哈密顿距离,想想相邻两个值的联系就可以排序后o(n)得出






ps.给出解答
让a=x+y,b=abs(x-y);
max=(a+b)/2,min=(a-b)/2

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