| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1295383 | julia_08 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 698 ms | 39676 KiB |
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 925;
static int s[MAXN];
void build_encoder(){
int cnt = 0;
for(int mask=0; mask<(1 << 12); mask++){
if(__builtin_popcount(mask) != 6) continue;
s[++cnt] = mask;
}
}
static bool first_time = true;
int encode(int n, int x, int y){
if(first_time){
build_encoder();
first_time = false;
}
for(int i=0; i<12; i++){
if(s[x] & (1 << i) && !(s[y] & (1 << i))){
return i + 1;
}
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 925;
static int s[MAXN];
void build_decoder(){
int cnt = 0;
for(int mask=0; mask<(1 << 12); mask++){
if(__builtin_popcount(mask) != 6) continue;
s[++cnt] = mask;
}
}
static bool first_time = true;
int decode(int n, int q, int h){
if(first_time){
build_decoder();
first_time = false;
}
h --;
if(s[q] & (1 << h)) return 1;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
