摘要: 题目描述 给定一个 nnn 个点,mmm 条有向边的带非负权图,请你计算从 sss 出发,到每个点的距离。 数据保证你能从 sss 出发到任意点。 输入格式 第一行为三个正整数 n,m,sn, m, sn,m,s。 第二行起 mmm 行,每行三个非负整数 ui,vi,wiu_i, v_i, w_iu 阅读全文
posted @ 2019-12-07 18:06 Xcsj 阅读(288) 评论(1) 推荐(0) 编辑
摘要: #include<stdio.h>#include<iostream>#include<stdlib.h>using namespace std;struct data{ int vt; struct data *next;}; data *head; data* insert(data* head 阅读全文
posted @ 2019-12-07 18:00 Xcsj 阅读(252) 评论(0) 推荐(0) 编辑