两个吃奶一个添下面视频_人妻第一页香蕉网_欧美xxxx少妇_妺妺窝人体色www婷婷

2193 問題 C: Robot Timmy

時(shí)間限制: 1s 內(nèi)存限制: 128MB 提交: 24 解決: 6
題目描述
Robot Timmy has packages to deliver. Help Timmy find the shortest path he can use to travel to deliver his package.

Because he is a robot, Timmy the area he has to travel in as a series of numbered points (maximum 150), and aclculations of the distance between pairs of these points.

The inputs to the program are as follows:
The first line will contain a pair of integer values a & b, where a represents the number of the point Timmy will be leaving from and b represents the number of the point timmy will be travelling to.
The second line will contain the number of points N (N <= 150). Points are numbered 0 to N - 1.
The third line will contain the number of connections between these points E (E <= 2500)
All of the remaining E lines will contain three values, two points with indexes i&j and the distance k between them (These pairs of points can be travelled in both directions)
輸入
Several lines of figures
First line you should input two number a and b (0<=a<=b<=N)
Second line you should input a single number N (N<=150)
Third line you should input a single number E (E<=2500)
then there will be several lines to enter the distance between two points with the order of  i, j, k  (i<=j)

輸出
The shortest route and the total distance of this route

樣例輸入
0 5
10
23
0 2 2
0 3 2
0 6 10
0 7 2
0 8 4
1 3 9
1 4 4
1 5 3
1 8 2
2 5 8
2 7 7
2 8 3
3 4 10
3 5 8
3 6 4
3 9 9
4 6 6
4 8 5
4 9 10
5 6 8
5 8 8
6 7 6
7 9 9
樣例輸出
0 - 8 - 1 - 5 
Total distance: 9
提示
零基礎(chǔ)同學(xué)可以先學(xué)習(xí)視頻課程,包含C/C++、Python、百練、藍(lán)橋杯輔導(dǎo)、算法數(shù)據(jù)結(jié)構(gòu)等課程,提供視頻講解以及配套習(xí)題,還有老師答疑,點(diǎn)擊這里了解課程詳情

比賽公告

題號(hào):2191,2192,2193,2194,2195,2196,2197,2198,2199,2200

點(diǎn)擊上方導(dǎo)航欄的訓(xùn)練,點(diǎn)擊題庫(kù),尋找題號(hào)即可找到對(duì)應(yīng)題目,比賽結(jié)束后,請(qǐng)通過訓(xùn)練->題庫(kù)->尋找對(duì)應(yīng)題目的方式做題

因?yàn)椴淮_定因素太多,就不再安排大家輪流講題了,大家做不出題可以在測(cè)試結(jié)束后去題庫(kù)找對(duì)應(yīng)的題目看題解,希望大家自覺練習(xí),認(rèn)真練習(xí),考核測(cè)試會(huì)采取不同與現(xiàn)在測(cè)試的方式,兩個(gè)月后綜合測(cè)試成績(jī)不達(dá)標(biāo)者會(huì)退出實(shí)驗(yàn)室,希望大家認(rèn)真對(duì)待