From 9b15823a33fc6f75296f10706f94a62c8699ca8f Mon Sep 17 00:00:00 2001 From: 24OI-bot <15963390+24OI-bot@users.noreply.github.com> Date: Sun, 21 Jul 2019 23:50:10 -0400 Subject: [PATCH] style: format markdown files with remark-lint --- docs/graph/kth-path.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/graph/kth-path.md b/docs/graph/kth-path.md index ffc87989..b028bd0c 100644 --- a/docs/graph/kth-path.md +++ b/docs/graph/kth-path.md @@ -218,8 +218,7 @@ void dfs2(int x) { int main() { scanf("%d%d%d%d%d", &n, &m, &s, &t, &k); for (int i = 1; i <= m; i++) - scanf("%d%d%d", &x, &y, &ww), - e1.add_edge(x, y, ww), e2.add_edge(y, x, ww); + scanf("%d%d%d", &x, &y, &ww), e1.add_edge(x, y, ww), e2.add_edge(y, x, ww); Q.push({t, 0}); while (!Q.empty()) { a = Q.top(); @@ -230,8 +229,10 @@ int main() { for (int j = e2.h[a.x]; j; j = e2.nxt[j]) Q.push({e2.p[j], a.v + e2.w[j]}); } if (k == 1) { - if(tf[s])printf("%d\n", dist[s]); - else printf("-1\n"); + if (tf[s]) + printf("%d\n", dist[s]); + else + printf("-1\n"); return 0; } dfs(t); @@ -261,7 +262,7 @@ int main() { int t = st.rt[st.v[a.x].x]; if (t) Q.push({t, a.v + st.v[t].v}); } - printf("-1\n"); + printf("-1\n"); return 0; } ``` -- 2.11.0