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

爆昏。Floyd写错了。 。。。

Posted by o_oXo_o at 2006-04-16 22:02:44 on Problem 1087
for(k=1; k<=n; k++)
for(i=1; i<=n; i++)
  if(D[i][k])
  for(j=1; j<=n; j++)
	if(D[k][j]) D[i][j] = 1;

而不是
for(i=1; i<=n; i++)
for(k=1; k<=n; k++)
  if(D[i][k])
  for(j=1; j<=n; j++)
        if(D[k][j]) D[i][j] = 1;

郁闷得不行了。 两个for循环写反了。交了n次。

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