# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
543718 | 2022-03-31T09:15:52 Z | Sho10 | Martian DNA (IOI16_dna) | C++17 | 19 ms | 396 KB |
#include <bits/stdc++.h> //Andrei Alexandru a.k.a Sho #include "dna.h" using ll=long long; using ld=long double; int const INF=1000000005; ll const LINF=1000000000000000005; ll const mod=1000000007; ld const PI=3.14159265359; ll const MAX_N=3e5+5; #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #define f first #define s second #define pb push_back #define mp make_pair #define endl '\n' #define CODE_START ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; ll checkk(ll mx){ string a="0"; for(ll i=0;i<mx;i++) { a+='0'; if(make_test(a)){ continue; } a[a.size()-1]='1'; } if(make_test(a)==0){ return 0; } a+='0'; if(make_test(a)==0){ a[a.size()-1]='1'; } if(make_test(a)==1){ return 0; } return 1; } string analyse(int n,int t){ bool check=make_test("0"); if(check==0){ string x=""; for(ll i=0;i<n;i++) { x+='1'; } return x; } ll l=1,r=(n-1),res=0; while(l<=r){ ll mid=(l+r)/2; if(checkk(mid)){ res=mid; l=mid+1; }else { r=mid-1; } } string ans="0"; for(ll i=0;i<res;i++) { ans+='0'; if(make_test(ans)){ continue; }else { ans[ans.size()-1]='1'; } } for(ll i=0;i<(n-res-1);i++) { ans='0'+ans; if(make_test(ans)){ continue; }else { ans[0]='1'; } } return ans; } /* int32_t main(){ CODE_START; #ifdef LOCAL ifstream cin("input.txt"); #endif */
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 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 | 1 ms | 212 KB | Output is correct |
10 | Incorrect | 0 ms | 212 KB | Wrong DNA |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Incorrect | 0 ms | 212 KB | Wrong DNA |
13 | Correct | 0 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 | Incorrect | 0 ms | 212 KB | Wrong DNA |
17 | Correct | 1 ms | 212 KB | Output is correct |
18 | Incorrect | 0 ms | 212 KB | Wrong DNA |
19 | Correct | 0 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 | Incorrect | 0 ms | 212 KB | Wrong DNA |
23 | Incorrect | 1 ms | 212 KB | Wrong DNA |
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 | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Incorrect | 0 ms | 224 KB | Wrong DNA |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Incorrect | 0 ms | 212 KB | Wrong DNA |
12 | Incorrect | 0 ms | 212 KB | Wrong DNA |
13 | Incorrect | 1 ms | 212 KB | Wrong DNA |
14 | Incorrect | 1 ms | 212 KB | Wrong DNA |
15 | Incorrect | 1 ms | 212 KB | Wrong DNA |
16 | Correct | 1 ms | 212 KB | Output is correct |
17 | Incorrect | 1 ms | 212 KB | Wrong DNA |
18 | Incorrect | 1 ms | 212 KB | Wrong DNA |
19 | Incorrect | 1 ms | 212 KB | Wrong DNA |
20 | Incorrect | 1 ms | 212 KB | Wrong DNA |
21 | Incorrect | 1 ms | 212 KB | Wrong DNA |
22 | Incorrect | 1 ms | 212 KB | Wrong DNA |
23 | Correct | 1 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 | Incorrect | 1 ms | 212 KB | Wrong DNA |
27 | Correct | 1 ms | 212 KB | Output is correct |
28 | Incorrect | 1 ms | 212 KB | Wrong DNA |
29 | Incorrect | 1 ms | 212 KB | Wrong DNA |
30 | Incorrect | 1 ms | 212 KB | Wrong DNA |
31 | Incorrect | 1 ms | 212 KB | Too many tests |
32 | Incorrect | 1 ms | 212 KB | Wrong DNA |
33 | Incorrect | 1 ms | 212 KB | Wrong DNA |
34 | Correct | 1 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 | Incorrect | 0 ms | 212 KB | Wrong DNA |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Incorrect | 0 ms | 212 KB | Wrong DNA |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Incorrect | 0 ms | 212 KB | Wrong DNA |
14 | Incorrect | 1 ms | 212 KB | Wrong DNA |
15 | Incorrect | 0 ms | 212 KB | Wrong DNA |
16 | Correct | 1 ms | 212 KB | Output is correct |
17 | Incorrect | 1 ms | 212 KB | Wrong DNA |
18 | Incorrect | 1 ms | 212 KB | Wrong DNA |
19 | Incorrect | 1 ms | 212 KB | Wrong DNA |
20 | Incorrect | 1 ms | 212 KB | Wrong DNA |
21 | Incorrect | 1 ms | 300 KB | Wrong DNA |
22 | Incorrect | 13 ms | 344 KB | Wrong DNA |
23 | Incorrect | 14 ms | 308 KB | Wrong DNA |
24 | Incorrect | 15 ms | 340 KB | Wrong DNA |
25 | Incorrect | 19 ms | 352 KB | Wrong DNA |
26 | Incorrect | 17 ms | 340 KB | Wrong DNA |
27 | Incorrect | 10 ms | 352 KB | Wrong DNA |
28 | Incorrect | 10 ms | 340 KB | Too many tests |
29 | Incorrect | 9 ms | 340 KB | Too many tests |
30 | Correct | 0 ms | 212 KB | Output is correct |
31 | Incorrect | 13 ms | 356 KB | Wrong DNA |
32 | Incorrect | 7 ms | 340 KB | Too many tests |
33 | Incorrect | 13 ms | 376 KB | Wrong DNA |
34 | Incorrect | 13 ms | 352 KB | Wrong DNA |
35 | Incorrect | 12 ms | 396 KB | Wrong DNA |
36 | Incorrect | 12 ms | 340 KB | Wrong DNA |
37 | Incorrect | 13 ms | 340 KB | Wrong DNA |
38 | Incorrect | 8 ms | 392 KB | Wrong DNA |
39 | Incorrect | 13 ms | 372 KB | Too many tests |