| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1295354 | enzy | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 7093 ms | 2984 KiB |
#include<bits/stdc++.h>
using namespace std;
const int maxn=925;
int rep[maxn];
int encode (int n, int x, int y){
int id=1;
for(int mask=0;mask<(1<<12);mask++){
int cnt=0;
for(int k=0;k<12;k++) if(mask&(1<<k)) cnt++;
if(cnt!=6) continue;
rep[id]=mask;
id++;
}
for(int k=0;k<12;k++){
int atx=rep[x]&(1<<k), aty=rep[y]&(1<<k);
if(atx^aty&&atx) return k+1;
}
return -1;
}
#include<bits/stdc++.h>
using namespace std;
const int maxn=925;
int pai[maxn];
int decode (int n, int q, int h){
h--;
int id=1;
for(int mask=0;mask<(1<<12);mask++){
int cnt=0;
for(int k=0;k<12;k++) if(mask&(1<<k)) cnt++;
if(cnt!=6) continue;
pai[id]=mask;
id++;
}
if(pai[q]&(1<<h)) return 1;
else return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
