제출 #648880

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6488802022-10-08 16:06:42Truitadepatates동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#include "cave.h"
void exploreCave(int n) {
int S[n];
int D[n];
int Sol[n];
bool fet[n];
for (int i = 0; i < n; i++){
S[i] = 0;
D[i] = -1;
Sol[i] = -1;
fet[i] = false;
}
if (tryCombination(S) == -1){
for (int i = 0; i < n; i++){
S[i] = 1;
D[i] = tryCombination(S);
S[i] = 0;
}
}
else{
for (int i = 0; i < n; i++){
int hola;
if (trycombination(S) == i) hola = 1;
else hola = 0;
int l = 0, r = n-1;
while (l < r) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:27:11: error: 'trycombination' was not declared in this scope; did you mean 'tryCombination'?
   27 |       if (trycombination(S) == i) hola = 1;
      |           ^~~~~~~~~~~~~~
      |           tryCombination
cave.cpp:42:45: error: 'mid' was not declared in this scope
   42 |           if (tryCombination(Sol) == i) l = mid+1;
      |                                             ^~~
cave.cpp:43:20: error: 'mid' was not declared in this scope
   43 |           else r = mid;
      |                    ^~~
cave.cpp:46:45: error: 'mid' was not declared in this scope
   46 |           if (tryCombination(Sol) == i) r = mid;
      |                                             ^~~
cave.cpp:47:20: error: 'mid' was not declared in this scope
   47 |           else l = mid+1;
      |                    ^~~
cave.cpp:50:9: error: 'm' was not declared in this scope
   50 |       S[m] = hola;
      |         ^