# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83861 | faceless | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 4424 ms | 79112 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.
int numbit (int mask) {
int ret = 0;
while (mask) {
mask -= mask & -mask;
ret ++;
}
return ret;
}
int to[2000];
int encode (int n, int x, int y){
int tmp = 1;
n = 12;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
for (int k = j + 1; k < n; k++) {
for (int l = k + 1; l < n; l++) {
for (int z = l + 1; z < n; z ++) {
for (int x = z + 1; z < n; z ++) {
to[tmp ++] = (1 << i) ^ (1 << j) ^ (1 << k) ^ (1 << l) ^ (1 << z) ^ (1 << x);
}
}
}
}
}
}
for (int i = 0; i < 12; i++) {
if (to[x] & (1 << i) and (to[y] & (1 << i)) == 0)
return i + 1;
}
}
int numbit (int mask) {
int ret = 0;
while (mask) {
mask -= mask & -mask;
ret ++;
}
return ret;
}
int to[2000];
int decode (int n, int q, int h){
int tmp = 1;
n = 12;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
for (int k = j + 1; k < n; k++) {
for (int l = k + 1; l < n; l++) {
for (int z = l + 1; z < n; z ++) {
for (int x = z + 1; z < n; z ++) {
to[tmp ++] = (1 << i) ^ (1 << j) ^ (1 << k) ^ (1 << l) ^ (1 << z) ^ (1 << x);
}
}
}
}
}
}
int mask = to[q];
if (mask & (1 << (h - 1)))
return 1;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |