|| ||Code Submission Evaluation System
CSES - HIIT Open 2016
HIIT Open 2016
|Contest start:||2016-05-28 11:00:00|
|Contest end:||2016-05-28 16:00:00|
Task list | Submit code | Submissions | Messages | Scoreboard | Statistics
You are given a DNA sequence of length $n$. The sequence consists of characters A, C, G and T.
In addition, you are given $q$ queries. In each query your task is to find out if the sequence contains a query sequence as substring.
The first input line contains the sequence of length $n$. The second input line contains an integer $q$: the number of queries.
Finally, there are $q$ lines, each containing a query sequence.
All sequences consist of characters A, C, G and T.
For each query, output "YES" if the sequence contains the query sequence as substring, and "NO" otherwise.
- $1 \le n,q \le 10^5$
- the length of each query sequence is between $1 \ldots 10$