제출 #511095

#제출 시각아이디문제언어결과실행 시간메모리
511095bebecanvas동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include "cave.h" void exploreCave(int N) { int d[N]; int s[N]; for(int i=0; i<N; i++){s[i]=0;} queue<int> q; for(int i=0; i<N; i++){ q.push(i); } int prev= tryCombination(s); while(!q.empty()){ int a= q.top(); q.pop(); s[a]++; s[a]%=2; int b= tryCombination(s); if(b==prev){q.push(a);} else if(b>prev&&prev!=-1){ d[a]= prev; prev= b; }else{ d[a]= b; s[a]++; s[a]%=2; } } answer(s, d); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:8:5: error: 'queue' was not declared in this scope
    8 |     queue<int> q;
      |     ^~~~~
cave.cpp:8:11: error: expected primary-expression before 'int'
    8 |     queue<int> q;
      |           ^~~
cave.cpp:10:3: error: 'q' was not declared in this scope
   10 |   q.push(i);
      |   ^
cave.cpp:14:9: error: 'q' was not declared in this scope
   14 |  while(!q.empty()){
      |         ^