Submission #95928

#TimeUsernameProblemLanguageResultExecution timeMemory
95928Bodo171Question (Grader is different from the original contest) (CEOI14_question_grader)C++14
27 / 100
1281 ms81160 KiB
int lsb(int x) { return ((x^(x-1))&x); } int norm[2000]; int encode (int n, int x, int y) { for(int i=0;i<=9;i++) norm[(1<<i)]=i+1; return norm[lsb((x^y))]+10*((lsb((x^y))&x)!=0); }
int decode (int n, int q, int h) { int ret=0; if(h>10) { h-=11; if((q&(1<<h))) ret=1; else ret=0; } else { h--; if((q&(1<<h))) ret=0; else ret=1; } return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...