好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

SRM597Div2500

Little Elephant from the Zoo of Lviv likes strings. You are given a string A and a string B of the same length. In one turn Little Elephant can choose any character of A and move it to the beginning of the string (i.e., before the first ch

Little Elephant from the Zoo of Lviv likes strings.

You are given a string A and a string B of the same length. In one turn Little Elephant can choose any character of A and move it to the beginning of the string (i.e., before the first character of A ). Return the minimal number of turns needed to transform A into B . If it's impossible, return -1 instead.

查看更多关于SRM597Div2500的详细内容...

  阅读:176次