拜访亲戚
No testdata at current.
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
土拨鼠要去拜访他的亲戚并回家看电视 但他走的很慢 他又想以最快的速度到达亲戚家并回到家看电视
Description
现在有条路通往亲戚家(亲戚家有个,土拨鼠要到达第个亲戚家,可能无法直接到达,但可以间接到达并在到达的亲戚家里做客)同时他的路程是,注意我们给出的路都是可以双向通行的
Format
Input
第一行一个正整数n,m 接下来一行个数 ,表示土拨鼠要在第个亲戚家要停留的时间 下面行 每行三个整数表示第个亲戚家到第个亲戚家的路程
Output
一个整数 输出土拨鼠到达第个亲戚家并回家的最短路程
Samples
Limitation
zzy
- Status
- Done
- Rule
- Ledo
- Problem
- 4
- Start at
- 2024-5-26 15:45
- End at
- 2024-5-26 16:25
- Duration
- 0.7 hour(s)
- Host
- Partic.
- 2