Submission #429200

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4292002021-06-15 18:50:43Popax21Painting Squares (IOI20_squares)C++14
0 / 100
165 ms592 KiB
#include <stddef.h>
#include <stdio.h>
#include <assert.h>
#include <vector>
#include "squares.h"
struct edge;
int seq[2048], iseq[1024], seqi = 0;
bool seq_init = false;
bool v[512][2] = {0};
void deBrujinSeq(int w) {
for(int i = 0; i < 2; i++) {
if(!v[w][i]) {
v[w][i] = true;
deBrujinSeq(((w << 1) | i) & 511);
seq[seqi++] = i;
}
}
}
std::vector<int> paint(int n) {
if(!seq_init) {
//Create a De Brujn sequence
deBrujinSeq(0);
//Create a reverse lookup table
std::fill(iseq+0, iseq+1024, -1);
for(int i = 0; i <= 1024-10; i++) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...