Code Submission Evaluation System Login

HIIT Open 2016

Start:2016-05-28 11:00:00
End:2016-05-28 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2016 - Results
History
2016-05-28 11:40:44
Task:DNA sequence
Sender:Spitfire
Submission time:2016-05-28 11:40:44
Language:C++
Status:READY
Result:TIME LIMIT EXCEEDED

Test results

testverdicttime (s)
#1TIME LIMIT EXCEEDED-- / 1.00details

Code

#include <iostream>
#include <string>

int main()
{
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(0);

  std::string str;
  str.reserve(100000);

  std::cin >> str;

  unsigned int q;
  std::cin >> q;

  std::string substr;
  str.reserve(10);

  for (size_t i = 0; i < q; i++) {
    std::cin >> substr;
    if (str.find(substr) == std::string::npos) {
      std::cout << "NO\n";
    } else {
      std::cout << "YES\n";
    }
  }

  return 0;
}

Test details

Test 1

Verdict: TIME LIMIT EXCEEDED

input
ACGCGGGCTCCTAGCGTTAGCAGTTGAGTG...
view   save

correct output
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...
view   save

user output
(no output)
view   save