Submission #25925

#TimeUsernameProblemLanguageResultExecution timeMemory
25925imsifileQuestion (Grader is different from the original contest) (CEOI14_question_grader)C11
Compilation error
0 ms0 KiB
int N = 920, cnt, ba[930]; bool fl=1; int dfs(int ix, int c0, int c1, int su){ if(ix==12){ ba[cnt++]=su; return; } if(c0) dfs(ix+1, c0-1, c1, su); if(c1) dfs(ix+1, c0, c1-1, su|(1<<ix)); } void init(){ dfs(0, 6, 6, 0); } int encode (int n, int x, int y) { if(fl)init(), fl=0; for(int i=0; i<12; i++){ if((ba[x-1] & (1<<i)) && (ba[y-1] & (1<<i))==0) return i+1; } return 0; }
int N = 920, cnt, ba[930]; bool fl=1; int dfs(int ix, int c0, int c1, int su){ if(ix==12){ ba[cnt++]=su; return; } if(c0) dfs(ix+1, c0-1, c1, su); if(c1) dfs(ix+1, c0, c1-1, su|(1<<ix)); } void init(){ dfs(0, 6, 6, 0); } int decode (int n, int q, int h) { if(fl)init(), fl=0; return (ba[q-1] & (1<<(h-1))) ? 1 : 0; }

Compilation message (stderr)

encoder.c:2:1: error: unknown type name 'bool'
 bool fl=1;
 ^
encoder.c: In function 'dfs':
encoder.c:5:28: warning: 'return' with no value, in function returning non-void
  if(ix==12){ ba[cnt++]=su; return; }
                            ^

decoder.c:2:1: error: unknown type name 'bool'
 bool fl=1;
 ^
decoder.c: In function 'dfs':
decoder.c:5:28: warning: 'return' with no value, in function returning non-void
  if(ix==12){ ba[cnt++]=su; return; }
                            ^