제출 #917038

#제출 시각아이디문제언어결과실행 시간메모리
917038manishjha91동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> void exploreCave(int N) { /* ... */ int a[N]; memset(a,0,sizeof a); int d[N] for(int i=0; i<N; i++) d[i] = i; int i=tryComnination(a); while(i!=-1) { a[i] ^=1; i = tryCombination(a); } answer(a,d); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:9:5: error: expected initializer before 'for'
    9 |     for(int i=0; i<N; i++) d[i] = i;
      |     ^~~
cave.cpp:9:18: error: 'i' was not declared in this scope
    9 |     for(int i=0; i<N; i++) d[i] = i;
      |                  ^
cave.cpp:11:11: error: 'tryComnination' was not declared in this scope; did you mean 'tryCombination'?
   11 |     int i=tryComnination(a);
      |           ^~~~~~~~~~~~~~
      |           tryCombination
cave.cpp:17:14: error: 'd' was not declared in this scope
   17 |     answer(a,d);
      |              ^