# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
668509 | RambaXGorilla | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 7051 ms | 6116 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.
using namespace std;
int encode(int N, int X, int Y){
int x, y;
for(int i = 0, j = 0;i < 1 << 12;i++){
if(__builtin_popcount(i) == 6){
j++;
if(j > X && j > Y) break;
else if(j == X) x = i;
else if(j == Y) y = i;
}
}
return __builtin_ctz(x ^ (x & y)) + 1;
}
int decode(int N, int Q, int H){
int q;
for(int i = 0, j = 0;i < 1 << 12;i++){
if(__builtin_popcount(i) == 6){
j++;
if(j > Q) break;
else if(j == Q) q = i;
}
}
return (bool) (q & 1 << H - 1);
}
using namespace std;
int encode(int N, int X, int Y){
int x, y;
for(int i = 0, j = 0;i < 1 << 12;i++){
if(__builtin_popcount(i) == 6){
j++;
if(j > X && j > Y) break;
else if(j == X) x = i;
else if(j == Y) y = i;
}
}
return __builtin_ctz(x ^ (x & y)) + 1;
}
int decode(int N, int Q, int H){
int q;
for(int i = 0, j = 0;i < 1 << 12;i++){
if(__builtin_popcount(i) == 6){
j++;
if(j > Q) break;
else if(j == Q) q = i;
}
}
return (bool) (q & 1 << H - 1);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |