Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion problems/kamacoder/0095.城市间货物运输II.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ def main():
for next_node, val in graph[cur_node]:
if min_dist[next_node] > min_dist[cur_node] + val:
min_dist[next_node] = min_dist[cur_node] + val
count[next_node] += 1
if next_node not in d:
count[next_node] += 1
d.append(next_node)
if count[next_node] == n: # 如果某个点松弛了n次,说明有负回路
flag = True
Expand Down