# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
635118 | JeanBombeur | Unscrambling a Messy Bug (IOI16_messy) | C++17 | 2 ms | 472 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 "messy.h"
#include <vector>
using namespace std;
// <|°_°|>
// JeanBombeur & M. Broccoli
// The hardest choices require the strongest wills
// What is better - to be born good, or to overcome your evil nature with great effort ?
vector <int> restore_permutation(int nbBits, int nbWrites, int nbReads) {
vector <int> Ans(nbBits, 0);
string word(nbBits, '0');
for (int bit = 1; bit < nbBits; bit <<= 1)
{
for (int i = 0; i < nbBits; i ++)
{
if (i & bit)
{
word[i] ^= '0' ^ '1';
add_element(word);
word[i] ^= '0' ^ '1';
}
}
for (int i = 0; i < nbBits; i ++)
{
# | 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... |