# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
189138 | TadijaSebez | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++11 | 1573 ms | 79384 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 <vector>
std::vector<int> v;
int encode(int n, int x, int y)
{
if(v.empty()) for(int i=1;v.size()<=920;i++) if(__builtin_popcount(i)==6) v.push_back(i);
for(int i=0;i<12;i++) if((v[x]>>i&1) && !(v[y]>>i&1)) return i+1;
}
#include <vector>
std::vector<int> e;
int decode (int n, int q, int h)
{
if(e.empty()) for(int i=1;e.size()<=920;i++) if(__builtin_popcount(i)==6) e.push_back(i);
return (e[q]>>(h-1)&1)?1:0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |