# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1244667 | nvujica | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 7090 ms | 10220 KiB |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000;
int ozn[maxn];
void pre(){
int cnt = 0;
for(int mask = 0; mask < (1 << 12); mask++){
if(__builtin_popcount(mask) == 6){
cnt++;
ozn[cnt] = mask;
}
}
}
int encode (int n, int x, int y) {
pre();
for(int i = 0; i < 12; i++){
if((ozn[x] & (1 << i)) && !(ozn[y] & (1 << i))) return (i + 1);
}
}
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000;
int ozn[maxn];
void pre(){
int cnt = 0;
for(int mask = 0; mask < (1 << 12); mask++){
if(__builtin_popcount(mask) == 6){
cnt++;
ozn[cnt] = mask;
}
}
}
int decode (int n, int q, int h) {
if(ozn[q] & (1 << (h - 1))) return 1;
else return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |