Submission #1216811

#TimeUsernameProblemLanguageResultExecution timeMemory
1216811nataliaaCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
void exploreCave(int N) { int v[N]; int a[N] = {}; for(int i = 0; i < N; i++) v[i]= i; for(int i = 0; i < N; i++) { int l = 0, r= N-1; while(l<=r) { int m = (l+r)/2; for(int j = 0; j <= m; j++) { if(a[i]) a[i]=0; else a[i]=1; } int k = tryCombination(a); if(k > a[i]) r = m-1; else l=m+1; } a[r] =l; } answer( a,v); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:13:33: error: 'tryCombination' was not declared in this scope
   13 |                         int k = tryCombination(a);
      |                                 ^~~~~~~~~~~~~~
cave.cpp:19:9: error: 'answer' was not declared in this scope
   19 |         answer( a,v);
      |         ^~~~~~