| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1341032 | nathlol2 | Martian DNA (IOI16_dna) | C++20 | 9 ms | 484 KiB |
#include "dna.h"
#include <bits/stdc++.h>
using namespace std;
string analyse(int n, int t){
string s;
int l = 1, r = n, res = 0;
while(l <= r){
int md = (l + r) / 2;
string tmp;
for(int i = 0;i<md;i++) tmp += '0';
if(make_test(tmp)){
res = md;
l = md + 1;
}else{
r = md - 1;
}
}
int c = 0;
for(int i = 0;i<res;i++) s += '0';
while(1){
if(make_test(s + '1')){
s += '1';
c = 0;
}else{
s += '0';
++c;
}
if(c > res) break;
}
l = 0, r = s.size();
while(l <= r){
int md = (l + r) / 2;
if(make_test(s.substr(0, md))){
res = md;
l = md + 1;
}else{
r = md - 1;
}
}
s = s.substr(0, res);
while(s.size() != n){
if(make_test("1" + s)){
s = "1" + s;
}else{
s = "0" + s;
}
}
return s;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
