| Task: | DNA sequence |
| Sender: | PSG.LGD |
| Submission time: | 2020-10-03 14:27:10 +0300 |
| Language: | C++ (C++11) |
| Status: | READY |
| Result: | TIME LIMIT EXCEEDED |
| test | verdict | time | |
|---|---|---|---|
| #1 | TIME LIMIT EXCEEDED | -- | details |
Code
#include <iostream>
using namespace std;
std::string str, token; int n;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> str; cin >> n;
for (int i=0; i<n; i++) {
cin >> token;
if (str.find(token) != string::npos) {
cout << "YES\n";
} else {
cout << "NO\n";
}
}
}