제출 #1216811

#제출 시각아이디문제언어결과실행 시간메모리
1216811nataliaa동굴 (IOI13_cave)C++20
컴파일 에러
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); }

컴파일 시 표준 에러 (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);
      |         ^~~~~~