Submission #652616

#TimeUsernameProblemLanguageResultExecution timeMemory
652616MilosMilutinovicQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++14
0 / 100
67 ms47972 KiB
const int N=1000; int ff1[N][12],tsz1=0; int encode(int n,int x,int y) { for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) { ++tsz1; for (int j=0;j<12;j++) if (i>>j&1) ff1[tsz1][j]=1; } for (int i=0;i<12;i++) if (ff1[x][i]&&!ff1[y][i]) return i+1; return 12; }
const int N=1000; int ff2[N][12],tsz2; int decode(int n,int q,int h) { for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) { ++tsz2; for (int j=0;j<12;j++) if (i>>j&1) ff2[tsz2][j]=1; } return ff2[q][h-1]; }
#Verdict Execution timeMemoryGrader output
Fetching results...