# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
800937 | 2023-08-02T02:01:31 Z | LIF | Martian DNA (IOI16_dna) | C++14 | 1000 ms | 348 KB |
#include "dna.h" #include<bits/stdc++.h> #include <cstdlib> using namespace std; std::string analyse(int n, int t) { int l = 1; int r = n; int len = 0; while(l<=r) { int mid = (l+r)>>1; string temp; for(int i=1;i<=mid;i++)temp += "0"; if(make_test(temp) == true) { l = mid+1; len = mid; } else r = mid-1; } string ans; for(int i=1;i<=len;i++)ans += "0"; int now = 0; while(now <= len && ans.size() <= n) { ans += "1"; if(make_test(ans) == true) { now = 0; } else { now++; ans.erase(ans.size()-1); ans += "0"; } } while(make_test(ans) == false && ans.size() > 0)ans.erase(ans.size()-1); while(ans.size() < n) { ans = "1" + ans; //cout<<ans<<endl; if(make_test(ans) == false) { ans.erase(0); ans = "0" + ans; } } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Execution timed out | 1093 ms | 212 KB | Time limit exceeded |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Execution timed out | 1091 ms | 212 KB | Time limit exceeded |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 0 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Correct | 0 ms | 212 KB | Output is correct |
17 | Correct | 0 ms | 212 KB | Output is correct |
18 | Correct | 0 ms | 212 KB | Output is correct |
19 | Correct | 0 ms | 212 KB | Output is correct |
20 | Correct | 0 ms | 212 KB | Output is correct |
21 | Execution timed out | 1089 ms | 212 KB | Time limit exceeded |
22 | Correct | 0 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 | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 260 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 284 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Execution timed out | 1073 ms | 212 KB | Time limit exceeded |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Execution timed out | 1083 ms | 212 KB | Time limit exceeded |
14 | Execution timed out | 1074 ms | 212 KB | Time limit exceeded |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Execution timed out | 1083 ms | 212 KB | Time limit exceeded |
17 | Execution timed out | 1086 ms | 212 KB | Time limit exceeded |
18 | Execution timed out | 1082 ms | 212 KB | Time limit exceeded |
19 | Execution timed out | 1091 ms | 212 KB | Time limit exceeded |
20 | Execution timed out | 1081 ms | 212 KB | Time limit exceeded |
21 | Execution timed out | 1077 ms | 212 KB | Time limit exceeded |
22 | Correct | 0 ms | 212 KB | Output is correct |
23 | Correct | 0 ms | 212 KB | Output is correct |
24 | Correct | 1 ms | 212 KB | Output is correct |
25 | Correct | 0 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 0 ms | 212 KB | Output is correct |
28 | Execution timed out | 1085 ms | 212 KB | Time limit exceeded |
29 | Execution timed out | 1080 ms | 212 KB | Time limit exceeded |
30 | Execution timed out | 1085 ms | 212 KB | Time limit exceeded |
31 | Execution timed out | 1084 ms | 212 KB | Time limit exceeded |
32 | Execution timed out | 1086 ms | 212 KB | Time limit exceeded |
33 | Correct | 0 ms | 212 KB | Output is correct |
34 | Correct | 0 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Execution timed out | 1077 ms | 212 KB | Time limit exceeded |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Execution timed out | 1080 ms | 212 KB | Time limit exceeded |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Execution timed out | 1081 ms | 212 KB | Time limit exceeded |
16 | Execution timed out | 1083 ms | 212 KB | Time limit exceeded |
17 | Execution timed out | 1073 ms | 212 KB | Time limit exceeded |
18 | Execution timed out | 1086 ms | 212 KB | Time limit exceeded |
19 | Execution timed out | 1073 ms | 212 KB | Time limit exceeded |
20 | Execution timed out | 1087 ms | 212 KB | Time limit exceeded |
21 | Execution timed out | 1076 ms | 212 KB | Time limit exceeded |
22 | Execution timed out | 1080 ms | 340 KB | Time limit exceeded |
23 | Execution timed out | 1064 ms | 340 KB | Time limit exceeded |
24 | Execution timed out | 1084 ms | 340 KB | Time limit exceeded |
25 | Execution timed out | 1067 ms | 212 KB | Time limit exceeded |
26 | Execution timed out | 1053 ms | 212 KB | Time limit exceeded |
27 | Correct | 5 ms | 340 KB | Output is correct |
28 | Correct | 5 ms | 340 KB | Output is correct |
29 | Correct | 0 ms | 212 KB | Output is correct |
30 | Correct | 5 ms | 348 KB | Output is correct |
31 | Correct | 4 ms | 340 KB | Output is correct |
32 | Correct | 0 ms | 212 KB | Output is correct |
33 | Execution timed out | 1085 ms | 340 KB | Time limit exceeded |
34 | Execution timed out | 1070 ms | 212 KB | Time limit exceeded |
35 | Execution timed out | 1090 ms | 340 KB | Time limit exceeded |
36 | Execution timed out | 1082 ms | 340 KB | Time limit exceeded |
37 | Execution timed out | 1083 ms | 340 KB | Time limit exceeded |
38 | Correct | 3 ms | 340 KB | Output is correct |
39 | Incorrect | 11 ms | 340 KB | Too many tests |