ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

1.24号英语翻译

2022-01-24 10:32:26  阅读:348  来源: 互联网

标签:City -- 城市 Len 英语翻译 cities was 1.24


题目来源:http://noi.openjudge.cn/ch0405/3368/

重点词汇:

era: n.时代

commander:n.统帅,指挥者

 strategist :n.谋士

eligible:adj.可以选的,合格的

generals:n.将军

 bi-directed roads:n.双向道

hire :v.雇佣

suppose:v.假设

3368:Sanguo

  三国

总时间限制: 
3000ms
 
内存限制: 
65536kB
描述

After East Han dynasty, China was divided into several states. Wei, Wu, and Shu are the greatest three states among them. This was the era of Sanguo. During this period, wars frequently happened between states. Zhuge Liang, the commander and strategist of Shu, wanted to enlarge Shu's power. He was considering conquering N cities. However, these cities must be defeated in a specified order. City-X could be defeated only after City-1City-2City-3 ... City-(X-1) had been defeated. However, passing through the cities that had not been defeated was eligible. Zhuge wanted to use three generals, Guan Yu, Zhang Fei, and Zhao yun, each of whom should lead an army. The three armies, started from Yizhou, which was numbered with City-0. After conquered all the N cities (each cities must be conquered at least by one army), they had to return to Yizhou.

东汉末年,中国被划分为多个国家。魏,吴,蜀则是其中最大的三个国家。这是三国的时代,在这个时期,各国间的战争频繁地发生。诸葛亮作为蜀国的统帅和谋士(军师),想要扩大蜀国的势力,所有他考虑占领n个城市。然而,这些城市必须按照特定的顺序被打败。城市-X只能在城市--1,城市--2,城市--3······城市--(X-1)被打败之后才能被打败。然而,通过没有被打败的城市是有资格的。诸葛亮想用三位将军,关羽,张飞,和赵云,每一个将军应该领导一个军队。这三支军队从城市--0  益州开始出发。在占领所有的N 城市之后(每一个城市至少需要用一支军队来占领),他们都必须要返回到益州。

The N cities and Yizhou were connected by M bi-directed roads. To travel from city to city was a very boring and expensive thing. So Zhuge wanted to minimize the total length of the three armies' traveling. You were hired to help him to compute the minimum total length of the traveling.

N个城市和益州由M条双向道路相连。 从一个城市到另一个城市的旅程是一件非常无聊和昂贵的事情。 所以诸葛想尽量减少三军行军的总长度。 你被雇来帮助他计算行军的最短总长度。

输入

Line1: two integers N and MN is the number of cities Zhuge wanted to conquer, and M is the number of roads between the N + 1 cities.
Line2...Line(M+1): each line contain 3 integers, XYLen, indicating a road between City-X and City-Y, with the length of Len.
You can suppose that all the + 1 cities are connected.
N ≤ 500, M ≤ 20000, Len ≤ 1000

行列1:两个整数N 和 M。N表示诸葛亮想要占领的城市数量,M表示N+1个城市之间道路的总数量。

行列2·····行列(M+1):每一行包含三个整数,X,Y,Len,表示城市X 到城市 Y的长度 Len。

你可以假设N+1个城市是连接的。

N<=500,M<=20000,Len<=1000

输出

Line1: an integer, which is the minimum total length of the three armies' traveling.

行列1:一个整数,表示三军行军的最短总路程。

样例输入
5 15
5 5 48
1 4 658
4 0 843
1 4 41
1 4 330
5 2 864
4 2 115
4 0 303
2 3 685
0 0 879
1 5 649
2 4 942
4 0 379
5 2 769
5 1 856
样例输出
3668

标签:City,--,城市,Len,英语翻译,cities,was,1.24
来源: https://www.cnblogs.com/qq-2556146261/p/15838442.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有