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

果断1A!!

Posted by morenan at 2011-04-18 19:52:51 on Problem 1334
DP:将点和边都视为点,第i个点为奇数时是点,偶数时是边。
设f[i][j]表示左边的人在第i个点上,右边的人在第j个点上时,所花费的最小距离。
接下来就可以用dijkstra+heap来解决

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