# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
257578 | doowey | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 7044 ms | 5212 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;
int compute(int id){
int cnt = 0;
for(int i = 0 ;i < (1 << 12); i ++ ){
if(__builtin_popcount(i) == 6){
if(cnt == id) return i;
cnt ++ ;
}
}
}
int encode (int n, int x, int y) {
x = compute(x);
y = compute(y);
for(int i = 0 ; i < 12; i ++ ){
if((x & (1 << i)) && !(y & (1 << i))){
return i + 1;
}
}
return -1;
}
#include <bits/stdc++.h>
using namespace std;
int get(int id){
int cnt = 0;
for(int i = 0 ;i < (1 << 12); i ++ ){
if(__builtin_popcount(i) == 6){
if(cnt == id) return i;
cnt ++ ;
}
}
}
int decode (int n, int q, int h) {
q = get(q);
h--;
if((q & (1 << h))) return true;
else return false;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |