Submission #652613

#TimeUsernameProblemLanguageResultExecution timeMemory
652613MilosMilutinovicQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++14
0 / 100
7091 ms2268 KiB
int encode(int n,int x,int y) { const int N=925; int ff[N][12]; int tsz=0; for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) { ++tsz; for (int j=0;j<12;j++) if (i>>j&1) ff[tsz][j]=1; } for (int i=0;i<12;i++) if (ff[x][i]&&!ff[y][i]) return i+1; }
const int N=925; int ff[N][12],tsz; int decode(int n,int q,int h) { for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) { ++tsz; for (int j=0;j<12;j++) if (i>>j&1) ff[tsz][j]=1; } return ff[q][h-1]; }

Compilation message (stderr)

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...