Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
merelydust committed Dec 8, 2018
1 parent c3eb806 commit 486faae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions C++11_STL_CheatSheet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -942,11 +942,11 @@ void insert(node*& root, int x) { // 注意使用引用 否则插入不会成功
struct node {
int v, dis; // v为边的目标顶点 dis为边权
};
vector<node> Adj[mqxn];
vector<node> Adj[maxn];
for (int j = 0; j < Adj[u].size(); ++j) {
int v = Adj[u][j].v; // 通过邻接表直接获得u能到达的顶点v
if (!vis[v] && d[u]+Adj[u].dis < d[v]) {
if (!vis[v] && d[u]+Adj[u][j].dis < d[v]) {
d[v] = d[u]+Adj[u].dis;
}
}
Expand Down

0 comments on commit 486faae

Please sign in to comment.