# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
429239 | Popax21 | Painting Squares (IOI20_squares) | C++14 | 162 ms | 556 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 <stddef.h>
#include <stdio.h>
#include <assert.h>
#include <vector>
#include "squares.h"
struct edge;
int seq[2048], iseq[1024], seqi = 0;
void deBrujinSeq(int w) {
static bool v[512][2] = {0};
for(int i = 0; i < 2; i++) {
if(!v[w][i]) {
v[w][i] = true;
deBrujinSeq(((w << 1) | i) & 511);
seq[seqi++] = i;
}
}
}
void init() {
static bool initalized = false;
if(initalized) return;
initalized = true;
//Create a De Brujn sequence
deBrujinSeq(0);
//Create a reverse lookup table
std::fill(iseq+0, iseq+1024, -1);
# | 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... |