Substring Problem

hard
https://www.spoj.com/problems/SUB_PROB/

Input Format

Check Link

Output Format

Check Link

Constraints

Check Link

Example

Input
abghABCDE
2
abAB
ab
Output
N
Y
Previous
String Reversal
Next
Calender

Related Questions