Submission #95926

#TimeUsernameProblemLanguageResultExecution timeMemory
95926Bodo171Question (Grader is different from the original contest) (CEOI14_question_grader)C++14
0 / 100
881 ms104928 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))]+9*((lsb((x^y))&x)!=0); }
#include <iostream> int decode (int n, int q, int h) { int ret=0; if(h>9) { h-=10; 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...