联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 网络(1) 
按平台查找All Java(1) 

[网络] Huawei

PS:自己写的,自测试OK,供大家参考。 高级题样题:地铁换乘 描述:已知2条地铁线路,其中A为环线,B为东西向线路,线路都是双向的。经过的站点名分别如下,两条线交叉的换乘点用T1、T2表示。 编写程序,任意输入两个站点名称,输出乘坐地铁最少需要经过的车站数量(含输入的起点和终点,换乘站点只计算一次)。 地铁线A(环线)经过车站:A1 A2 A3 A4 A5 A6 A7 A8 A9 T1 A10 A11 A12 A13 T2 A14 A15 A16 A17 A18 地铁线B(直线)经过车站:B1 B2 B3 B4 B5 T1 B6 B7 B8 B9 B10 T2 B11 B12 B13 B14 B15 输入:输入两个不同的站名 输出:输出最少经过的站数,含输入的起点和终点,换乘站点只计算一次 输入样例:A1 A3 输出样例:3
PS: write their own, since the test OK, for your reference. * Senior title questions: subway ride Description: known 2 subway lines, including A as the link, B for the East-West line, the line is two-way. After the site names are as follows, two lines crossing the transfer point with T1, T2 said. Write a program, enter the name of any of the two sites, the output of the subway ride at least need to pass the number of stations (including the starting point and the end of the input, transfer site only once). Metro Line A (loop) through the station: A1 A2 A4 A6 A7 A8 A9 A10 A11 A12 A13 T2 A14 A15 A16 A17 A5 A18 (T1) Metro Line B (straight) through the station: B1 B2 B4 T1 B6 B7 B8 B9 B10 T2 B11 B12 B13 B14 B5 B15 Input: enter two different station names Output: the output of the minimum number of stations, including the starting point and the end of the input, transfer site only once Input sample: A1 A3 Sample output: 3 (2017-04-14, Java, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/1492135927806178.html
总计:1