# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1087506 | juicy | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 2331 ms | 24564 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;
namespace {
vector<int> cnd;
}
int encode(int n, int x, int y) {
if (!cnd.size()) {
for (int i = 1; cnd.size() < 920; ++i) {
if (__builtin_popcount(i) == 6) {
cnd.push_back(i);
}
}
}
--x, --y;
for (int i = 0; i < 12; ++i) {
if (cnd[x] >> i & 1 && !(cnd[y] >> i & 1)) {
return i + 1;
}
}
assert(0);
return -1;
}
#include <bits/stdc++.h>
using namespace std;
namespace {
vector<int> cnd;
}
int decode(int n, int q, int h) {
if (!cnd.size()) {
for (int i = 1; cnd.size() < 920; ++i) {
if (__builtin_popcount(i) == 6) {
cnd.push_back(i);
}
}
}
q = cnd[q - 1];
return q >> (h - 1) & 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |