# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
598025 | 2022-07-17T11:31:11 Z | Pyishtell | Martian DNA (IOI16_dna) | C++17 | 13 ms | 416 KB |
#include "dna.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; std::string analyse(int n, int t) { int start=1, end=n; while(end-start>1){ int middle=(start+end)/2; if(make_test(string(middle,'0'))) start=middle; else end=middle; } string s=string(start,'0'); int index=0; while(index<=start){ if(make_test(s+'1')) s=s+'1', index=0; else s=s+'0', index++; } start=s.size()-start-1, end=s.size(); while(end-start>1){ int middle=(start+end)/2; if(make_test(s.substr(0,middle))) start=middle; else end=middle; } s=s.substr(0,start); while(s.size()<n){ if(make_test('1'+s)) s='1'+s; else s='0'+s; } return s; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 296 KB | Wrong DNA |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Incorrect | 0 ms | 212 KB | Wrong DNA |
7 | Correct | 1 ms | 300 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |
14 | Correct | 1 ms | 304 KB | Output is correct |
15 | Incorrect | 1 ms | 212 KB | Wrong DNA |
16 | Correct | 1 ms | 212 KB | Output is correct |
17 | Correct | 0 ms | 212 KB | Output is correct |
18 | Correct | 1 ms | 300 KB | Output is correct |
19 | Correct | 1 ms | 212 KB | Output is correct |
20 | Correct | 0 ms | 212 KB | Output is correct |
21 | Correct | 0 ms | 212 KB | Output is correct |
22 | Correct | 1 ms | 212 KB | Output is correct |
23 | Correct | 0 ms | 212 KB | Output is correct |
24 | Correct | 0 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 300 KB | Wrong DNA |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 296 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Incorrect | 1 ms | 212 KB | Wrong DNA |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Incorrect | 1 ms | 212 KB | Wrong DNA |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 296 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 1 ms | 212 KB | Output is correct |
16 | Correct | 1 ms | 212 KB | Output is correct |
17 | Correct | 1 ms | 300 KB | Output is correct |
18 | Correct | 1 ms | 212 KB | Output is correct |
19 | Correct | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 212 KB | Output is correct |
22 | Correct | 1 ms | 300 KB | Output is correct |
23 | Correct | 1 ms | 300 KB | Output is correct |
24 | Correct | 1 ms | 296 KB | Output is correct |
25 | Incorrect | 1 ms | 212 KB | Wrong DNA |
26 | Correct | 1 ms | 212 KB | Output is correct |
27 | Correct | 1 ms | 340 KB | Output is correct |
28 | Correct | 1 ms | 304 KB | Output is correct |
29 | Correct | 1 ms | 212 KB | Output is correct |
30 | Correct | 1 ms | 212 KB | Output is correct |
31 | Correct | 1 ms | 212 KB | Output is correct |
32 | Correct | 1 ms | 212 KB | Output is correct |
33 | Correct | 1 ms | 212 KB | Output is correct |
34 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 384 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Wrong DNA |
3 | Correct | 1 ms | 304 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Incorrect | 1 ms | 212 KB | Wrong DNA |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Incorrect | 0 ms | 212 KB | Wrong DNA |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 292 KB | Output is correct |
13 | Correct | 1 ms | 296 KB | Output is correct |
14 | Correct | 1 ms | 212 KB | Output is correct |
15 | Correct | 1 ms | 212 KB | Output is correct |
16 | Correct | 1 ms | 212 KB | Output is correct |
17 | Correct | 1 ms | 212 KB | Output is correct |
18 | Correct | 1 ms | 212 KB | Output is correct |
19 | Correct | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 212 KB | Output is correct |
22 | Correct | 8 ms | 416 KB | Output is correct |
23 | Correct | 11 ms | 340 KB | Output is correct |
24 | Correct | 9 ms | 416 KB | Output is correct |
25 | Correct | 12 ms | 388 KB | Output is correct |
26 | Correct | 11 ms | 340 KB | Output is correct |
27 | Correct | 6 ms | 340 KB | Output is correct |
28 | Correct | 6 ms | 340 KB | Output is correct |
29 | Correct | 13 ms | 332 KB | Output is correct |
30 | Incorrect | 8 ms | 300 KB | Wrong DNA |
31 | Correct | 5 ms | 340 KB | Output is correct |
32 | Correct | 13 ms | 340 KB | Output is correct |
33 | Correct | 8 ms | 296 KB | Output is correct |
34 | Correct | 8 ms | 388 KB | Output is correct |
35 | Correct | 7 ms | 340 KB | Output is correct |
36 | Correct | 8 ms | 408 KB | Output is correct |
37 | Correct | 9 ms | 340 KB | Output is correct |
38 | Correct | 12 ms | 340 KB | Output is correct |
39 | Correct | 12 ms | 384 KB | Output is correct |