제출 #863492

#제출 시각아이디문제언어결과실행 시간메모리
86349220163070동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; void exploreCave(int N) { int c[N],d[N],res[N],res1[N],h1; for(int i=0;i<N;i++) d[i]=-1; for(int i=0;i<N;i++) { h1=0; for(int j=0;j<N;j++) { if(d[j]==-1) c[j]=0; else c[j]=d[j]; } int h=tryCombination(c); iif(h!=i) h1=1; int l,r; l=0,r=N-1; while(l<r) { int m=(l+r)/2; for(int j=0;j<N;j++) { if(d[j]==-1) c[j]=h1; else c[j]=d[j]; } for(int j=l;j<=m;j++) { if(d[j]==-1) c[j]=1-h1; } h=tryCombination(c); if(h>i||h==-) r=m; else l=m+1; } res[l]=1-h1; res1[l]=i; d[l]=1-h1; } answer(res,res1); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:17:3: error: 'iif' was not declared in this scope
   17 |   iif(h!=i) h1=1;
      |   ^~~
cave.cpp:33:16: error: expected primary-expression before ')' token
   33 |    if(h>i||h==-) r=m;
      |                ^