-->
当前位置:首页 > 题库

PROGRAMMING:All longest common substrings of two strings

Luz5年前 (2021-05-10)题库401
Find all the longest common substrings of two strings.
###Input format:
Enter two strings S and T with length ≤ 100 in turn.
###Output format:
Output all the longest common substrings of S and T. If there is more than one longest common substring, all the substrings will be sorted from small to large in dictionary order and output.
###Input sample 1:
```in
ABCBDAB
BDCABA
```
###Output sample 1:
BDCABA
ABCBDAB
```out
AB
AB
BD
```
###Input sample 2:
```in
ABACDEF
PGHIK
```
###Output sample 2:
```out
NO
```






answer:If there is no answer, please comment