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 Assassin_cpy at 2008-10-17 20:03:27 on Problem 1160
In Reply To:Re:np^2的..水牛路过.. Posted by:richardxx at 2008-10-17 18:33:45
 for v:=1 to v do
  for p:=1 to p do
   for i:=p-1 to v-1 do
    ans[v,p]:=min(ans[v,p],ans[i,p-1]+c[i+1,v]);
这段DP代码是np^2的
之前预处理c[i,j]是n^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