제출 #717283

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7172832023-04-01 19:17:42Juan동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include "cave.h"
using namespace std;
void exploreCave(int N){
vector<int> unprocessed;
for(int i = 0; i < N; i++) unprocessed.push_back(i);
int vask[N]={}, S[N]={};
int D[N]={};
for(int i = 0; i < N; i++){
for(int x : unprocessed) vask[x] = 0;
S[i] = 1;
if(tryCombination(vask)!=i){
for(int x : unprocessed) vask[x] = 1;
S[i] = 0;
}
int l = 0, r = unprocessed.size()-1;
while(l<=r){
int m = (l+r)>>1;
for(int j = 0; j <= m; j++) vask[unprocessed[j]] = 1-vask[unprocessed[j]];
int ret = tryCombination(vask);
if(ret==i) l = m+1;
else r = m-1;
for(int j = 0; j <= m; j++) vask[unprocessed[j]] = 1-vask[unprocessed[j]];
}
int pos = unprocessed[l];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:31:35: error: 'askv' was not declared in this scope
   31 |                        S[pos] = 1-askv[l];
      |                                   ^~~~