CSES - E4590 2016 6 - Results
Submission details
Task:DNA sequence
Sender:rafaykh
Submission time:2016-10-22 15:27:07 +0300
Language:C++
Status:READY
Result:
Test results
testverdicttime
#1--details

Code

#include <algorithm>
#include <iostream>
#include <sstream>
#include <cstring>
int main(int argc, char **argv)
{
	using namespace std;
	ios::sync_with_stdio(0);
	string input;
	cin >> input;
	int n;
	cin >> n;
	string st = "";
	for (int k = 0; k < n; k++){
		string secondString;
		cin >> secondString;
		if(input.find(secondString) != string::npos){
			st = st+"YES" + '\n';
		}else{
		st = st+"NO" + '\n';
		}
	}
	
	 cout << st;
}

Test details

Test 1

Verdict:

input
ACGCGGGCTCCTAGCGTTAGCAGTTGAGTG...

correct output
YES
YES
NO
NO
YES
...

user output
(empty)