# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
831599 | KemalK | Martian DNA (IOI16_dna) | C++17 | 1 ms | 340 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 <bits/stdc++.h>
#include <cstdlib>
using namespace std;
std::string analyse(int n, int t) {
string ans = "";
// while(t--){
// if (ans.size() == 0){
// bool ok = make_test(ans + "0");
// bool ok2 = make_test(ans + "1");
// if (!ok){
// cout << "sa" << "\n";
// for (int i = 0; i < n; i++){
// ans += "1";
// }
// return ans;
// }
// else if (!ok2){
// cout << "as" << "\n";
// for (int i = 0; i < n; i++){
// ans += "0";
// }
// return ans;
// }
// }
// }
if (n <= 5){
bool ok = false;
for (int mask = 0; mask < (1<<n) - 1; mask++){
string cur = "";
for (int j = 0; j < n; j++){
if (mask>>j&1){
cur += "1";
}
else{
cur += "0";
}
}
ok = make_test(cur);
if (ok){
return cur;
}
}
if (!ok){
for(int i = 0; i < n; i++){
ans += "1";
}
return ans;
}
}
return ans;
}
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... |