# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
837192 | Andrey | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 2482 ms | 24292 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>
using namespace std;
int yoo[950][12];
int p = 0;
vector<int> wut(12);
void dfs(int d, int br) {
if(d == 12 && br == 6) {
p++;
for(int i = 0; i < 12; i++) {
yoo[p][i] = wut[i];
}
return;
}
else if(d == 12) {
return;
}
dfs(d+1,br);
wut[d] = 1;
dfs(d+1,br+1);
wut[d] = 0;
}
int encode (int n, int x, int y) {
if(p == 0) {
dfs(0,0);
}
for(int i = 0; i < 12; i++) {
if(yoo[x][i] == 1 && yoo[y][i] == 0) {
return i+1;
}
}
}
#include<bits/stdc++.h>
using namespace std;
int yoo[950][12];
int p = 0;
vector<int> wut(12);
void dfs(int d, int br) {
if(d == 12 && br == 6) {
p++;
for(int i = 0; i < 12; i++) {
yoo[p][i] = wut[i];
}
return;
}
else if(d == 12) {
return;
}
dfs(d+1,br);
wut[d] = 1;
dfs(d+1,br+1);
wut[d] = 0;
}
int decode (int n, int q, int h) {
if(p == 0) {
dfs(0,0);
}
return yoo[q][h-1];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |