# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
59282 | TadijaSebez | Martian DNA (IOI16_dna) | C++11 | 19 ms | 1480 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "dna.h"
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <ctime>
using namespace std;
string sol;
int qu;
bool Check(string s){ return make_test(s);}//qu++;return sol.find(s)!=string::npos;}
string analyse(int n, int t)
{
string tmp="";
int cnt=0;
while(cnt<10)
{
char s='0'+(rand()&1);
//cout << s << "\n";
if(Check(tmp+s))
{
tmp+=s;
cnt=0;
}
else
{
//printf(":D\n");
cnt++;
tmp+=('0'+((s-'0')^1));
//cout << tmp << "\n";
}
//printf("WORK\n");
}
//cout << tmp << "\n";
//exit(0);
for(int i=0;i<10;i++)
{
if(Check(tmp)) break;
tmp=tmp.substr(0,tmp.size()-1);
}
while(tmp.size()<n)
{
tmp='0'+tmp;
if(!Check(tmp)) tmp[0]='1';
}
//cout << tmp << "\n";
return tmp;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |