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 |
感觉好坑在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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator