| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1330095 | gkos5678 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 475 ms | 39756 KiB |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 930;
int br[maxn];
bool b = 0;
void build(){
if (b) return;
b = 1;
int tr = 1;
for (int i = 1; i < (1 << 12); i++){
if (__builtin_popcount(i) != 6) continue;
br[tr] = i;
tr++;
}
}
int encode(int n, int x, int y){
build();
for (int i = 0; i < 12; i++){
if (((br[x] >> i) & 1) == 1 && ((br[y] >> i) & 1) == 0)
return i + 1;
}
}#include <bits/stdc++.h>
using namespace std;
const int maxn = 930;
int br[maxn];
bool b = 0;
void build(){
if (b) return;
b = 1;
int tr = 1;
for (int i = 1; i < (1 << 12); i++){
if (__builtin_popcount(i) != 6) continue;
br[tr] = i;
tr++;
}
}
int decode(int n, int q, int h){
build();
h--;
return (q >> h) & 1;
}Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
