# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
429676 | schse | Handcrafted Gift (IOI20_gift) | C++17 | 163 ms | 19596 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 "gift.h"
#include <bits/stdc++.h>
using namespace std;
#ifndef EVAL
#include "grader.cpp"
#endif
int construct(int n, int r, std::vector<int> a, std::vector<int> b, std::vector<int> x)
{
int sb = 0;
for (int i : x)
sb |= i;
if (sb == 1)
{
std::string s(n, 'R');
craft(s);
return 1;
}
else if (sb == 2)
{
for (int i = 0; i < a.size(); i++)
if (a[i] == b[i])
return 0;
std::string s(n, 'R');
for (int i = 0; i < n; i++)
s[i] = i % 2 ? 'R' : 'B';
craft(s);
return 1;
}
else
assert(false);
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |