城市間緊急救援--Dijktra(1.1版)

#include<stdio.h> #include<string.h> #define INF 0x3f3f3f int N, M, S, D;// N 城市個數, M 道路條數, S出發點, D 終點 int pre[1111];//儲存到達i城市的上一個城市編號(該城市是到達i城市的最近且救援人數最多) int num[1111];//到達該城市的最短路徑條數 int peo[1111
相關文章
相關標籤/搜索