翻译9
https://acs.jxnu.edu.cn/problem/HDU1030
Delta-wave
描述:
A triangle field is numbered with successive integers in the way shown on the picture below.
The traveller needs to go from the cell with number M to the cell with number N. The traveller is able to enter the cell through cell edges only, he can not travel from cell to cell through vertices. The number of edges the traveller passes makes the length of the traveller's route.
Write the program to determine the length of the shortest route connecting cells with numbers N and M.
输入:
Input contains two integer numbers M and N in the range from 1 to 1000000000 separated with space(s).
输出:
Output should contain the length of the shortest route.
翻译
三角点波
描述:
三角形域是连续的整数编号的,如下图所示。
移动者需要从编号为M的单元格去编号为N的单元格。移动者只能从单元格的边进入单元格,他不能通过单元格的顶点进入单元格。移动者经过边缘数次决定移动者路线的长度。
编写程序确定关于连接单元格编号M和N的最短长度。
输入:
输入两个整数M和N,范围从1到 1000000000 ,中间用空格隔开。
输出:
输出应该包含最短路线的长度。

浙公网安备 33010602011771号