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:g[i][j]=-(abs(x[i][0]-y[j][0])+abs(x[i][1]-y[j][1])); 为什么加 - 号

Posted by yzy123 at 2010-03-18 11:11:10 on Problem 2195
In Reply To:g[i][j]=-(abs(x[i][0]-y[j][0])+abs(x[i][1]-y[j][1])); 为什么加 - 号 Posted by:swust20064469 at 2008-10-22 17:06:47
因为模板本身是求最佳匹配,求出来的是最大值,而本题要的是最小,所以取反

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