# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
44626 | wzy | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++11 | 1889 ms | 79328 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
vector<int> v;
void putmask(){
if(v.size()) return ;
for(int j = 0 ; j < (1<<12) ; j++){
int x = 0;
for(int i = 0 ; i < 12 ; i++){
if(1<<i & j) x++;
}
if(x == 6){
v.push_back(j);
}
}
}
int encode (int n, int x, int y) {
putmask();
for(int i = 0 ; i < 12 ; i++){
if((v[x] & 1<<i) && !(v[y] & 1<<i)){
return (i + 1);
}
}
}
#include <bits/stdc++.h>
using namespace std;
vector<int> v;
void putmask(){
if(v.size()) return ;
for(int j = 0 ; j < (1<<12) ; j++){
int x = 0;
for(int i = 0 ; i < 12 ; i++){
if(1<<i & j) x++;
}
if(x == 6){
v.push_back(j);
}
}
}
int decode (int n, int q, int h) {
putmask();
h--;
if(v[q] & 1<<h){
return 1;
}
else return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |