Submission #343609

#TimeUsernameProblemLanguageResultExecution timeMemory
343609KerimQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++17
0 / 100
320 ms48000 KiB
static int arr[924],pos;//C(12,6) int encode (int n, int a, int b) { for(int i=0,x,y;i<4096;i++){x=i;y=0; while(x>=1) y+=(x%2),x/=2; if(y==6)arr[pos++]=i; } for(int i=0;i<12;i++) if((arr[a-1]>>i&1) and !(arr[b-1]>>i&1)) return i+1; }
static int arr[924],pos; int decode (int n, int q, int h){ for(int i=0,x,y;i<4096;i++){x=i;y=0; while(x>=1) y+=(x%2),x/=2; if(y==6)arr[pos++]=i; } return (arr[q-1]>>(h-1)&1); }

Compilation message (stderr)

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