Submission #649916

#TimeUsernameProblemLanguageResultExecution timeMemory
649916Pablo_No동굴 (IOI13_cave)C++17
Compilation error
0 ms0 KiB
const int N = 5005; const int B = 13; int q[N]; int cpos[N]; int ord[N]; void exploreCave(int N) { for(int i = 0; i < N; i++) { cpos[i] = -1; } for(int i = 0; i < N; i++) { for(int j = 0; j < N; j++) { q[j] = 0; if(cpos[j] != -1) q[j] = cpos[j]; } int an = tryCombination(q); cpos[i] = 1; if(an > i) cpos[i] = 0; int cp = cpos[i]; int idx = 0; for(int k = 0; k < B; k++) { for(int j = 0; j < N; j++) { q[j] = 1-cp; if(cpos[j] != -1) q[j] = cpos[j]; else if((j & (1 << k)) && ((j | ((1 << k)-1)) == idx)) q[i] = cp; } int anx = tryCombination(q); if(anx > i) idx += (1 << k); } ord[i] = idx; } answer(cpos, ord); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:24:12: error: 'tryCombination' was not declared in this scope
   24 |   int an = tryCombination(q);
      |            ^~~~~~~~~~~~~~
cave.cpp:49:2: error: 'answer' was not declared in this scope
   49 |  answer(cpos, ord);
      |  ^~~~~~