| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
回楼上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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator