您好,欢迎访问一九零五行业门户网

SRM 597 Div2 500

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 ofa and move it to the beginning of the string (i.e., before the first character ofa). return the minimal number of turns needed to transform a into b. if it's impossible, return -1 instead.
其它类似信息

推荐信息