# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
543721 | 2022-03-31T09:16:58 Z | Sho10 | Martian DNA (IOI16_dna) | C++17 | 68 ms | 376 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; } 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 | 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 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
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 | Correct | 0 ms | 212 KB | Output is correct |
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 | 1 ms | 340 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 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
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 | Incorrect | 1 ms | 212 KB | Too many tests |
18 | Incorrect | 1 ms | 212 KB | Too many tests |
19 | Incorrect | 1 ms | 212 KB | Too many tests |
20 | Incorrect | 1 ms | 212 KB | Too many tests |
21 | Incorrect | 1 ms | 212 KB | Too many tests |
22 | Incorrect | 1 ms | 212 KB | Too many tests |
23 | Incorrect | 1 ms | 212 KB | Too many tests |
24 | Incorrect | 1 ms | 212 KB | Too many tests |
25 | Correct | 0 ms | 212 KB | Output is correct |
26 | Incorrect | 1 ms | 212 KB | Too many tests |
27 | Incorrect | 1 ms | 212 KB | Too many tests |
28 | Incorrect | 1 ms | 212 KB | Too many tests |
29 | Incorrect | 1 ms | 212 KB | Too many tests |
30 | Incorrect | 1 ms | 212 KB | Too many tests |
31 | Incorrect | 1 ms | 212 KB | Too many tests |
32 | Incorrect | 1 ms | 212 KB | Too many tests |
33 | Incorrect | 1 ms | 212 KB | Too many tests |
34 | Incorrect | 1 ms | 212 KB | Too many tests |
# | 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 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 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 | 0 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 | Incorrect | 54 ms | 348 KB | Too many tests |
23 | Incorrect | 33 ms | 364 KB | Too many tests |
24 | Incorrect | 24 ms | 344 KB | Too many tests |
25 | Incorrect | 19 ms | 348 KB | Too many tests |
26 | Incorrect | 27 ms | 348 KB | Too many tests |
27 | Incorrect | 49 ms | 364 KB | Too many tests |
28 | Incorrect | 51 ms | 348 KB | Too many tests |
29 | Incorrect | 44 ms | 372 KB | Too many tests |
30 | Correct | 0 ms | 212 KB | Output is correct |
31 | Incorrect | 68 ms | 356 KB | Too many tests |
32 | Incorrect | 47 ms | 376 KB | Too many tests |
33 | Incorrect | 42 ms | 340 KB | Too many tests |
34 | Incorrect | 31 ms | 340 KB | Too many tests |
35 | Incorrect | 52 ms | 344 KB | Too many tests |
36 | Incorrect | 16 ms | 352 KB | Too many tests |
37 | Incorrect | 18 ms | 368 KB | Too many tests |
38 | Incorrect | 51 ms | 372 KB | Too many tests |
39 | Incorrect | 28 ms | 340 KB | Too many tests |