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

基于dp的floyd,简单

Posted by 962861784 at 2011-06-17 22:12:32 on Problem 3615
for(k=1;k<=n;k++)
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
if(g[i][k]>0&&g[k][j]>0)
{
int temp=max(g[i][k],g[k][j]);
if(g[i][j]>0)
g[i][j]=min(g[i][j],temp);
else
g[i][j]=temp;
}

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