You have two non-empty strings
Constraints
Test Case | |||
---|---|---|---|
Input Specification
The first line will contain
The second line will contain a string of length
The third line will contain a string of length
Output Specification
Output the number of ways to select
Since the answer can be very large, output the answer modulo
Sample Input 1
Copy
6 3 1
aabaab
aab
Sample Output 1
Copy
2
Sample Input 2
Copy
6 3 2
aabaab
aab
Sample Output 2
Copy
7
Sample Input 3
Copy
6 3 3
aabaab
aab
Sample Output 3
Copy
7
Comments