CSES - E4590 2016 6 - Results
Submission details
Task:DNA sequence
Sender:smolse
Submission time:2016-10-23 15:01:05 +0300
Language:Python3
Status:READY
Result:
Test results
testverdicttime
#10.08 sdetails

Code

import fileinput

seen = {}

with fileinput.input(['-']) as input:
	string = input.readline().rstrip()
	q = int(input.readline().rstrip())
	for _ in range(q):
		query = input.readline().rstrip()
		if query not in seen:
			seen[query] = 'YES' if query in string else 'NO'
		print seen[query]

Test details

Test 1

Verdict:

input
ACGCGGGCTCCTAGCGTTAGCAGTTGAGTG...

correct output
YES
YES
NO
NO
YES
...

user output
(empty)

Error:
File "input/code.py", line 12
    print seen[query]
             ^
SyntaxError: Missing parentheses in call to 'print'