제출 #231195

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2311952020-05-13 04:03:20AASG동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
void exploreCave(int N) {
int n=N;
int R[n];int P[n];
int aux2[n];
int x,y;
bool z;
for(int i=0;i<n;i++){
R[i]=1;
P[i]=0;
}
for(int i=0;i<n;i++){
for(int l=0;l<n;l++)aux2[l]=R[l];
int p1=0,p2=n-1;
x=tryCombination(aux2);z=1;
while(abs(p1-p2)!=1){
int p3=(p1+p2)/2;
if(z){
for(int l=p1;l<=p3;l++){
if(P[l]==0){
aux2[l]=0;
}
}}else{
for(int l=p1;l<=p3;l++){
if(P[l]==0){
aux2[l]=1;
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:46:39: error: 'aux1' was not declared in this scope
         else if(x!=i+1 && y==i){R[p1]=aux1[p1];P[p1]=i+1;}
                                       ^~~~
cave.cpp:46:39: note: suggested alternative: 'aux2'
         else if(x!=i+1 && y==i){R[p1]=aux1[p1];P[p1]=i+1;}
                                       ^~~~
                                       aux2
cave.cpp:48:14: error: 'aux' was not declared in this scope
         else{aux[p1]=1;}
              ^~~
cave.cpp:48:14: note: suggested alternative: 'aux2'
         else{aux[p1]=1;}
              ^~~
              aux2