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 gbaoxing at 2013-01-21 10:02:14 on Problem 2728
在prim里面这样就能A
 ans += min;
         vt[j] = true;
         for (i = 1; i < n; ++i)
         {
             if (!vt[i] && a[j][i] != inf && dis[i] > a[j][i] - mid * b[j][i])
             {
                 dis[i] = a[j][i] - mid * b[j][i];
             }
         }
而把i,j互换就会TLE,这里[i][j]与[j][i]不一样吗?

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