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

2204 問題 D: Mirror’s Edge(K)

時(shí)間限制: 1s 內(nèi)存限制: 128MB 提交: 18 解決: 2
題目描述

Assuming that you are playing a video game Mirror’s Edge. Mirror’s Edge is a parkour game, in which you are required to move your role around the map to convey secret information. The map will be described by n areas and m two-way paths that connect two different areas. At the very beginning of the game, you are in area 1 and then you need to arrive area a,b,c,d,e, but no order is required. Undoubtedly, you would like to find the fastest path.

輸入

The first line contains two integers n and m. The second line contains five integer a,b,c,d,e. The next m lines, each line describes a path. Each line contains three integers x,y,t, indicating this line connect area x and area y and it will cost t seconds to pass it.

輸出

A integer t indicates possible shortest time.

1≤n≤500000,1≤m≤1000000;
1<a,b,c,d,e≤n;
1≤x,y≤n,1≤t≤100;

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

比賽公告

題號(hào):2201,2202,2203,2204,2205,2206,2207,2208,2209,2210

點(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ì)待