華為OD機(jī)試-- 找出經(jīng)過(guò)特定點(diǎn)的路徑長(zhǎng)度

輸入一個(gè)字符串,都是以大寫(xiě)字母組成,每個(gè)相鄰的距離是 1,第二行輸入一個(gè)字符串,表示必過(guò)的點(diǎn)。說(shuō)明每個(gè)點(diǎn)可過(guò)多次。求解經(jīng)過(guò)這些必過(guò)點(diǎn)的最小距離是多少?
示例1 輸入輸出示例僅供調(diào)試,后臺(tái)判題數(shù)據(jù)一般不包含示例
輸入
ANTSEDXQOKPUVGIFWHJLYMCRZB
ABC
輸出
28
Java 實(shí)現(xiàn):https://renjie.blog.csdn.net/article/details/131724117
Python實(shí)現(xiàn):https://renjie.blog.csdn.net/article/details/131724187
C++ 實(shí)現(xiàn):https://renjie.blog.csdn.net/article/details/131723872
JavaScript實(shí)現(xiàn):https://renjie.blog.csdn.net/article/details/131724160
C實(shí)現(xiàn):https://renjie.blog.csdn.net/article/details/129190260
標(biāo)簽:華為OD華為od機(jī)試