Submission #200462

# Submission time Handle Problem Language Result Execution time Memory
200462 2020-02-06T21:29:16 Z mohamedsobhi777 Martian DNA (IOI16_dna) C++14
11 / 100
12 ms 504 KB
#include "dna.h"

#include <bits/stdc++.h>

using namespace std;


std::string analyse(int n, int t) {
    string ret = "";
    for(int i = 0;i<(1<<n)-1;i++)
    {
        string s="";
        for(int j = 0;j<n;j++)
        {
            s+=char(  !!(i&(1<<j)) + '0');
        }
        if( make_test(s) )
        {
            return s;
        }
    }
    return string(n , '1');
}

Compilation message

grader.cpp: In function 'bool make_test(std::__cxx11::string)':
grader.cpp:14:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < p.size(); i++) {
                  ~~^~~~~~~~~~
grader.cpp:23:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i <= ss.size(); i++) {
                  ~~^~~~~~~~~~~~
grader.cpp:28:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (pr[i] == p.size()) {
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 5 ms 256 KB Output is correct
7 Correct 5 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 5 ms 376 KB Output is correct
10 Correct 5 ms 256 KB Output is correct
11 Correct 5 ms 256 KB Output is correct
12 Correct 5 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 5 ms 256 KB Output is correct
16 Correct 5 ms 256 KB Output is correct
17 Correct 5 ms 376 KB Output is correct
18 Correct 5 ms 256 KB Output is correct
19 Correct 5 ms 376 KB Output is correct
20 Correct 5 ms 376 KB Output is correct
21 Correct 5 ms 256 KB Output is correct
22 Correct 5 ms 256 KB Output is correct
23 Correct 5 ms 256 KB Output is correct
24 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 5 ms 256 KB Output is correct
7 Correct 5 ms 376 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 5 ms 256 KB Output is correct
10 Correct 6 ms 376 KB Output is correct
11 Correct 5 ms 256 KB Output is correct
12 Incorrect 5 ms 256 KB Too many tests
13 Incorrect 5 ms 256 KB Too many tests
14 Correct 5 ms 256 KB Output is correct
15 Correct 5 ms 376 KB Output is correct
16 Correct 5 ms 256 KB Output is correct
17 Incorrect 5 ms 256 KB Wrong DNA
18 Incorrect 5 ms 256 KB Wrong DNA
19 Incorrect 5 ms 376 KB Wrong DNA
20 Incorrect 5 ms 256 KB Wrong DNA
21 Incorrect 5 ms 256 KB Wrong DNA
22 Incorrect 5 ms 256 KB Wrong DNA
23 Incorrect 5 ms 256 KB Wrong DNA
24 Correct 5 ms 256 KB Output is correct
25 Correct 5 ms 256 KB Output is correct
26 Incorrect 5 ms 256 KB Wrong DNA
27 Incorrect 5 ms 256 KB Wrong DNA
28 Incorrect 5 ms 256 KB Wrong DNA
29 Incorrect 5 ms 376 KB Wrong DNA
30 Incorrect 5 ms 376 KB Wrong DNA
31 Incorrect 5 ms 376 KB Wrong DNA
32 Incorrect 5 ms 256 KB Wrong DNA
33 Incorrect 5 ms 256 KB Wrong DNA
34 Incorrect 5 ms 256 KB Wrong DNA
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Correct 5 ms 376 KB Output is correct
6 Correct 5 ms 376 KB Output is correct
7 Correct 5 ms 380 KB Output is correct
8 Correct 5 ms 376 KB Output is correct
9 Correct 5 ms 256 KB Output is correct
10 Correct 5 ms 256 KB Output is correct
11 Correct 5 ms 256 KB Output is correct
12 Correct 5 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 5 ms 256 KB Output is correct
16 Correct 5 ms 256 KB Output is correct
17 Incorrect 5 ms 256 KB Wrong DNA
18 Incorrect 5 ms 256 KB Wrong DNA
19 Incorrect 5 ms 384 KB Wrong DNA
20 Incorrect 5 ms 256 KB Wrong DNA
21 Incorrect 5 ms 256 KB Wrong DNA
22 Incorrect 10 ms 376 KB Wrong DNA
23 Incorrect 10 ms 376 KB Wrong DNA
24 Incorrect 10 ms 376 KB Wrong DNA
25 Incorrect 12 ms 376 KB Wrong DNA
26 Incorrect 11 ms 504 KB Wrong DNA
27 Incorrect 10 ms 376 KB Wrong DNA
28 Incorrect 9 ms 376 KB Wrong DNA
29 Correct 5 ms 376 KB Output is correct
30 Correct 9 ms 376 KB Output is correct
31 Incorrect 10 ms 376 KB Wrong DNA
32 Incorrect 10 ms 376 KB Wrong DNA
33 Incorrect 9 ms 376 KB Wrong DNA
34 Incorrect 9 ms 380 KB Wrong DNA
35 Incorrect 9 ms 376 KB Wrong DNA
36 Incorrect 9 ms 376 KB Wrong DNA
37 Incorrect 9 ms 376 KB Wrong DNA
38 Incorrect 9 ms 376 KB Wrong DNA
39 Incorrect 10 ms 376 KB Wrong DNA