# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1187631 | 12345678 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 729 ms | 39716 KiB |
#include <bits/stdc++.h>
using namespace std;
namespace a
{
int init, s[925][12];
}
int encode (int n, int x, int y) {
using namespace a;
if (!init)
{
init=1;
int cnt=1;
for (int msk=0; msk<(1<<12); msk++)
{
if (__builtin_popcount(msk)==6)
{
for (int i=0; i<12; i++) s[cnt][i]=(msk>>i)&1;
cnt++;
}
}
}
for (int i=0; i<12; i++) if (s[x][i]&&!s[y][i]) return i+1;
}
#include <bits/stdc++.h>
using namespace std;
namespace b
{
int init, s[925][12];
}
int decode (int n, int q, int h) {
using namespace b;
if (!init)
{
init=1;
int cnt=1;
for (int msk=0; msk<(1<<12); msk++)
{
if (__builtin_popcount(msk)==6)
{
for (int i=0; i<12; i++) s[cnt][i]=(msk>>i)&1;
cnt++;
}
}
}
return s[q][h-1];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |