| Task: | DNA sequence |
| Sender: | smolse |
| Submission time: | 2016-10-23 14:58:05 +0300 |
| Language: | Python3 |
| Status: | READY |
| Result: | TIME LIMIT EXCEEDED |
| test | verdict | time | |
|---|---|---|---|
| #1 | TIME LIMIT EXCEEDED | -- | details |
Code
import fileinput
with fileinput.input(['-']) as input:
string = input.readline().rstrip()
q = int(input.readline().rstrip())
for _ in range(q):
query = input.readline().rstrip()
if query in string:
print('YES')
else:
print('NO')