제출 #319033

#제출 시각아이디문제언어결과실행 시간메모리
319033Genius1506동굴 (IOI13_cave)C++14
0 / 100
328 ms512 KiB
#include<bits/stdc++.h> #include "cave.h"; using namespace std; const int mxN = 5002; int S[mxN],D[mxN],good[mxN],vis[mxN]; void exploreCave(int N){ memset(vis,0,sizeof(vis)); for(int i = 0; i < N; i++){ for(int j = 0; j < N; j++) if(!vis[j]) S[j]=0; int tmp = tryCombination(S); int a = tmp>i||tmp==-1 ? 0 : 1; int lb=0,rb=N-1,v=0; while(lb<=rb){ int mb=(lb+rb)/2; for(int j = 0; j < N; j++) if(!vis[j]) S[j]=j<=mb?a:1-a; int cur = tryCombination(S); if(cur>i||cur==-1){ rb=mb-1; v=mb; } else lb=mb+1; } D[v]=i; vis[v]=1; good[v]=a; } answer(good,D); }

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

cave.cpp:2:18: warning: extra tokens at end of #include directive
    2 | #include "cave.h";
      |                  ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...