Task: | DNA sequence |
Sender: | rafaykh |
Submission time: | 2016-10-22 15:27:07 +0300 |
Language: | C++ |
Status: | READY |
Result: | TIME LIMIT EXCEEDED |
test | verdict | time | |
---|---|---|---|
#1 | TIME LIMIT EXCEEDED | -- | 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; }