제출 #1209914

#제출 시각아이디문제언어결과실행 시간메모리
1209914LIA동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
void exploreCave(int n) {
  ll ans[n], ans1[n];
  loop(i,0,n) {
    ans[i] = i;
  }
  ll s[n];
  loop(i,0,n) {
    s[i] = 0;
    if (tryCombination(s)!=i) {
      continue;
    }
    s[i] = 1;
  }
  answer(s, ans);
}

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:2:3: error: 'll' was not declared in this scope
    2 |   ll ans[n], ans1[n];
      |   ^~
cave.cpp:3:8: error: 'i' was not declared in this scope
    3 |   loop(i,0,n) {
      |        ^
cave.cpp:3:3: error: 'loop' was not declared in this scope
    3 |   loop(i,0,n) {
      |   ^~~~
cave.cpp:6:5: error: expected ';' before 's'
    6 |   ll s[n];
      |     ^~
      |     ;
cave.cpp:14:10: error: 's' was not declared in this scope
   14 |   answer(s, ans);
      |          ^
cave.cpp:14:13: error: 'ans' was not declared in this scope
   14 |   answer(s, ans);
      |             ^~~
cave.cpp:14:3: error: 'answer' was not declared in this scope
   14 |   answer(s, ans);
      |   ^~~~~~