#2317. 旅行者

    ID: 2317 传统题 1000ms 256MiB 尝试: 0 已通过: 0 难度: 省选/NOI- 上传者: 标签>PROV赛事:contest29来源:qoj.ac数据:公开样例最短路

旅行者

旅行者

题目描述

旅行者 - Problem - QOJ.ac

Login

Register

QOJ.ac

QOJ

[QOJ](//qoj.ac)

Contests

Category

Problems

Submissions

Hack!

Blogs

Day 1

		Time Limit:			2 s		
			Memory Limit:			512 MB		
			Total points:			100		

				ZJOI 2016 Day 1				

		B.
		旅行者		

	



[
	Statistics	](/contest/29/problem/5220/statistics)





	[
		Statement		](#tab-statement)

			

[ Languages](#)


	[Default](/contest/29/problem/5220/statement/default)
	

							[English](/contest/29/problem/5220/statement/en)

Submit

Custom Test

Attachments

Discussions & Issues

Back to the contest

					**This problem is prepared by 

bulijiojiodibuliduo .**

Submit

Run

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0

No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.

Do not submit duplicated issues.

Issues must be filed in English or Chinese only.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.

					 English					
				

				[العربية](//qoj.ac/contest/29/problem/5220?locale=ar)
					[English](//qoj.ac/contest/29/problem/5220?locale=en)
					[Español](//qoj.ac/contest/29/problem/5220?locale=es)
					[Français](//qoj.ac/contest/29/problem/5220?locale=fr)
					[日本語](//qoj.ac/contest/29/problem/5220?locale=ja)
					[한국어](//qoj.ac/contest/29/problem/5220?locale=ko)
						[Türkçe](//qoj.ac/contest/29/problem/5220?locale=tr)
						[简体中文](//qoj.ac/contest/29/problem/5220?locale=zh-cn)
					[繁體中文](//qoj.ac/contest/29/problem/5220?locale=zh-tw)

QOJ.ac | QOJ 4.5.49 (2019-2026)

Made with ❤️ by Qingyu✨ | Contact us: [email protected]

Server Time: 2026-11-09 07:19:33 (UTC+8)

输入格式

(见题面原文)

输出格式

(见题面原文)

数据范围

(见题面原文)

样例

样例 1

2 2
2
3
6 4
2
1 1 2 2
1 2 2 1
6
7

样例 2

2 3
558 163
102 2000
461 1732 561
2
2 1 2 3
1 2 2 2
1743
1121