# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1091360 | 2024-09-20T17:00:45 Z | kotnid | Martian DNA (IOI16_dna) | C++14 | 11 ms | 1116 KB |
#include <bits/stdc++.h> using namespace std; set<string>st; bool make_test(string p); int T = 0; // bool f(string s){ // string ans = "0"; // if(st.find(s) != st.end())return 0; // cout << "? " << s << endl; // T++; // return (ans.find(s) != string::npos); // } bool f(string s){ if(st.find(s) != st.end())return 0; // cout << "? " << s << endl; return make_test(s); // bool v; // cin >> v; // return v; } string analyse(int n, int t){ st.clear(); int len0 = 0; string s = "0"; while(s.size() <= n && f(s)){ len0++; s += "0"; } st.insert(s); s.pop_back(); if(len0 == 0){ string s2 = ""; for(int i=0; i<n; i++)s2 += "1"; return s2; // cout << "! "; // for(int i=0; i<n; i++)cout << 1; // cout << endl; // return ; } // right side int flag = 1; int cnt = 0; while(1){ s += (char)(flag+'0'); cnt++; if(!(!flag && cnt > len0) && s.size() <= n && f(s))continue; st.insert(s); s.pop_back(); flag = 1-flag; s += (char)(flag+'0'); cnt = 1; if(!(!flag && cnt > len0) && s.size() <= n && f(s))continue; st.insert(s); s.pop_back(); break; } flag = 1; cnt = 0; while(1){ s.insert(0, string(1,(char)(flag+'0'))); cnt++; if(!(!flag && cnt > len0) && s.size() <= n && f(s))continue; st.insert(s); s.erase(s.begin()); flag = 1-flag; s.insert(0, string(1,(char)(flag+'0'))); cnt = 1; if(!(!flag && cnt > len0) && s.size() <= n && f(s))continue; st.insert(s); s.erase(s.begin()); break; } return s; // cout << T << endl; } // int main(){ // int t; // cin >> t; // while(t--)solve(); // }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 360 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 0 ms | 348 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 348 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 1 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 384 KB | Output is correct |
18 | Correct | 1 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 348 KB | Output is correct |
20 | Correct | 0 ms | 348 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 348 KB | Output is correct |
23 | Correct | 0 ms | 348 KB | Output is correct |
24 | Correct | 0 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 0 ms | 348 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 348 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 344 KB | Output is correct |
19 | Correct | 1 ms | 348 KB | Output is correct |
20 | Correct | 0 ms | 348 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 0 ms | 348 KB | Output is correct |
23 | Correct | 1 ms | 348 KB | Output is correct |
24 | Correct | 0 ms | 432 KB | Output is correct |
25 | Correct | 0 ms | 348 KB | Output is correct |
26 | Correct | 0 ms | 348 KB | Output is correct |
27 | Correct | 0 ms | 348 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
29 | Correct | 0 ms | 348 KB | Output is correct |
30 | Correct | 1 ms | 348 KB | Output is correct |
31 | Correct | 1 ms | 348 KB | Output is correct |
32 | Correct | 1 ms | 348 KB | Output is correct |
33 | Correct | 0 ms | 348 KB | Output is correct |
34 | Correct | 0 ms | 600 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 0 ms | 440 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 348 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 0 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 348 KB | Output is correct |
20 | Correct | 1 ms | 348 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Incorrect | 7 ms | 604 KB | Too many tests |
23 | Incorrect | 7 ms | 604 KB | Too many tests |
24 | Incorrect | 7 ms | 600 KB | Too many tests |
25 | Incorrect | 11 ms | 604 KB | Too many tests |
26 | Incorrect | 11 ms | 604 KB | Too many tests |
27 | Incorrect | 9 ms | 1116 KB | Too many tests |
28 | Incorrect | 5 ms | 1108 KB | Too many tests |
29 | Correct | 3 ms | 348 KB | Output is correct |
30 | Correct | 1 ms | 348 KB | Output is correct |
31 | Correct | 3 ms | 348 KB | Output is correct |
32 | Correct | 3 ms | 348 KB | Output is correct |
33 | Incorrect | 8 ms | 860 KB | Too many tests |
34 | Incorrect | 8 ms | 1112 KB | Too many tests |
35 | Incorrect | 8 ms | 916 KB | Too many tests |
36 | Incorrect | 8 ms | 1016 KB | Too many tests |
37 | Incorrect | 7 ms | 1116 KB | Too many tests |
38 | Correct | 3 ms | 348 KB | Output is correct |
39 | Correct | 4 ms | 344 KB | Output is correct |