# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
288360 | arayi | Unscrambling a Messy Bug (IOI16_messy) | C++17 | 2 ms | 512 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 <bits/stdc++.h>
#include "messy.h"
#define ad push_back
using namespace std;
int n, sm, sm1;
vector <int> p;
void rec1(int l, int r, string s)
{
if(l == r) return;
int md = (l + r)/2;
for (int i = l; i <= md; i++)
{
s[i] = '1';
add_element(s);
s[i] = '0';
}
for (int i = md + 1; i <= r; i++) s[i] = '1';
rec1(l, md, s);
for (int i = md + 1; i <= r; i++) s[i] = '0';
for (int i = l; i <= md; i++) s[i] = '1';
rec1(md + 1, r, s);
}
void rec(int l, int r, string s, vector <int> sm)
{
if(l == r)
{
p[l] = sm[0];
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |